• 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

RMI or HTTP

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
We'r currently developing an applet that will use an application server to get its data. The program will only be used internally.
Now we have to possibility to connect directly from within the applet to the AS, or access intermediate servlets (that are generating xml files)..
What should we choose? HTTP has an advantage that it's very stable and works well even when traffic is slow... I'm not sure how RMI reacts with a heavy loaded network..
Any thoughts?
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there is not going to be firewall in between an applet and data source I would go with RMI. It is faster, simpler to pass parameters forth and back (you don't care about serialization etc, just pass the reference), you can have callbacks, i.a. app server or whatever is the data provider, can push data to the applet. However, if there is firewall there is no sense to use it.
 
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know this probably doesn't need saying, but...
Whatever you do, make a careful decision, as this decision will impact your project's long-term usability. RMI is Java-specific, while other techniques like Web Services are generic and standardised. Can you be 100% sure that you'll never want to talk to a non-Java app? And that your security guys will never demand a firewall?
As pointed out, there are always trade-offs. Web Services are (is?) notoriously slow as data formats (endian issues) have to be normalised, and HTTP/SOAP is a fairly verbose format (is this correct? I think so
If I were you, I'd try to abstract the interface away from the particular technology, and make it so that changing from (say) RMI to Web Services is as simple as changing a factory method. I'm thinking something like the Bridge / Abstract Factory patterns.
Of course, given how different RMI and WS are, this will probably add significant work to the project. It's all about the trade-offs, hey?
Cheers,

--Tim
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic