MessagePack-RPC for Java 0.3.0 is released!

Today, I just released the MessagePack-RPC for Java version 0.3.0!

The main change is, supporting the UDP protocol. The following is the example codes.

UDPClient

        EventLoop loop = new EventLoop();
        try {
            Client c = new UDPClient("localhost", 19850, loop);
            try {
                Object o = c.call("intFunc1", 1);
                int val = ((Number)c).intValue();
            } finally {
                c.close();
            }
        } finally {
            loop.shutdown();
        }

UDPServer

class ServerTest {
    public int intFunc1(int a) { return a; }

    public static void main(String[] args) {
        Server s = new UDPServer("0.0.0.0", 19850, this);
        s.serve();
    }
}

Replacing “UDP” with “TCP” will work for the TCP Client/Server. Thanks to JBoss netty, it was really easy to support two different transports.

The next tasks are running the more serious stress test for the stability. And also, thrift-compatible IDL support is under development!

Looking forward to integrate into the real applications:-)

Advertisements

About kazukiohta

My Twitter account is @kzk_mover.
This entry was posted in Java, MessagePack-RPC. Bookmark the permalink.

2 Responses to MessagePack-RPC for Java 0.3.0 is released!

  1. Trist says:

    What about using message pack to communicate from a Java EE (JBoss in my case) server to rich clients? Have anybody worked on a Java EE connector for MessagePack-RPC?

    /Trist

  2. Hey kzk,
    really nice work! Can’t wait to try it out and see the performance difference with thrift. I just had a small question. I understand the server is based on Netty and is thus purely async, but what about async clients? Do they use threads per connection under the hood or are they also purely async with a Selector like approach using nio?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s