• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Data Push

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I would like to know about any open source api that can allow my to push data to my UI from the server whenever changes are made to the database.
I think one way to do that is using ajax and if i am not wrong the IE uses activeX control to make the ajax work. Our client dont want to have any extra activeX plug-in to make the ajax work. So i am just wondering that is there any other way to achieve the same thing.

Thanks.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn't matter how you wrap things, web applications are request-driven; HTTP was never intended to support push from server to client.


I think one way to do that is using ajax and if i am not wrong the IE uses activeX control to make the ajax work.


You are wrong . Its the XMLHTTPRequest object that the browser uses. That aside, AJAX is still a request driven solution, because it is HTTP based.

Browser based technologies are not really suited to this, with the exception of stuff like Applets, ActiveX, and Flash. However, if you use this sort of thing in a browser you have to consider ignoring the browser altogether and just writing a fat client.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do a couple things with AJAX. One is to periodically poll the server for new stuff. That's not really push, it's not immediate and it can add a lot of traffic to your network and server. Another is to make an AJAX request that doesn't respond right away ... the server just sits there until it has something to send you and then it responds. This is pretty near push, but it eats up server resources. In my world - lots of users, lots of traffic - I wouldn't do either of those.

What I have done is an applet that opens a ServerSocket and registers its address with the server at logon. When the server wants to push data it looks up the address and does connect, send, disconnect like any other socket client. True push, very little overhead, connecting is a bit slow if the server wants to send to 10,000 users, the applet requires a JRE and a security file. Not practical on a public site, but works in a corporate world with total control over the workstations.

Any of that illuminating?
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic