What I'm Trying To Do

Develop a C# WPF Windows application that can send and receive data to other WPF applications using a central web server running CentOS 6 Linux with MySQL. The WPF client must be able to send a message to the server, and must be able to listen to the server in real-time for messages and display them as soon as they're posted. The server-side program should be capable of parsing some of these messages into .NET data objects, and should be capable of broadcasting messages to all clients or just a specific one. If a client receives a certain message, it executes a method on the local application.

Also, if the server program could handle requests from a mobile app (Android app to server - server to WPF client & vice-versa) as well as WPF clients, that would be highly preferable, but not necessary.


Server (Linux VM in Texas)

Admin Client (user in California)

Client 2 (user in Florida)

Client 3 (user in New York)

  1. I send a "hello" broadcast from my computer, Admin Client, to Server.

  2. Server receives message and broadcasts "hello" to all listening clients.

  3. Client 2 and Client 3 show "hello" on their clients and respond "hey!"

  4. Server receives "hey!" messages and sends both to Admin Client.

  5. I send a message "open sesame" that executes RunOnMagicWord() method only on Client 2's application, and does nothing to Client 3.

  6. Client2 runs RunOnMagicWord() and sends "done!" message to server after method executes.

  7. Server receives "done!" message and sends to Admin Client.

What I've Looked Into

  • WCF Service
  • PHP Scripts
  • SignalR

I'd strongly prefer to keep everything in C# .NET including the server-side program, so that data sent between clients and to the server can be serialized easily (and so I don't have to learn any new languages for this project). SignalR seems to be closest to what I'm looking for, but it seems to me it only plays nicely with IIS and not Apache/Linux.

My Question

I don't have the option of changing the current Linux server to IIS, so am I headed down the right path looking at using something like SignalR? If so, how do I get it to run on my CentOS server? Or is there a better way altogether of a Linux/MySQL server providing this kind of real-time messaging functionality to WPF clients?

Thank you very, very much for your input!

Related posts

Recent Viewed