Thoughts on task

Soldato
Joined
1 Mar 2003
Posts
5,508
Location
Cotham, Bristol
Can I have others thoughts on what is wanted from the following

write a simple worker pattern type project, the workers can be stubs (i.e. sleeping for random periods of time).

....we suggest using redis for the pub/sub worker interactions

Is it me or are they talking about two different things
  • Thread pools for processing a list of tasks concurrently, i.e. message queues
  • Publish and Subscribe messaging where all subscribers receive messages from topics they subscribe to all at once?
 
Bit vague innit !

I'd read it as them wanting to see a producer/consumer model with a queue in between them. Redis seems overkill unless you're going to use a language with crappy support for multi-threaded code. In java I'd just use one of the concurrent BlockingQueue implementations.
 
Hmm yeah that would be a lot simpler than how I read it, I was thinking of a simple producer service putting stuff into a redis queue and then a consumer service app taking from the queue doing something with it then writing the result to a topic which the producer subscribes to.

Thinking about it they probably recommended redis as they prefer golang but stated can use whichever language you're most comfortable with
 
I'll probably go with your interpretation as they want examples of unit and integration testing and only recommend spending 1-2 hrs on it. Might be a bit hard to fit all of that in with my original plan
 
Back
Top Bottom