NamrataS Sinha

Greenhorn
+ Follow
since Feb 19, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NamrataS Sinha

William Brogden wrote:1. You don't need to buy into the full JEE to get a JMS server - see the Apache ActiveMQ project and many other open source implementations.

2. An important distinction.

I also didn't understand the below line :-
Direct socket programming / RMI and web services require that both JVMs work together. Please elaborate..



For direct socket, etc. both JVMs must be devoting CPU cycles at the same time. A transmitting socket MUST have an active receiving socket. etc.

Socket to socket will always be the fastest - harder to write or alter, harder to debug, but fastest.

Bill



Hi Bill,

Thanks a lot for such a comprehensive reply.
It is very much helpful.



Regards,
Namrata Sinha
12 years ago

Bhanuprakash Sreenivas wrote:
You need to be more specific about your needs.
Like if it is a critical application , JMS would be a good choice.

Other options,

1. Avoid serialization since it will have compatibility issues .
One lightweight alternative you can explore is Google Protocol Buffers.

2 . Using a JMS should be an ideal choice based on how robust you want your applications to be.
But you need to keep in mind the following.
- Heavyweight , since it will be yet another process inbetween the two JVM process
- Need to use transactions to make it perfect.

3 . Expose as a webservice .



Hi,

Thanks for your reply.

Yes my application is a critical one. But can JMS be used for a stand-alone application? Please give me some reference that gives example of running JMS for non-enterprise applications.

Again web -services doesn't seem the solution.
Please suggest.

Regards,
Namrata Sinha

12 years ago

William Brogden wrote:Another high level communication approach is JMS Java Message Service - which requires a separate JMS server but has the great advantage of being asynchronous.

Direct socket programming / RMI and web services require that both JVMs work together.

Shared DB, shared file, JMS permit one JVM to drop off information which the other can pick up as it is convenient.



Given that Java was developed by a company whose slogan was "the network is the computer" it is not surprising to find so many communication methods.

Bill




Hi Bill,

Thanks a lot for your reply.
My application is a Core Java application. Is JMS suitable for it? I mean the JMS reuires a JMS server which is a part of EE server. Then is it suitable for my app?

I also didn't understand the below line :-
Direct socket programming / RMI and web services require that both JVMs work together. Please elaborate..

Yes Java has lots of method of communication between JVM to JVM. But, I want the method that runs for Core Java app . So please suggest such methods.


Regards,
Namrata
12 years ago

Ram Narayan.M wrote:If simply want two JVMs to be communicated, RMI is the best option.

"Socket Programming" is a raw mode which has to be dealt very carefully.



Hi,

Thanks for the reply.
Yes , socket programming is very raw form of communication in comparision with RMI.
But as my question is which method is the efficient one?
Please suggest.

Regards,
Namrata Sinha
12 years ago

Tim Moores wrote:

  • a shared DB
  • web services (arguably a higher form of socket comm.)


  • Hi Tim,

    Thanks for the reply.
    Web services requires an application/web server. But, Mine is a Core Java application.
    I don't know much about shared DB. Please refer some Links wherein I can find the efficiency of this method.


    Regards,
    Namrata
    12 years ago
    Hi,

    I am very new to Java Ranch. So please pardon me if there is any mistake in asking or selecting topic.
    I am trying to find out the most efficient way for communication between two JVM. I know that determining best suitable method is selected as per the requirement.
    In my case I want to allow two JVMs of Core Java app(Stand-alone/ non-enterprise app) to communicate.
    For standalone apps I found the below methods :
    1. Socket programming.
    2. RMI
    3. Sharing Files (File IO/ Serializing)
    Is there any other method available for stand-alone apps in Java?

    Please help me for judging the correct method.
    Quick response will be appreciated..


    12 years ago