/Q

Server application for http://qlient.herokuapp.com/

Primary LanguageElixir

Q

Test project, splitted up into 2 repos: front-end and back-end. Both are deployed to Heroku and available at http://qlient.herokuapp.com/.

What`s all this about?

The goal of project is to create custom key-value collection type, and provide a web interface to store data within such collection. It also must must provide the ability to get live updates, whenever collection changes its state.

Collection

Such collection is implemented as a list of tuples, where first element represents key and second represents value -> Q.Collection. This looks pretty much the same as Keyword, with the exception that only atoms are allowed to use as keys in Keyword, whereas custom allows use of any data type, even nil and references. Of course, such collection is nowhere near the performance of traditional Map and Keyword, but that's not the case of the project.

State Container

The internal state of application is represented by Q.StateStore, and whenever any of create, update or delete operations performed, it fires corresponding EventBus event.

WebSockets API

Web interface is implemented via Phoenix.Channels, and among common Create, Read, Update, Delete operations, it also processes and forwards Q.StateStore events to all subscribers.