• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

communicating between instances - RMI JINI other?

 
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

So over Christmas I'm having a dream about building a big platform that includes multiple JVM server instances each dedicated to serving a set of clients each associated with an instance (tenant). There is also sharing of resources across instances (tenants). I'm envisaging the whole platform to be Java based.

I'm reading about RMI (HF Java book) which sort of looks like it can do the job, but then I read it can be brittle, it's a bit centralised, client server rather than peer to peer etc. On javaranch there  this thread with a comment from Claude Moore that.

Whenever possible, I'd stay away from RMI. It's brittle and difficult to scale, so I'd search for another approach.



My vision looks something like this diagram below, what sort of technology should I be reading up on to work towards this?


thanks
 
Saloon Keeper
Posts: 26267
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RMI is about one step above raw sockets when it comes to inter-VM communications. It's the underpinning for the remote access part of Enterprise JavaBeans, but it's not popular for direct use any more. And it is brittle in the sense that only JVMs can use it and not non-Java apps and that unless the JVMs are compatible versions, the data transfers will fail.

In many cases, a cluster will be a web services host. In that case, the client/server connection will be http, the protocol may be ReST and the inter-connections come more in the form of shared backend services (such as databases).

However, there are certainly many non-web services that a cluster can provide as well. These days an MQ service is popular for inter-service communications. RabbitMQ, for example. Unlike RMI, MQ is tolerant of server failures and it allows Java and non-Java services to communicate freely.

Incidentally, back in the previous millenium the Big Thing was CORBA, which provided objects with language-independent inter-machine communications. CORBA, however, is dead now.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim, it looks like MQ might be the best to contemplate. I don't think I will be implementing. I am programming for distinct tenants and plan to have a single object for transferring between tenants in a single instance, should this ever proceed beyond a folly, and implementation can then be done for transferring across instances

IMQ seems a straightforward concept, while I'm sure in application it is elaborate.  The IBM MQ Wikipedia page states that there are three main components: Message, Queue, and Queue Manager, which is easy to understand. Also interesting that it has been around since 1993, much like RMI. However MQ seems have been paid more attention since that time and evolved. Although attention can be bad as a framework can go crufty, perhaps that's what happened to Cobra.

Can anybody recommend a book?  I find it difficult now that HF is not doing much stuff.



 
Tim Holloway
Saloon Keeper
Posts: 26267
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happened to CORBA was the Internet. CORBA was not firewall-friendly. Also, API's over slow transmission media was a killer.

MQ, on the other hand, is not intended for use on the open Internet, but unlike CORBA, it's a service that's firewall-friendly and easily discoverable. Its main home is in connecting heterogeneous components which may go online or offline without notice.

Take for example the OpenStack cloud. An OpenStack instance consists of Compute Nodes, Storage Nodes and Control Nodes. It contains services for multiple virtual private networks. It has a central authentication and authorization system, load balancing, performance monitoring and elastic services. Rather than run dozens of different private protocols to co-ordinate all this, MQ provides the glue that holds it all together. And since MQ is a standard, you can pick the MQ server implementation you want. The default is RabbitMQ, but it's not the only one that OpenStack supports.

If I haven't lost myself, I believe that JMS overlays on the MQ protocols, although JMS is java-specific whereas MQ is language and hardware neutral. A lot of OpenStack is in Python, Ruby, JavaScript, Go and maybe one or six other languages. It's been a while since I had to peek under the hood there.

Beware of IBM and "MQ" though. They adopted it to products that have little or nothing to do with actual MQ messaging. For example, when they renamed WebSphere to WebSphere MQ.
 
Tim Holloway
Saloon Keeper
Posts: 26267
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Incidentally, I generally like to start from the Wikipedia: https://en.wikipedia.org/wiki/RabbitMQ

Within the Wikipedia, you can chase links ("executive summaries") to things like JMS and AMQP.

Then when you want to play around with specifics, go to the rabbitmq home page and look up the tutorials.

RabbitMQ is one of several open-source MQ systems (another is Apache QPid). However, like many widely-adopted open-source products, it has a commercial owner, which is Pivotal Systems, a well-known name. Actually I think Pivotal just got eaten by VMWare, but I may have them confused with another company.

There's tons of books. From O'Reilly, Manning, Packt, and more. And I think that this one might be especially interesting to you: https://www.apress.com/gp/book/9781484229842
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for this rich response Tim, I was obviously suckered by IBM's re-branding of Websphere, and JavaRanch is great for avoiding such rabbit holes.

There's a lot in this question and you've addressed what's on my mind

... Compute Nodes, Storage Nodes and Control Nodes. .... a central authentication and authorization system, load balancing, performance monitoring and elastic services.



I don't intend to become an expert in these, but I need to program towards them should my idea fly.

Acetozi's book is in my cart, I'll read that concurrently but on a slower thread to the React books in the mail.

 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic