4

Im developing a system with a windows service and a front end UI for configuration and controlling the windows service. Ill be using .net 4.6.

The service will be spawning multiple servers which the user can create, start and stop via the UI.

Researching the best way for my UI to control my service and receive status information from the servers.

From my research these are what ive found:

  1. SQLITE - Create a message queue which the UI writes commands to, servers will read periodically and respond with another message queue. Not ideal as its not live and requires a polling system.

  2. Named/Anonymous Pipes - Live request/response. Works, but its a bit clunky when it comes to dealing with multiple clients communicating with a single server.

  3. WCF - Live Request/Response. Nice and easy to implement except the user needs to worry about configuring a valid port for the system to run on.

  4. Roll my own communication protocol- Live request/response but same issue applies to picking port numbers.

Anything else im missing with todays technology?

CathalMF
  • 9,705
  • 6
  • 70
  • 106
  • How about a message queue? There are pletny out there - MSMQ, AMQ, RabbitMQ are just the first three that poped in my head.... You can use SignalR for light weight messages as well. – Zohar Peled Feb 02 '17 at 10:57
  • @ZoharPeled Thanks, ill look into those. – CathalMF Feb 02 '17 at 10:59

3 Answers3

1

since we are listing all options, how about MemoryMappedFile in combination with a EventWaitHandle

https://learn.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files

https://learn.microsoft.com/en-us/dotnet/standard/threading/eventwaithandle

MemoryMappedFile + EventWaitHandle compared to WCF

https://www.techmikael.com/2010/02/blazing-fast-ipc-in-net-4-wcf-vs.html

Jinjinov
  • 2,554
  • 4
  • 26
  • 45
1

Signalr and OWIN/Katana

https://learn.microsoft.com/en-us/aspnet/signalr/overview/deployment/tutorial-signalr-self-host

Do simple HTTP POST/GET request and response, with Signalr you can do real-time publish/subscribe. See link for good introduction.

Neal Davis
  • 648
  • 6
  • 21
0

I actually didnt realise that named pipes can be used with WCF. Found this post which is ideal. Very easy to implement and the user doesnt need to worry about selecting IP ports etc.

https://stackoverflow.com/a/7833188/1680271

Community
  • 1
  • 1
CathalMF
  • 9,705
  • 6
  • 70
  • 106