2

I have a web application running on a browser window (thin client).

I want to send some information to this Web App (window already open) from an external application (thick client) without going through the server (client to client).

enter image description here

A solution that I found is the following:

  • The thin client is open in a URL : http://xx/index.html
  • The thick client opens a new browser window with the url http://xx/send.html?var=val
  • the new browser window uses "localStorage" to send var=val to the thin client.
  • the new browser window closes itself.

enter image description here

I have the following questions:

  • Is there a way to close the temporary window in FF, once it completes its purpose ? window.open('','_parent',''); window.close(); doesn't work anymore in latest FF versions.
  • Is there a way to use localStorage events in IE7- ?
  • Is there another way to do this ? (communication between the thick client and the browser).

Thank you.

Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
  • 2
    You could host a lightweight web service on the thick client. What language/framework is the thick client implemented in? – jevakallio Dec 11 '12 at 11:56
  • @fencliff it's a third party software. They can do some customization but not much. – Majid Laissi Dec 11 '12 at 12:02
  • Also the thick client needs to `push` the information to the WebApp.. so the WS in the thick client would not be lightweight enough – Majid Laissi Dec 11 '12 at 12:04
  • 1
    What methods do you have at your disposal when opening URLs from thick client? Can you control somehow opened window from thick client? Can you interact with window opened from thick client? On side note: +1 for implementing websocket service on thick client to which thin client would connect. – WTK Dec 11 '12 at 12:28
  • @WTK We could ask the thick client vendor to control the opened window (ie. close it), but how could they know that it has finished its purpose ? If they close it after a fixed timeout then: 1- maybe the window hasen't loaded yet 2- may be it has finished loading seconds ago and the user has been idle waiting for the window to close – Majid Laissi Dec 11 '12 at 12:37
  • for the websocket, don't we need a http server on the client's machine ? and that this http server should be able to send push messages to the webapp? – Majid Laissi Dec 11 '12 at 12:38
  • Websockets are designed to enable two-way communication so it would be ok for your case. That would require thick client to implement a server to which thin client would connect, yes. As to other possible solution (tmp window) - if newly opened window sets the data in local storage then it can be immediately closed, doesn't it? The data set is instantly available for other windows in same domain whetver it will be used or not is up to thin client. – WTK Dec 11 '12 at 12:51
  • I m talking about the sender only. Some clients use IE in a slightly old computers. I m not sure that IE would open and load as quickly as in other computers. For the socket solution, can a thin client (html, flex, ..) connect to a tcp socket ? – Majid Laissi Dec 11 '12 at 13:11

1 Answers1

2

If you do not want to modify the existing server, you could set up another web server that acts as a bridge between thick and thin client.

Think client would send information to the bridge server and thin client would wait for an update from the bridge server.

It is possible for clients to be interacting with more than one server at a time.

What kind of information does the thick client need to push to the thin client? Is it simple text or something more complex?

Arun Taylor
  • 1,574
  • 8
  • 5
  • it's just text, but the problem is that installing an intermediate server would require installing another thick software (tomcat server or so.. that would require a lot of deployment since there are hundreds of clients..) – Majid Laissi Dec 11 '12 at 16:08
  • Hopefully i m using flex and it has the ability to make tcp connections. So a lightweight java server would do it. – Majid Laissi Dec 11 '12 at 22:47