Prerequisites: docker and docker-compose
bash start.sh
Backend and frontend docker containers will be built. To access application go to http://localhost
in browser
- Backend: Spring Boot, JPA, Web Sockets
- Frontend: Angular
Backend: Spring Boot is enterprise ready framework, which works reasonably fast and in the same time permits quick development. Slow at startup, but works reliable and with best security practises in mind.
For quick development I used in-memory database and hided data access layer under a repository. In prod, world-scale scenario I would go with multi-layer approach, were first N messages would be stored in simple, but efficient database which gives possibility to query last N entries. For functionalities like full text search or sophisticated queries can be used databases which provide full power of indexes (if from open source: Postgre SQL for example)
Frontend: Angular was chosen for Frontend development. I like it's dependency injection out of the box paradigm usage and clean modularity.
Web Sockets were chosen to automatically sync messages in all user-sessions.
- Persistent database for backend
- Pagination API of messages
- Message validation (value of fields, length of content and etc) and giving feedback to user
- Deduplication and periodic sync of messages in the front-end
- Tests (unit and integration) both for back and front
- Logs printing and collecting
- Tracing of calls