I'm designing a distributed game server which will support both browser and UE4 clients (hopefully both over HTTP for simplicity) and I keep butting my head against REST and doing semantic backflips to get the logic I want put in place.
For some things, REST makes perfect sense - get a list of games, create a new game, get metadata about a specific game, etc.
But for other things, the client really only wants to generate an "event" - "I joined game X", "I performed action B in game X", or receive notification that an "event" occurred - "player A joined the game you are in", "player A performed action X in the game you are in", etc. Inside the REST world, you can make this work (believe me, I've tried) but it always involves some peculiarity that either distorts the domain model to make it fit the semantics of REST or distorting REST to make it fit the semantics of the domain model.
Is there any framework or paradigm for creating such a pub/sub model that supports interaction from the browser? My current idea is to hook up a websocket -> MQ proxy and use an MQ server as an event bus, but the problem is I'm finding it hard to find any such proxies and I'm not sure what the security implications of this architecture actually are (in particular I'm worried about protection against DDoS attacks, where multiple distributed users could spam the MQ and saturate it, causing the whole system to fail).
Websockets are also not preferable as, while UE4 supports HTTP out of the box, I'm not aware of it having any websocket support so I would need to find and link a C++ websocket library to the game client and that already sounds painful.