ZeusWPI / MOZAIC

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition platform
GNU Lesser General Public License v3.0
13 stars 6 forks source link

The role of network events #266

Open iasoon opened 6 years ago

iasoon commented 6 years ago

Right now, network communication is implemented as request/response style RPC calls. We take a MOZAIC-connection and attach request handler to it, which has a type of SomeEventType -> Result. When the remote party then sends a request, we just connect it to the assigned handler. Apart from requests, connection events (Connected, Disconnected, Quit) can also happen, Right now this is just bolted on to the handler system, where the produced result is ignored. This might not really be ideal. What would be a better way to solve this?

The nice part about doing it this way is that there is one from the network, containing both events sent by the remote party and produced by the connection status.

All input welcome!