Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a desktop application have a microservices architecture? [closed]

Can a desktop application based on a monolithic architecture be converted to a microservices architecture? I can only find articles on web applications using microservices architecture. Does that mean desktop applications cannot use this architecture?

like image 803
a21a Avatar asked Jan 23 '20 05:01

a21a


People also ask

Should microservices be exposed?

Security issues: Without a gateway, all the microservices must be exposed to the "external world", making the attack surface larger than if you hide internal microservices that aren't directly used by the client apps. The smaller the attack surface is, the more secure your application can be.

What is a disadvantage of a microservice architecture?

Although microservices offer many advantages, they also come with a higher degree of complexity. This complexity can be a major challenge for organizations that are not used to working with microservices. Additionally, because microservices are so independent, it can be difficult to track down errors and resolve them.

When should microservices not be used in architecture?

You might stick with a traditional MVC-omatic templated app for that one. There are also times when microservices just don't make sense. There may just be no way to split up business logic into a subset of services cleanly without so much functional service coupling that it becomes a monolith.

What is a notable disadvantage to using microservice?

What is a notable disadvantage to using microservices? There is the potential for too much granularity. Complex testing is required. Latency issues can occur during heavy use.


2 Answers

In general, technically there is nothing that can stop you from using microservice architecture for any kind of applications, however when you go this path (like any other architecture actually) check what are benefits of microservices architecture and whether it makes sense at all in your application.

In my opinion, it doesn't make sense, and here are some thoughts that illustrate why do I think so:

  1. Micro-service architecture will almost certainly mean many processes

So is it a good approach to keep many processes for the desktop application? Will your customers be happy to use your application with many processes?

  1. Micro-service architecture usually means that various parts of the products can be developed, tested, and most important, updated in production independently.

On server side it shines, however does it make sense on desktop? I personally doubt it, however you should answer to yourself

  1. Micro-service architecture assumes that the different parts interconnect with each other. This can be HTTP (any other socket based protocol) for synchronous communication, Messaging systems for async communication and so forth.

If you go sockets - will you expose ports for communication? If you install this desktop application on client machine that have security policies (firewalls, etc.) will it work at all?

In case of messaging you'll have to use some messaging middleware, which is almost never a good idea to install (these tools work good on server with an appropriate hardware).

  1. One of the big selling points of microservice architecture (as opposed to monolith) is scalability. In theory you can scale out any specific part of your application (implemented as a microservice) independently of others. In other words - you can say: "this microservice" is under high load (or whatever other reason) so I would like to start 5, 10 or 100 instances of it.

Is it applicable in your desktop application at all?

So again, think what will be the best for your customer, for your application and for you :) and chose the correct architecture.

like image 79
Mark Bramnik Avatar answered Sep 28 '22 00:09

Mark Bramnik


It certainly could be, since Windows has services, Linux has daemons and so on, and you can arrange things such that different services talk to one another via an internal network or some other mechanism depending on what is appropriate. However it's another question whether or not it is appropriate/a good idea to do so. Microservices are typically likely to make a lot more sense as an architecture for a web application. There typically is a cost with microservices in the form of looser coupling between components. Strict typing within an application will ensure messages between parts of the application are correctly formed. That is harder to ensure with services that may be compiled separately from one another and communicate via a more indirect mechanism.

like image 24
see sharper Avatar answered Sep 27 '22 23:09

see sharper