GithubHelp home page GithubHelp logo

kwi / brb Goto Github PK

View Code? Open in Web Editor NEW
114.0 3.0 7.0 35 KB

Event machine based distributed ruby, simple and transparent but extremely fast and reliable

License: MIT License

Ruby 100.00%

brb's Introduction

BrB - Easy and Fast distributed ruby

BrB is a simple, fully transparent and extremely fast interface for doing simple distributed Ruby. The core of the architecture is provided by EventMachine (a fast and reliable IO event library).

BrB was built in order to achieve these 4 main goals :

  • Simple and fast message passing between distant Ruby processes.

  • Message passing with of return values when needed.

  • Being extremely fast in order to handle more than a few thousand messages per second.

  • Being completely transparent for developer.

The principle is simple and inspired from Drb (standard distributed ruby library) : A process exposes an object over the network and any ruby process (after having established a connection tunnel) can directly call a method on the exposed object. BrB handles that part, so it’s fully transparent in the Ruby code.

BrB only support message passing with Marshable dumpable object : String, symbol, Array, hash, Number, Object etc… That mean you can not send file descriptor, Thread or another funky things like that :)

For any question, use the Ruby BrB google group: groups.google.com/group/ruby-brb

Main Functionalities

  • Unlimited objects exposed

  • Processes can expose object and be client to exposed object too at the same time

  • Do not wait for return by default : just do simple message passing

  • Handle return values without blocking with the usage of a simple block

  • Blocking wait for a return value if needed by simply adding _block at the end of the method name

  • Transmission of Exception when blocking call

  • Thread safe if used correctly with Event Machine

How it works

First of all, a process declare himself as a sever and expose any object on a given address and port. Then, any number of distant processes can create a Tunnel with that server and can expose an object in exchange too. After connection are ready, just call method on the tunnel. It will just act like normal method calling on the exposed object !

What BrB is designed for ?

  • Doing Simple message passing between ruby process.

  • Connecting hundred of ruby process transparently.

  • Building a real-time scalable (game) server

  • Taking important load on a server easily just by distributing the load on multiple BrB instance.

  • Taking advantage of multi-core and multi-threaded systems.

TODO

  • Writing more examples

  • Publish Benchmarks VS drb

  • Improve logging mechanism

  • Clean up

Contributors

  • kwi (Guillaume Luccisano)

  • bwalton (Brian Walton)

  • dpree (Jens Bissinger)

Copyright © 2009-2010 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license

brb's People

Contributors

bsingr avatar kwi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

brb's Issues

Can't get BRB working between two distant hosts

I am using the files from the example directory, which work fine when run on the same host but when I try to do the same between host1 and host2 I get the following trace on the server side:
------- SERVER LOG ---------
I, [2013-05-02T15:30:59.672510 #23307] INFO -- : [BrB] Start service on brb://193.196.154.215:15556 ...
I, [2013-05-02T15:30:59.673442 #23307] INFO -- : [BrB] Service started on brb://193.196.154.215:15556

------------- CLIENT LOG -------------
I, [2013-05-02T15:31:05.375503 #29172] INFO -- : [BrB] Tunnel initialized on brb://193.196.154.215:15556

Calling 1s call, and wait for response...
I, [2013-05-02T15:31:25.376154 #29172] INFO -- : [BrB] Tunnel service closed


I have added the :user and :password on the BrB::Service.start_service argument list and the same for the client BrB::Tunnel.create.
I have also try to use '0.0.0.0' as ip address but it is the same, it fails.
The tunnel is never initialized on the server side.

this is certainly simple but I can't find my error;
Thanks to give me some pointer.

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.