In conclusion: pick your platform and your devops first. Depending on how you plan to scale your services, "solution-per-service" may not be an option (for reasons outside the scope of this answer). ![]() ![]() The Visual Studio solution has to be tailored somewhat to accommodate these dependencies. In Service Fabric, an "application" hosts a "service" (I encourage you to read more about the nomenclature if you are interested in this option). However, we ended up choosing Service Fabric, which impacted our decision. Had we settled on Docker Swarm or Kubernetes as a platform, I think this "solution-per-service" decision would have worked out fine. This gave us the flexibility to keep services on old versions of libraries if necessary. "Core" libraries were then hosted via internal nuget feeds for consumption by any service. Any common "core" libraries also had their own solutions. Initially, we decided one solution per microservice was the best way to go. We ultimately found that decisions made about the devops pipeline and the microservices platform will likely dictate how the Visual Studio projects and solutions are organized. I kind of feel like I'm in somewhat uncharted territory here and would appreciate some guidance! Is it best to organize the source in namespaces and folders that respect the logical divisions of microservices? Should each microservice have its own solution with each of the prescribed DDD projects? Should we "move up a level in the tree" and create a solution for each node in the DDD structure, then create individual projects for each microservice? Deploying each service with a 10mb "Domain" DLL filled with assemblies it will never load is not desirable. Obviously we want the deployment process to be as uncoupled as possible. We're also foreseeing some troubles with deployment in the future. It describes independent problem areas as Bounded Contexts (each Bounded Context correlates to a microservice), and emphasizes a. In the context of building applications, DDD talks about problems as domains. Another example is our domain entities: a "member" entity may have different meanings (and even different structures) depending on its microservice context. Domain-driven design (DDD) advocates modeling based on the reality of business as relevant to your use cases. Maybe this is okay, but it feels like there's not an organizational separation between microservice contexts. Presently all of those handlers are just dumped in the same "Handler" folder/namespace within "Domain". However, we're finding that the domain and infrastructure projects aren't doing a good job of organizing each microservice logically.įor example, we have the notion of a "domain event handler" that does some work when it receives a message. Presently we're using the Implementing Domain Driven Design folder structure to organize the source files. We're starting to refactor one of our major products to a more microservices-oriented architecture.
0 Comments
Leave a Reply. |
AuthorJimmy ArchivesCategories |