<commit_before>#Ob1k - A modern RPC Framework

[![Build Status](https://travis-ci.org/outbrain/ob1k.svg?branch=master)](https://travis-ci.org/outbrain/ob1k)
[![Download](https://api.bintray.com/packages/harel-eran/Ob1k/com.outbrain.swinfra/images/download.svg)](https://bintray.com/harel-eran/Ob1k/com.outbrain.swinfra/_latestVersion)

##Overview and Motivation 
Ob1k is an asynchronous light-weight RPC framework for rapid development of async, high performance micro services.
You can start an Ob1k embedded server from your code and once started it will serve HTTP requests based on the endpoints you have configured. 
Unlike traditional servlet containers, Ob1k is based on Netty asynchronous event-driven model, and uses a fixed thread-per-code pool for serving.
The coordintation of asynchronous request is performed by using composable futures which enable
you to easily compose and combine asynchonous operations.      

##Anatomy 
Ob1k project consists of the following sub libraries
 - *ob1k-concurrent*        - Introduces composable futures, an alternative implementation of futures in Java.
 - *ob1k-concurrent*-scala  - A scala wrapper for *ob1k-concurrent
 - *ob1k-core*              - RPC framework Client and server infrastructure
 - *ob1k-db*                - A composable futures based asynchronous client for MySQL
 - *ob1k-cache*             - A composable futures based asynchronous client for Memcache
 - *ob1k-cql*               - A composable futures based asynchronous client for cassandra
 - *ob1k-security*          - Authentication and authorization for Ob1k
 - *ob1k-consul*            - Enables consul registration  for Ob1k services


##Getting started 
Micro services architecture consists of a group of different services which communicate with each other.
Ob1k supply the infrastructure to build such microservices and means for them to communicate. 
The communication between services is performed over HTTP and an Ob1k server is actually an HTTP server.
In addition Ob1k equip you with a way to supply a Java RPC client which communicates with the server. 
As mentioned before is done over HTTP and the payload sent between server and client can be either JSON or msgpack.
  
 
###Ob1k Server
Let's start with creating an Ob1k server. Create a new maven project and add dependency to ob1k-core in your pom:

```xml
<dependency>
  <groupId>com.outbrain.ob1k</groupId>
  <artifactId>ob1k-core</artifactId>
  <version>x.y</version>
</dependency>
```

The next step will be to create a service end point. A service endpoint is an interface and an implementation. 
Each method in the implementation will be mapped to a URL which clients as well as a simple web browser can invoke.
In the next example we are creating a service with on endpoint named helloWorld which gets no arguments and returns a string.
```java
public interface IHelloService extends Service {<commit_msg>Minor description changes<commit_after>#Ob1k - A modern RPC Framework

[![Build Status](https://travis-ci.org/outbrain/ob1k.svg?branch=master)](https://travis-ci.org/outbrain/ob1k)
[![Download](https://api.bintray.com/packages/harel-eran/Ob1k/com.outbrain.swinfra/images/download.svg)](https://bintray.com/harel-eran/Ob1k/com.outbrain.swinfra/_latestVersion)

##Overview and Motivation 
Ob1k is an asynchronous light-weight RPC framework for rapid development of async, high performance micro services.
You can start an Ob1k embedded server from your code and once started it will serve HTTP requests based on the endpoints you have configured. 
Unlike traditional servlet containers, Ob1k is based on Netty asynchronous event-driven model, and uses a fixed thread-per-code pool for serving.
The coordintation of asynchronous request is performed by using composable futures which enable
you to easily compose and combine asynchonous operations.      

##Anatomy 
Ob1k project consists of the following sub libraries
 - **ob1k-concurrent**        - Introduces composable futures, an alternative implementation of futures in Java.
 - **ob1k-concurrent-scala**  - A scala wrapper for ob1k-concurrent
 - **ob1k-core**              - RPC framework Client and server infrastructure
 - **ob1k-db**                - A composable futures based asynchronous client for MySQL
 - **ob1k-cache**             - A composable futures based asynchronous client for Memcache
 - **ob1k-cql**               - A composable futures based asynchronous client for cassandra
 - **ob1k-security**          - Authentication and authorization for Ob1k
 - **ob1k-consul**            - Enables consul registration  for Ob1k services


##Getting started 
Micro services architecture consists of a group of different services which communicate with each other.
Ob1k supply the infrastructure to build such microservices and means for them to communicate. 
The communication between services is performed over HTTP and an Ob1k server is actually an HTTP server.
In addition Ob1k equip you with a way to supply a Java RPC client which communicates with the server. 
As mentioned before is done over HTTP and the payload sent between server and client can be either JSON or msgpack.
  
 
###Ob1k Server
Let's start with creating an Ob1k server. Create a new maven project and add dependency to ob1k-core in your pom:

```xml
<dependency>
  <groupId>com.outbrain.ob1k</groupId>
  <artifactId>ob1k-core</artifactId>
  <version>x.y</version>
</dependency>
```

The next step will be to create a service end point. A service endpoint is an interface and an implementation. 
Each method in the implementation will be mapped to a URL which clients as well as a simple web browser can invoke.
In the next example we are creating a service with on endpoint named helloWorld which gets no arguments and returns a string.
```java
public interface IHelloService extends Service {
{'fraction_non_alphanumeric': 0.06351652114363979, 'fraction_numerical': 0.009587399417907892, 'mean_word_length': 3.9888983774551665, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2574973', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1493, 'n_words': 706}