Design
The application is part of the light-portal at the moment, and it inherits the design principles.
Scalability
The application is designed with millions of concurrent users in mind and scaling in demand. The front-end is a React single page application running in a browser that accesses the backend services through APIs. All services are designed as event sourcing and CQRS backed by Apache Kafka Streams.
It is a typical read-heavy application, and we can scale the query side by increasing the Kafka partition and query side instances when more users are online. When a user updates his/her information, an event will be generated by a command side instance, and all query side instances can process it to update the local materialized view that is optimized for read-only access.
Flexibility
The application can be extended easily with new microservices for new functions. All the dropdowns on the front-end are populated dynamically from the reference API. The single-page application is component-based, and new components can be added to access new services.
The entire application has one source of the truth, which is the events produced by user actions. By replay the events, we can generate as many materialized view possible to extend the functionality.
Performance
The APIs were built on top of light-4j, which is one of the fastest microservices platforms in Java. It serves millions of requests per second with several milliseconds response time. On the UI, when you select a country, all the provinces for the country will be populated in the province dropdown in real-time from the reference API.
There are a lot of performance optimizations on the UI as well. For example, the Live Map can show thousands of entities with cluster support. The status history won’t be rendered unless the expansion panel is opened.