File APIs for Java Developers
The moose likes Distributed Java and the fly likes Java RPC options Big Moose Saloon
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Java RPC options" Watch "Java RPC options" New topic

Java RPC options

saloni Bachchan

Joined: Jun 08, 2012
Posts: 12

I am fairly new to java. Basically a C++ programmer.Have recently switched to java and need to implement something in my project.
My requirement is for a server to send some data continously to it's subscribed client and also to provide this data when clients request for it on adhoc basis.
I want to know what are my options with Java.
I hear thrift and google protobufs are the way to go these days but don't want to go for it just because it is popular.Want to first understand if it suits my need.
Performance is a key for my project so the data should be pushed to the client as soon as it is availabe to the server.
so communication should be fast.And the data in the server is updated every few milliseconds throughout the day.I am still unsure about the size of the data.
Can someone tell why thrift and google protobuf is better than java RMI or message queues(JMS QPID) for RPC?.I really need to understand why people use thrift etc instead of message queues,RMI.

Pat Farrell

Joined: Aug 11, 2007
Posts: 4659

Why do you want to do this?

In general, 99% of the time you think you want a Java RPC, you are better off not using an RPC at all.

Instead, send a message containing data, receive it, process it, and return results data in a message back.
saloni Bachchan

Joined: Jun 08, 2012
Posts: 12
Hi Pat,
Thanks .I have chosen JMS qpid with thrift serialization .
I agree. Here's the link:
subject: Java RPC options
It's not a secret anymore!