Answer the question
In order to leave comments, you need to log in
How is interaction with hardware done in microservice architecture and Docker containers?
In complex systems, situations often arise when it is necessary to integrate with some kind of external hardware, such as bank terminals, scanners, printers, telephony, POS, etc.
How is such interaction provided in a .NET-based microservice architecture when hosted in Docker containers?
For example, when picking an order, you need to print documents. .NET Core does not support System.Printing and System.Drawing.Printing. You can use the .NET Framework, but Windows Docker containers don't support the spooler service!
Another example: to communicate with a bank terminal, you need the ability to interact with COM / USB ports, but again, Windows containers do not have this.
What is usually done in such cases? Do they host everything except hardware-specific code in containers, and do the services that interact with the hardware deploy to the host itself?
Answer the question
In order to leave comments, you need to log in
COM, USB, printers and some specific hardware for terminals - the part where the code must be, by definition, hardware-dependent. Containers are about the diametrically opposite, about abstraction from hardware and the environment. Those. write software for a specific piece of hardware and run it in a container, it's like in a story about a microscope and nails.
You have drawn the right conclusion. It is necessary to take out only logic independent of any hardware or equipment into containers. And the services that interact with the hardware should be deployed where the hardware is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question