Distributed System

前端 未结 2 761
孤独总比滥情好
孤独总比滥情好 2021-01-07 08:27

I am looking to create a distributed framework in Java and need some help sorting out the implementation of a client/manager/worker situation as described in my pseudocode b

2条回答
  •  灰色年华
    2021-01-07 09:13

    • Q. How do I differentiate between a client connection and worker connection?
    • A. Use two ports, one to listen to connections from workers and one from clients.
    • Q. How do I keep track of the number of workers currently connected?
    • A. Have a registration mechanism (maybe in a list of workers) to register/deregister each time a worker connects/disconnects.

提交回复
热议问题