I think you might find it easier to reason about if you think pull rather than 
push. That is, the client asks the server “do you have a job for me” and the 
server returns the job. If instead as in your design the server pushes the job 
to the client it can get real complex (e.g what if the client isn’t ready). 

Even with the pull you still need to handle errors (e.g the client fails while 
processing a job - what does that and how it is handled and communicated). 

These systems can get complex very quickly - you are probably better off using 
an off the shelf solution (search job/workflow orchestration). 

But if it just for your edification have a crack at it and have fun. 

> On Sep 20, 2022, at 7:09 AM, Peter Galbavy <pe...@wonderland.org> wrote:
> 
> A good starting point is to look for a multiplxer / multiplexor
> 
>> On Saturday, 17 September 2022 at 11:59:11 UTC+1 ramki...@hotmail.com wrote:
>> I have a tcp server that collects jobs (lets say 10), and tcp clients get 
>> the jobs. This is done in a FIFO method, where the first job the server 
>> gets, all tcp clients get that job. When that job is completed, all tcp 
>> clients get the second job etc etc.
>> 
>> I'm trying to find a way/term (so that I can google template code) on how to 
>> convert this FIFO method to one where it sends (let's say) job 1, 2 and 3 to 
>> three different clients, so that they work on it in parallel.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/2bc9b736-2ea6-4f9f-bf7a-35a5fe028a8an%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/A0F77899-5C30-4B86-86A4-E90AC3F4DF0E%40ix.netcom.com.

Reply via email to