Fetching contributors…
Cannot retrieve contributors at this time
72 lines (42 sloc) 1.35 KB


By Tom Preston-Werner (

BERT-RPC client library for Ruby. Makes it ridiculously simple to interface with BERT-RPC servers.

See the full BERT-RPC specification at

This library currently only supports the following BERT-RPC features:

  • call requests
  • cast requests

BERTRPC was developed for GitHub and is currently in production use performing millions of RPC requests every day. The stability and performance have been exemplary.


$ gem install bertrpc -s


Require the library and create a service:

require 'bertrpc'
svc ='localhost', 9999)

Make a call:, 2)
# => 3

The underlying BERT-RPC transaction of the above call is:

-> {call, calc, add, [1, 2]}
<- {reply, 3}

Make a cast:

# => nil

The underlying BERT-RPC transaction of the above cast is:

-> {cast, stats, incr, []}
<- {noreply}


Creating a service:

# No timeout
svc ='localhost', 9999)

# 10s socket read timeout, raises BERTRPC::ReadTimeoutError
svc ='localhost', 9999, 10)


Copyright (c) 2009 Tom Preston-Werner. See LICENSE for details.