Can a desktop application have a microservices architecture? [closed]
Asked Answered
L

2

12

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?

Lexeme answered 23/1, 2020 at 5:4 Comment(5)
does your desktop application uses web services? And why you need microservices?Niela
Perhaps better asked in some other place: meta.stackexchange.com/questions/124867/…Quirites
Please provide an example. This will give more insights to the question. Come to your question, any application which is monolith can be converted to microservice, it is all about how much feasible it is.Manhunt
I'm just doing research into this so I just wanted to know if this could be applied to desktop applications.Lexeme
possible duplicate of #46452044Bandsman
N
16

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.

Novel answered 23/1, 2020 at 6:4 Comment(0)
D
2

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.

Dorran answered 23/1, 2020 at 5:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.