Hi guys I'm using java RMI to make a p2p chat with leader election. The first step that I have problems with is that I just want to make every client a own remote object so they can communicate with eacother through rmi but I don't know how to do it. Here's my code if someone wants to try to get me on the right track:
RMI is not a good fit for implementing a P2P solution due to its client/server nature. Have you looked at technologies like Apache River? They'd be a better fit due to their P2P architecture.
posted 4 months ago
Tim Moores wrote:RMI is not a good fit for implementing a P2P solution due to its client/server nature. Have you looked at technologies like Apache River? They'd be a better fit due to their P2P architecture.
I have to use RMI for this homework... which I have a lot of troubles starting with :/
No, if you have a collection of peers who directly communicate with each other, that's NOT a client/server architecture. And it's not suitable as such for RMI.
RMI is a client/server architecture, so every client must communicate with a server. To do anything resembling peer-to-peer broadcast, each client would itself have to be an RMI server.
RMI can function as a chat server, in the manner of a classical Internet Relay Chat but the clients would all have to log into a central RMI server, and that server would then have to echo (relay) everything it received from one client to all the other clients.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.
Trust God, but always tether your camel... to this tiny ad.
Create Edit Print & Convert PDF Using Free API with Java