views:

36

answers:

1

Hi, I have a scenario where my server side java code needs to interact with an application on the client desktop. So I was researching on if there are any simple frameworks to enable such interaction, say using web-services or pure java-servlets. I could create one custom framework to enable this, but the technical challenge I foresee would be to figure out the URL (or the IP) to post the request to the client servlet. Any ideas or knowhow would be of great help.

Thanks Venkat

+1  A: 

The obvious solution is to make the client connect to the server. After the connection is established, the server can send commands to the client directly. But of course this is not easy to do using HTTP, because you need a long-running connection.

Lukáš Lalinský
My app has a browser client which posts requests to server java code. Server needs an interaction with an application on client desktop at some stage. Option-A:1. Client-browser submits service request to both server and client-agent simultaneously. Client-agent keeps a active connection with server.2. When it is time for server to interact with Client-agent, it does it through the open Client-agent connection.To make the HTTP connection from Client-agent live long, I don't know what to do, but long polling (comet push) seems to be an option.
venkata madugundu
Well, what I was suggesting was a non-HTTP protocol.
Lukáš Lalinský