Looking for Guidance on Designing Microservice Architecture for My Uni Chat App

0
12
Asked By CuriousCoder123 On

Hey everyone! For my final year project, I've chosen to develop a chat application. While the idea seems straightforward, I've realized I don't have much experience with building microservice architectures from scratch. My background is quite limited when it comes to this topic, so I'm figuring things out as I go. I've tried making an architecture diagram, mapping out data flows, and designing databases, but I've hit a snag.

I've been reading about microservices and concepts like service decoupling and async vs sync communication. I get the individual concepts, but I'm struggling to wrap my head around what an effective architecture looks like for a small university project. I'm not asking for someone to design everything for me, but I would love some guidance on:

* Which **patterns** to utilize
* How to keep services **properly decoupled**
* Any **conceptual gaps** I might have overlooked

Even just 2-3 pointers would be super helpful. If you could share blog posts, articles, or real-world examples, that would be great too!

Currently, I'm confused about:

* How to store user data (like profile picture links, date of birth, etc.)
* Managing authentication and authorization across multiple microservices (I'm considering handling auth on the API gateway, but I need advice on authorization for individual services)
* Whether the auth service should hold user data or if other services need access to more than just user ID

Any tips or ideas for my project would also be appreciated. I apologize if I come off as a bit clueless; I'm eager to learn and really want to build this from the ground up and enjoy the coding journey!

Tech stack: Express, PostgreSQL, Redis, RabbitMQ, Docker

Services I'm planning: Initially thinking about 5-6 services, such as relationship tracking, presence service, authentication, logging, video calls, and media uploads. For authentication, I want to keep it super simple with JWT and user login via email and password.

3 Answers

Answered By TechieTina On

Building a microservices architecture for a project like this can be complex, especially if you’re a solo developer. Generally, microservices are more beneficial when multiple teams are managing different parts of a system. For a university project, consider sticking with a simpler monolithic approach. This way, you can avoid the complexities of handling authentication across services, which can be tricky even for experienced developers. Check your project guidelines; your write-up might contribute significantly to your grade, so you might not want to complicate things more than necessary.

Answered By LearningLarry On

I totally get where you're coming from. Combining a ton of different technologies can be overwhelming, especially if you're not sure why you're using them. Maybe focus on the core requirements for your chat app first—like real-time messaging—and then expand from there. Microservices can add unwanted complexity if you're not facing challenges that need them. A simple client-server chat app would be a great start, and once you're comfortable, you can gradually incorporate new technologies like Redis and RabbitMQ where they make sense.

Answered By DevDude92 On

You mentioned wanting to use Redis for tracking online status and managing video call states—that sounds like a solid plan. Just remember that the complexity comes from ensuring your services are appropriately separated and communicate effectively. Consider reading about Domain-Driven Design; it could really clarify how to structure your services based on your app's needs. Keep your architecture simple at first; you can always refactor or add complexity later as you grow more confident. You've got a couple of months to iron this out, so take your time!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.