Pro

Architecture

Pro architecture allows you to use any technology. It promotes speed and scales both ways vertically and horizontally

User Interface

Since React we have so many good tools to deal with UI on client's side it's just a waste of resources to render html on the server. Moreover you can't deal with user actions on the server.

Using one of these tools you can prepare whole UI as static files and serve them from CDN. Browser downloads static files only once and then it's cached. In terms of performance, there’s no better way to deal with UI.

Frontend Store

Keep all your data in one place. Simple and effective, without tying pieces together which is hard and unnecessary.

Frontend Dispatcher

If you keep your code loose coupled you can always add and remove functionalities without interfering with other parts of application. Dispatcher is a way to achieve this. Instead of calling foreign function directly you emit an event which you subscribe to in other services. There's no error if the event is not catched.

In Pro dispatcher is the place where websocket communication starts and ends. When there's a new message from the backend dispatcher emits proper event.

JavaScript in a browser is single-threaded and there's no reason to use more than one dispatcher.

WebSocket

Go out of the HTTP box. With HTTP you establish connection for every action and send a lot of redundant headers both ways. That means it's relatively slow. It's 10 times faster to use websocket (considering 10k requests of average size). Websocket is also bidirectional and allows server to send data without asking.

Thin Communication Layer

This layer passes messages between internal message bus and outside world. Beside authorization that's the only responsibility and it makes it really fast.

Message Bus

Bus is a common medium for each service which binds it all in one application. Speed guaranties in-memory implementation.

Consumers

Since we're using a bus we can write services in any existing techology and we can run them in multiple instances or threads. Making more instances is cheap because stack of particular service is reduced to the task.

Scaling

To get minimal latency it's recommended to scale verticaly. Pro architecture scales efficiently on a single server and allows to serve more than million parallel connections. But if you need even more each element of Pro can be easily parallelized on another server.

CONTACT ME AT MAD@MANIAK.PRO. I NEED YOUR QUESTIONS.