Pregunta

I am implementing a solution that has a web interface (service stack) and a long running job service (servicestack?).

I already implemented the web interface and found servicestack a really good framework for creating what i wanted. I used redis as a semi reliable object store.

Then i started to think about how to implement the job service. What i originally thought i do was to set up a simple windows service and have the redis client pick up thinks marked for the job service ( how exactly i wasn't sure ). These are very long running jobs that require alot of resources so i want to throttle how many of them are running at a time and also if i could fan out with worker machines that would be nice.

Then i saw that ServiceStack has a RedisMQ that might fit the bill, and hence the question.

Should i create a seperate servicestack service and host it in a windows service. Then have a MQ interface on it and let the webservice post to that message queue jobs that need to run. Then the jobservice is decoulpled from the webservice and all is well.

or

Am i over thinking it and should just use the logic part of the service i already have running and implement the job logic there, could pop in a MQ but in the same process that would probably just be a waste of time. I could skip the message part entirely and just call the logic part straight with some throttling algorithm.

Also when i was testing this out i had trouble with creating the RedisMQ server

using ServiceStack.redis;
using ServiceStack.messaging;
var mqHost = new RedisMqServer(redisFactory, retryCount:2);

Returns RedisMQServer not found.

I did a full nuget install of the servicestack and servicestack.redis packages

install-package servicestack
install-package servicestack.redis

When i use object browser on the .dll i don't find any mention of the ReidsMQServer, the version i 4.0.15 I found this url https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Server/Messaging/Redis/RedisMqServer.cs And would think that this should belong to the servicestack.redis reference.

Any help appreciated, cheers

¿Fue útil?

Solución

Redis MQ is in the ServiceStack.Server NuGet package, i.e:

PM> Install-Package ServiceStack.Server

When in doubt as to which package to install, refer to ServiceStack's download page, e.g: https://servicestack.net/download#mq

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top