I am creating an application in Windows OS using WPF (C# as code behind) with the data stored in the Unix machine which is in the same network. My app needs a way to communicate with the Unix machine to get the data from it and show it on windows UI (created in WPF).
My app will also need to know all the Unix machines connected in the network via broadcasting.
What is the best way to connect to Unix machines with my WPF application for the above mentioned requirements?
If the data you want to use is file based, you could use an ftp or samba servers on unix. One of the advantages of samba server is that it has an ability to broadcast and allows discovering of its resources in the network through netbios. This will comply with your broadcasting requirement.
If file based storage is not enough, consider a web service. Since you are writing an application in .NET it will be easiest for you to use Mono on the Unix side. You can write a web service in Mono http://www.mono-project.com/Writing_a_WebService that will listen to requests from your WPF application.
I admit that this solution is not the best in terms of performance, scalability and portability, but it’s the quickest for a .net developer.
The other requirement concerning that your app needs to know the list of unix machines is more complicated. Brute force approach would be to have a master server that will listen for notifications from unix machines when they come to life. It will give that list to the WPF client.
If you want to go for a more performing, portable solution and you have more development resources, you can implement a restful service on the unix side with one of these frameworks REST frameworks
The most complex approach in terms of development time is to use bare TCP ip. That will require a lot of coding on both client and server sides and a long process of making it stable. Again it depends on how complex your data interaction is going to be.