• This repository has been archived on 15/Jul/2019
  • Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    C
  • License
    Other
  • Created over 12 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RIBS (Robust Infrastructure for Backend Systems) version 2
Introduction
============

RIBS2 (Robust Infrastructure for Backend Systems, ver. 2) is a 
library which allows building high-performance internet serving
systems, while simplifying the flow of events into the user
application without sacrificing performance.

Up until the creation of RIBS2, there were generally two ways to
write internet serving engines - threads (or forks) per client/-
request and event-driven.

Using threads makes it easy to write applications (no need to handle
callbacks of events) with the price of performance (and performance
predictability) and with the price of either locking and code 
synchronization, or, in the case of fork per client/request, highly
inefficient engine.

On the other hand, event-driven will render very efficient engine,
with the price of needing to manually handle callbacks (manual
"stack management", "callback pyramid of doom"). In complex
application this can slow down development significantly. As of
today, this is the least preferred method and for years had very
limited support in popular languages, like java.

With RIBS2, the development of application is actually easier than
with threads, since there is no need for locking or code
synchronization, and the performance is as good (and sometimes
better) as with event-driven engines. This is possible by simply
replacing the preemptive scheduling of threads with events.
Cooperative "threads" are often called "fibers". Fibers that are
being controlled exclusively by events are called here "Ribbons".

        +----------------------------+
        |      Task Management       |
        +-------------+--------------+
        | Cooperative |  Preemptive  |
+---+---+-------------+--------------+
|   |   |             |              |
| S | M |             |              |
| t | a |             |              |
| a | n |   Event-    |              |
| c | u |   Driven    |              |
| k | a |             |              |
|   | l |             |              |
| M |   |             |              |
| a +---+-------------+--------------+
| n | A |             |              |
| a | u |             |              |
| g | t |             |              |
| e | o |    Ribs2    |              |
| m | m |   Ribbons   |   Threads    |
| e | a |             |              |
| n | t |             |              |
| t | e |             |              |
|   | d |             |              |
+---+---+-------------+--------------+
Illustration of the differences between
threads, event-driven and ribbons.

The framework designed to run as single threaded but not limited to.
You can 'fork' or run multiple instances in order to utilize all
cores on your system, it is recommended to avoid the use of threads.

In addition, RIBS provides vmbuf, a simple yet powerful way to manage
large memory buffers.

RIBS also provides http client and server. (pools, smart persistent
connection handling)

With RIBS you can take any library that is provided with โ€˜.aโ€™ archive
file, and โ€œribifyโ€ it to use RIBS provided function calls instead of
the default libc. This way you can take a library that is written in
a โ€œblockingโ€ paradigm, and run inside a complete event driven system
without modifications to the original code. This is proven to be
working well with libmysqlclient.a and other libraries. RIBS includes
a libmysqlclient example.

Prerequisites
=============
Ubuntu 10.04 or higher, preferably 12.04. Although it was tested on
Ubuntu, any Linux distro which is running 2.6.32 or above should be
fine as well, however, it was never tested. Please report if you
encounter problems.

Although 32bit is also supported, 64bit is highly recommended due to
address space limitation of 32bit.

In order to build the library you will need to install the following
packages (under Ubuntu):
* build-essential

Optional:
* libmysqlclient-dev
* zlib1g-dev

Tutorials
=========
The following tutorials can be found in doc/
* TUTORIAL01 - hello world
* TUTORIAL02 - simple file server
* TUTORIAL03 - Using MySQL via ribify
* TUTORIAL04 - log player (http client)
* TUTORIAL05 - dumping data and creating index
* TUTORIAL06 - using a ribified mongodb
=========

More Repositories

1

chronos

cron-like jobs for back-end systems
Java
76
star
2

Hydro

On-the-fly data manipulation framework
Python
54
star
3

erlgraph

An erlang application which will connect a d3js force directed graph to an erlang VM and display process information.
JavaScript
51
star
4

transformers

A package for normalizing property names and types from an external data store.
PHP
37
star
5

vulcan

Asynchronous, high-throughput Avro writer in Java
Java
19
star
6

trtop

TCP Remote Top - A top like utility to visualize outgoing connections with statistics.
Python
17
star
7

postable

A simple task distribution and result collection service.
JavaScript
17
star
8

node-multipass

Multiauth identity server using Node.js and MongoDB.
JavaScript
16
star
9

atc

An Action-Based PHP Dispatching Library
PHP
15
star
10

qiao

Reliable Log Streamer
Java
13
star
11

thrasher

A high-performance centralized rate-limiting service.
C
10
star
12

cachelink-service

A service for cross-datacenter caching with key associations and deep busting.
JavaScript
10
star
13

actionize

A small library to help build Redux reducers and their associated actions.
JavaScript
9
star
14

jquery-liveupdate

JavaScript
8
star
15

WebRTCIEPlugin

WebRTC based IE plugin for real time communication
C++
7
star
16

mod_webfw2

A high performance web application filtering engine.
C
5
star
17

dougal

The M of MVC, for Javascript VC frameworks that lack a decent M.
TypeScript
5
star
18

node-favicon

Node.js Favicon Service
JavaScript
3
star
19

log4js-protractor-appender

Log4js appender suited for Protractor
JavaScript
3
star
20

open-source-template

A template for Open Source projects at Aol.
3
star
21

jshint-settings

These are the settings we, the Aol Central Engineering Team, recommend. We also recommend that you use /*global ... */ for overrides and global variable definitions.
JavaScript
3
star
22

amp-styleguide

AMP's official style guide.
JavaScript
3
star
23

protractor-http-snitch

HTTP requests sometimes fail. Protractor won't talk, let's hire a snitch.
JavaScript
3
star
24

stitch

This library helps implement HTTP PATCH method on Web Resources exposed by Restful APIs. See README.md for more info
Java
3
star
25

Webservice_Base

Framework for developing API Services in Java
Java
3
star
26

dom-socket

Broadcast jQuery events across sockets
HTML
3
star
27

jquery-slideshow

JavaScript
2
star
28

convertro-gdpr-dashboard-reference

A reference implementation for a privacy dashboard that uses Convertro's GDPR APIs.
Python
2
star
29

JMeterMaid

Java
2
star
30

devops-test

One Cloud DevOps Test
Go
1
star