Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added readme

  • Loading branch information...
commit 066382d2542ca06b8d5dcf0dd68e1bc6a39885c6 1 parent c0c890c
@tobi authored
Showing with 40 additions and 0 deletions.
  1. +40 −0 README.rdoc
View
40 README.rdoc
@@ -0,0 +1,40 @@
+== MessagePipe
+
+MessagePack (http://msgpack.org/) based high performance rpc layer with support for multiple transports (eventually)
+
+== Example
+
+
+server.rb:
+
+ class TestServer < MessagePipeServer
+
+ def add(a, b)
+ a + b
+ end
+
+ def echo(string)
+ string
+ end
+
+ end
+
+ EventMachine::run do
+ EventMachine::start_server "0.0.0.0", 9191, TestServer
+ end
+
+
+
+client.rb
+
+ client = MessagePipe.new(TcpTransport.new('localhost', 9191))
+ client.call :add, 1, 2 #=> 3
+ client.call :echo, 'hello' #=> 'hello'
+ client.call :does_not_exist #=> raise MessagePipe::RemoteError, 'NoMethodError: no method with name does_not_exist'
+
+== todo
+
+* improve file structure
+* implement EM based client transport
+* implement redis based client transport with delivery guarantees
+* allow calls to be async if transport supports it (will require you to call result.get to get the actual payload)
Please sign in to comment.
Something went wrong with that request. Please try again.