• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

pushing data to a browser using an applet

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My company is embarking on a full scale Java conversion from our existing MS software. I have the task to do some initial research while also learning all about Java and the many technologies associated.
We are developing a thin client architecture where our agents can log in from anywhere and do their work. While agents are logged in, we need to send realtime updates to their browser from the server (like a phone call coming in). These updates are pushed to the browser, not requested.
We have ruled out doing a timed refresh from the browser as this is wasteful and not as timely as we would like.
My current research has led to a socket based solution where we download an applet to the browser. The applet then makes a socket connection back to the server which we can use to send data to the browser (this may get tricky with firewalls). Now the tricky part... we want to use portlets and JSP for most of the UI. Portlets are server side and sort of like servlets. I am kinda stuck on how to go about integrating the realtime needs done through the applet with the server side portlets.
Any opinions or ideas on this approach, alternate ideas, better technology, whatever would be greatly appreciated.
thank you,
Neil Goldsmith
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The #1 problem with this is that if your users are travelling to locations with firewalls - or are setting up firewalls on their own and machines don't userstand nonstandard services, you may find that your socket pipeline will be blocked.
I have doubts about trying to use the Internet as a telephone ringer - unless you're also making the call over the Internet. Paging's OK, but for a ringer, I'd recommend a cell phone. Just about any other "real-time" event I can envision could probably wait 15 seconds or so (they'd almost have to, since the timing on the Internet isn't all that tight).
Unless you expect to commonly have 1500 users or so concurrently on-line, polling's probably not going to kill you if you keep the poll rate down. I'd try a pilot project and stress it a little.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have been developing a browser version of a Java application that simply replaces the swing GUI with DHTML/Javascript/HTC code (running only in Internet Explorer 5.5 and up). We are using the same jar file as the application with a switch that bypasses the Swing GUI and passes data to the Javascript as XML via a single interface class that is a subclass of applet. We are using JSObject as the communication class. JSObject can be found in jaws.jar - a jar file I'll bet you can find on your machine. The browser can request data from the applet or the applet can push data to the browser. The javascript routines parse the xml and update the innerText of the HTML components.
 
Get off me! Here, read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic