Hey everyone! I'm currently developing a personal project where I have a few microservices that need to handle similar functionality, specifically managing product images and user profile images using AWS. I'm at a crossroads deciding whether to set up a whole new microservice for this task or opt for a shared library instead. What do you all think? Are there any other strategies I might consider?
4 Answers
For a personal project, I'd recommend going with a shared library. It's a simple approach and it avoids the overhead of setting up another network service. Down the line, if your project scales, you can always convert that library into a microservice, but starting off simple is key.
That's a good question! But why are you considering microservices for a personal project anyway? Typically, you'd start with a monolith and break it down as you grow. But if you're eager to learn about microservice patterns and how to manage them, then go for it!
I think using a shared library is a solid choice, especially if your project is in the same programming language. Since you already have AWS services like S3, it seems efficient to leverage that rather than complicate things with a new microservice. Using an existing service can keep it straightforward.
I'd be cautious about introducing shared libraries without considering the implications. They can tie you down to certain technologies, which might limit your options in the future. Plus, think about ownership: who manages the shared library? If you can't open-source it, maybe it should just stay within a specific team. Sometimes it's better to allow teams to handle their own implementations rather than forcing shared code that doesn't add significant value.

I totally get what you're saying! I wanted to dive into learning about handling transactions and the patterns involved. It seemed like a good challenge!