GithubHelp home page GithubHelp logo

bertrpc's Introduction

BERTRPC

By Tom Preston-Werner ([email protected])

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

See the full BERT-RPC specification at bert-rpc.org.

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.

Installation

$ gem install bertrpc

Examples

Require the library and create a service:

require 'bertrpc'
svc = BERTRPC::Service.new('localhost', 9999)

Make a call:

svc.call.calc.add(1, 2)
# => 3

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

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

Make a cast:

svc.cast.stats.incr
# => nil

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

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

Documentation

Creating a service:

# No timeout
svc = BERTRPC::Service.new('localhost', 9999)

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

Copyright

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

bertrpc's People

Contributors

defunkt avatar josh avatar mojombo avatar rtomayko avatar sethwklein avatar tmm1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.