<div dir="ltr"><div>I would suggest you ignore the Erlang/Elixir mode of thought as a starting point.<br></div><div><br></div><div>Your architecture is closely related to either XMPP or AMQP protocol and suggest you base it off these instead of heading straight down do a coding language. Of course I would be bias towards MongooseIM or RabbitMQ. This abstracts the entire communication question away and you can focus on the business logic. <br></div><div><br></div><div>In XMPP, each client device and server would be XMPP clients and both would communicate using simple text based coded messages. You automatically get federation and presence notification. Store and forward is automatically built in. XMPP is also moving towards addressing IoT devices which might further simplify your architecture.<br></div><div><br></div><div>In RabbitMQ each client/server would have a two queue (in/out) and all communications goes through these. Multiple clients can share a single queue pair if they are grouped together e.g. all clients within the same geo-location. <br></div><div><br></div><div>Cheers<br></div></div>