0

My question is about application architecture in .NET World with reference to Containers.

I went to a local .NET Development Meetup where the guy showed how to re-architect our application to fit all components into separate containers. I liked the idea, came home to realize that how the communication part plays out in all that.

Here is something he scribbled. Each bubble represents a container. App design with components moved to their separate containers

Now here is the million dollar question. My app is an ASP.NET MVC Web App, Business Logic and Data Access Layer are DLLs referenced by the app. Other then creating a REST endpoint on each depended-upon layer; I don't see no other way my DLL could be running in a separate container and referenced across Container Lines. Is there a way/framework provided by .NET to accomplish this easily?

fahadash
  • 3,133
  • 1
  • 30
  • 59
  • Microservices generally aren't set up like shown in your diagram. Instead, each service generally has everything within it needed to perform its discrete role. Just because you saw a presentation where they promoted this architecture doesn't make it fit for your application. – mason Jun 01 '17 at 12:16
  • I think you could use some sort of RPC between nodes, with a router in between and all your services connected to it. Take a look at [WampSharp](https://github.com/Code-Sharp/WampSharp) – Philippe Paré Jun 01 '17 at 12:18
  • So you will have to setup several microservices and configure interaction between them somehow, all that for basically no reason in this case. – Evk Jun 01 '17 at 12:26
  • @Evk So what are some of the good use case candidates for Microservices? – fahadash Jun 01 '17 at 14:38
  • It's hard to describe in a comment. You can just read various descriptions of this architecture pattern, for example: http://microservices.io/patterns/microservices.html – Evk Jun 01 '17 at 14:44

1 Answers1

1

You are right, you will have to build a small REST-Api or RPC to talk between you components.

But I think your going to granular with containers. Think App as your frontend layer so only HTMl/JS/CSS stuff, you business layer is an standard CRUD rest api and last you have your database in it one container.

With MVC then you only need an App+BL container and database container. Or more if you want to break up your business logic in several microservices in there own container.

However few setups needs containers and you should do some research to see if your solution need to use containers. The thing containers are best for is to separate apps so that several apps can share a server and not interfere on a system level.