简体   繁体   中英

How can I create processes in a microservice architecture or achieve similar design

Currently I have a MVC Web application which is hosted on IIS on a windows server in Azure. On the same VM, I also have a console application (MyConsoleApp.exe).

The Web application is aware of the location of the MyConsoleApp.exe. Through the Web application, I can create and kill processes. Every time I create a process through the UI, the Web application will create a new process running the MyApplication.exe. The process information is logged to a SQL database (PID and GUID) and then through the UI I can decide to kill the process or fetch information each console app has logged.

The diagram below shows the architecture with 3 processes created running the console app. N number of processes can be created. This is just an example.

在此处输入图片说明

I would like to transform my applications into microservices using .net core, and I am also replacing SQL with Mongo.

My question is, how I can replace the part where I create separate processes through the Web app? The Web app as a microservice will run on its own container. I was thinking of spinning up containers remotely, to imitate what each process is currently doing, but it sounds awful.

Could you please suggest an architectural solution or design I could consider implementing?

My vision is something like this, but the processes part is troubling me.

在此处输入图片说明

This sort of thing is usually accomplished by spinning up workers at then end of a queue. This is detailed in Microsoft's Reference Architecture where they talk about Function Apps .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM