DEV Community

Hao-Ming Hsu
Hao-Ming Hsu

Posted on

Scalable chat application in a microservices architecture

I'd like to share my side project:

This is a random chat application built in a microservices architecture. An user can pair with a random person and chat in real-time.

Image description

This project is built with scalability in mind. I used websocket for real-time messaging, Kafka for message Pub/Sub (to make chat service stateless), Redis for caching and user matching, Cassandra for message persistence, JWT & session for authentication, and gRPC for inter-service communication. Other common features like Google OAuth2 login, file uploads (object storage), observability (Prometheus & Opentelemetry), dependency injection (wire), CLI (cobra), and config management (viper) are also implemented.

I hope you will find this helpful. Any PR is welcome!

Oldest comments (3)

Sloan, the sloth mascot
Comment deleted
minghsu0107 profile image
Hao-Ming Hsu • Edited

Thank you. I am planning to add more advanced features such as message searching and video chat. Should you have any questions or ideas about the project, feel free to leave a comment or open an issue!

lexuanquynh profile image

I took a look at your source code and it's exactly what I was looking for.
However, it is difficult to implement it yourself.
I got some errors while deploying. Can you help?
error getting credentials - err: exit status 1, out: ``