How do I communicate between an application (console or service) and a web service?
I have the following situation:
-
Windows service that compresses data and maintains a data structure that represents statistics, and such
-
Simple REST web service (asp.net webapi)
I would like that, given the web request handled by the mvc.net webapi controller, the returned data is provided by a Windows service.
To put it simply, I would like not to use the database just to transfer data from the Windows service to the web application controller.
The reason is performance, as it is live data and a rather large sum of it, so I want to avoid reading bottlenecks in the database in real time ...
Is it possible?
Is Redis the only option?
I would surely appreciate a ".NET" way of caching data between applications rather than running an Ubuntu machine through VirtualBox with a Vagrant setup ...
Thank!
source to share
I finally went to Redis, thanks to Mati Tsicero, it looks very well suited for real time needs.
I need to use ServiceStack , since I am in C #, my only disappointment is that the setup could have been easier (Ubuntu server for Redis running in VirtualBox).
And I hope this setting can be stored in production (Win Server for C # parts + Linux Server for Redis) ...
source to share
Since data can be recovered, you can try fast, non-persistent NoSQL storage.
Better yet, there would be no shared data. Make a call to a web service on Windows Server to request only the data it needs right now. Maintaining general state (eg in a database) is cumbersome. If possible, I will avoid it entirely.
A very fast IPC mechanism would be WCF over named pipes.
source to share