Status update and multiple application servers

125 views
Skip to first unread message

machinelea...@gmail.com

unread,
Jun 9, 2017, 12:18:35 AM6/9/17
to Elm Discuss
Sorry I'm only a beginner and I need to understand this thing at the level of software architecture.

If I'm not wrong, status management (or more generally application logic) is implemented in Elm on server side (as opposite to other JavaScript frameworks running on client side).

Then how is status consistency guaranteed in a professional enterprise environment, in case of load balancing, multiple application servers, etc... What if the previous message hits a server and the next another one?

Matt Hughes

unread,
Jun 9, 2017, 6:39:59 PM6/9/17
to Elm Discuss
Hi, Elm programs are compiled to JavaScript and run in the browser, not on the server. Elm provides libraries for using HTTP and WebSockets to exchange information with a server. Elm is just the programming language, so load balancing, application servers, and so on are out of scope for this group. Standard web application architecture practices apply. 

mch

Charles Scalfani

unread,
Jun 10, 2017, 11:13:48 AM6/10/17
to Elm Discuss
While it MAY be true that server side Elm is out of scope for this group (although it should not be), Elm can definitely be deployed on the server. In fact I've been writing Elm since 0.17 and it primarily on the server side.

Rupert Smith

unread,
Jun 10, 2017, 6:53:02 PM6/10/17
to Elm Discuss
The concept of a 'single point of truth' comes into play here. 

For some given piece of data, there needs to be just one place in your architecture that holds the definitive state of that piece of data. 

Some examples of how this can be achieved:

* A database that is shared across the application servers.
* Sessions that are serializable and can be moved to whichever application server processes the request. Some kind of fast distributed store may be used for this purpose.
* Sticky sessions. The same sessions always comes back to the same server, making it simpler to guarantee a single point of truth.
Reply all
Reply to author
Forward
0 new messages