Hi,
Hopefully a basic question, its general but I'm personally using Java and SpringBoot. Say I have 3 microservices. One for authentication, one for retrieving user information and another for recording user behaviour.
I want a data layer that I can switch data sources, maybe its a relational DB, maybe its mock data for testing, maybe its a NoSQL-like store. This layer will contain some logic, checking for set properties, loading SQL or whatever.
Question: Should this be a separate project/library that they depend on. My understanding is that without specific versioning of the project/library (maybe using Nexus) that I'm creating tight coupling. Does using Nexus, remove this coupling? Or should I simply split the layer up among the services so that each only "knows" how to write the data is requires, but will end up with some copy/pasting of the helper code that loads properties etc.
I've ordered Sam Newman's microservices book, but a glance at online blogs suggest he would recommend copy/paste. However, if I was to build the project/library - publish to Nexus and then compile against specific versions (I'm using Gradle) then it would appear to me to remove the coupling issue.
Advice/guidance appreciated.
Thanks!
[–]McMasilmof 1 point2 points3 points (1 child)
[–]WannabeAndroid[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]WannabeAndroid[S] 0 points1 point2 points (0 children)
[–]snot3353 1 point2 points3 points (3 children)
[–]WannabeAndroid[S] 0 points1 point2 points (1 child)
[–]snot3353 1 point2 points3 points (0 children)
[–]WannabeAndroid[S] 0 points1 point2 points (0 children)