Question

Hy. i want to make 1 multithreaded application probably in C# and other applications in probably in java. like 1 in C# and 99 in java. all the java applications will connect with 1 C# applications and the architecture will be of Client-Server Architecture. i don't understand how to enable them so that the C# application(Server) can communicate with the java application(Client)?

Was it helpful?

Solution

It depends up to you what kind of communication layer will you use.

My suggestion is as follows.

  1. Use some webserver like njetty on server.
  2. Then C# code will publish the response in the form of JSON
  3. Java clients can send JSON requests to webserver over http.

OTHER TIPS

There could be multiple ways to do that:

  1. Use Web services to communicate between applications
  2. Establish Communication via TCP Listner
  3. Use a third party Java .NET Bridge

You have to decide the protocol for communication. You can do socket based communication, you can go with Rest over Http.

In first approach, your server has to listen on socket and based on your own protocol, you can handshake with client and carry on communication using simple ascii text (which can be delimited,JSON, XML or anything you prefer).

In second approach you can deploy your server as web component and using http, preferably using Rest design client and server can communicate.

And if you have peace in life, than try Corba ;-).

Basically look for different RPC approaches.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top