
Ask HN: What are modern architecture patterns for desktop applications?
by brushyolaf on Hacker News.
I built a web based prototype for an application using a Docker microservices architecture:
postgreSQL, redis, traefik, etc. – the regular stuff – which works great.
Now, the application’s usecase is actually better suited in a offline environment with a standalone executable,
and I’m struggling to make this transition. (How does the app work?
Think of the application as a file indexing system: you specify a folder on your local hard drive and the program will analyze the files (might take up to 30 minutes) and store metadata for it in a search-optimized datastructure.) From what I understand most applications also separate frontend and backend layers and let the processes communicate via message passing
over some form of channel and protocol. The solutions I found include Unix Sockets with gRPC (https://ift.tt/LWSoPDM), local HTTP Servers with a REST API or gRPC, even
JSON over stdin/stdout (https://ift.tt/hcZIqy2).
Solutions for datastorage include custom file formats, sqlite databases or bundled mongodb instances into the main application. I figured out the backend part with analysis running multithreaded and writing into a sqlite database.
For the IPC I spawn a gRPC Server which clients connect to over HTTP/2.
That way I compile a platform agnostic backend and platform specific frontends.
It all works okish but I feel like it’s unnecessarily complicated and there could be a common strategy I am missing. *TL;DR: What are modern architectures for desktop applications equivalent to a microservice architecture with backend/frontend separation, message queueing, pub/sub, authentication, …?*
