Erlang Factory SF Bay Area 2013
More info and slides on the website:
This talk presents the architecture behind a new backend for a game.
The backend exhibits stateful design modular components and supports many concurrent users.
Communication is built atop Cowboy websockets and it is pluggable.
At its core the backend is a chat server.
However entities on the server can be users or services.
Services are essentially chat bots with programmable capabilities.
API requests to the server resemble chat messages to services so the client is easy to program.
Adding new functionality is simply a matter of modifying an existing service or spinning up a new one with a rebar template.
The services themselves modify the users state in memory as well as on the database so the entire flow requires very few database reads.
Источник: rutube.ru