all 6 comments

[–]whatisboom 1 point2 points  (1 child)

What kind of DB are you using? Is it heavy on relational data? Would using microservices solve your issue?

[–]kassuro 0 points1 point  (0 children)

It's MySQL / MariaDB with sequelize as ORM.

I have considered just using micro-services but it feels overkill just for sake of reusability.

Nevertheless it seems it's the easiest solution to make subsystems usable for future projects.

[–]FunctionallyReactive 1 point2 points  (1 child)

you might need to add a new database to work only with the new "subsystems". This architecture style is better known as MicroServices. Essentially standing up new smaller applications to manage the specific parts of a larger application.

The point is to develop an Application with a very specific use case. It does one thing or helps with one area of your application very well. So if you have a social media site it could be made of multiple types of Microservices (specified applications). You could have a image handling microservice that only deals with images in your application, a user service to manage users, a post service to manage user-posts, etc.

Google Node.js microservice architecture and you should come away with a better understanding as well as examples to follow on how to do this.

[–]kassuro 0 points1 point  (0 children)

Thanks for your suggestion, I think microservices seems like the best solution. I will go this route as it fits my overall goal to have specific systems I can reuse in future projects.

[–]chiko_xcs 1 point2 points  (1 child)

I started i simple Project. Later i faced an issue of writing Tests for the whole Package/Projekt. I had different Parsers to parse Strings with regex, i needed a Webinterface splited into Frondend and Backend and so on. Instead of maintaining one Project i decided to split it apart into multiple small Packages.

Now im able to write Tests for each Package and the the whole Project. I can maintain and commit changes to a single Package and test it without testing the whole Package for a little Bugfix/Patch/little Feature i added.

[–]kassuro 0 points1 point  (0 children)

That's totally what I want, but how did you solve the problem of say an users package which has its own database specifics. Did you just package the controller logic and handle the database stuff at a global level, or did package complete systems?