• Stars
    star
    206
  • Rank 190,504 (Top 4 %)
  • Language
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

DHT based high-performance microservices framework, by Bitfinex

Grenache Logo

Grenache is a DHT based high-performance microservices framework by Bitfinex. It's decentralised and optimized for performance. Because it's simple, it's easy to understand and to set up.

Grenache uses Distributed Hashtables, known from Bittorrent, to build a network between peers. It's based on Kademlia.

Peers can send each other commands (RPC), and they can also store values in the DHT. Pub/Sub is also possible.

The Grenache Ecosystem supports Ruby and Node.js. There are multiple transports available: HTTP (plain & TLS), Websocket (plain & TLS), ZeroMQ.

Contents

Features

  • Decentralised / Distributed architecture
  • Easy Bootstrap
  • Indefinite scalability and shapes
  • High-Performance

Implementations

Grape (the core)

Peer Implementations

Transports:

  • WebSocket transport: super-fast, great for Internet
  • HTTP transport: great for Internet
  • ZeroMQ transport: super-fast, perfect for internal networks

Patterns:

  • PUT/GET: put/get data to/from the DHT
  • RPC: simple and efficient RPC pattern
  • PUB/SUB: (Work In Progress)

Note: At the moment there is no interoperability between WebSocket and ZeroMQ implementations. A Proxy implementation will come later.

Node.JS Clients

Ruby Clients

CLI Clients

Grape Network Composition

1. The Grape: Grenache Discovery Node

Grenache-Grape builds the Grenache Network. It offers multiple DHT interaction APIs for Clients: service discovery and DHT data storage.

Features

  • Announce a Service
  • Lookup a Service
  • Push data to DHT

2. Clients: Grenache Client implementations on specific Transports

Grenache supports WebSocket, HTTP (plain / TLS) and ZeroMQ as transport protocols.

Features

  • Offer / Publish a Service: create and announce a service on the DHT
  • Request / Subscribe to Service: find a service throught the DHT and connect to it
  • Store and retrieve data in the DHT

Grenache in Action: a RPC example

Within a Grenache network, connected peers can interact in different ways with each other. They can store and retrieve data in the DHT. They can also work in a Pub/Sub pattern. Or they can work in RPC mode, with different workers and clients.

DHT with 2 workers and one client

In the diagram above we see three Grape nodes forming the DHT network. We have two workers connected. There is also another peer which will act as client.

Our workers announce their service to the DHT:

Step 1: worker announces service

Now peers can make use of the service and send commands to a service. They send their remote command to the DHT.

Step 2: worker announces service

The DHT looks up any peers that announce the service. In our case the two workers. The client receives the IP of the two workers.

Step 3: worker announces service

Finally the client connects to both workers, who are executing the command and send back the result to the client.

Step 4: worker announces service

Articles

Background

Contribute

Any contribution in form of question, issue, idea and pull requests is well accepted

Contacts

More Repositories

1

bitfinex-api-node

BITFINEX NodeJS trading API - Bitcoin, Litecoin, and Ether exchange
JavaScript
459
star
2

bitfinex-api-go

BITFINEX Go trading API - Bitcoin, Litecoin, and Ether exchange
Go
296
star
3

bfx-hf-ui

JavaScript
212
star
4

bitfinex-api-py

Python
200
star
5

bfx-hf-algo

JavaScript
90
star
6

bitfinex-api-rb

BITFINEX Ruby trading API - Bitcoin, Litecoin, and Ether exchange
Ruby
80
star
7

bitfinex-terminal

JavaScript
69
star
8

bfx-hf-indicators

JavaScript
58
star
9

grenache-grape

Grenache Grape implementation
JavaScript
53
star
10

sunbeam

JavaScript
47
star
11

bfxfixgw

Bitfinex FIX Gateway
Go
45
star
12

dazaar

JavaScript
45
star
13

bfx-hf-algo-server

JavaScript
44
star
14

smidgen

JavaScript
43
star
15

bfx-hf-strategy-py

Python
40
star
16

bfx-hf-indicators-py

Python
31
star
17

bfx-hf-strategy

JavaScript
25
star
18

bfx-report-electron

JavaScript
23
star
19

hypertele

A swiss-knife proxy powered by Hyperswarm DHT
JavaScript
20
star
20

grenache-nodejs-ws

Grenache Node.JS WebSocket implementation
JavaScript
19
star
21

dazaar-vision

JavaScript
18
star
22

eosfinex-custody-contract

C++
18
star
23

antani

Proof of Liabilities and Vote Delegation
JavaScript
16
star
24

bfx-hf-backtest

JavaScript
15
star
25

bfx-pay-woocommerce

PHP
14
star
26

pub

14
star
27

bfx-hf-chart

JavaScript
14
star
28

bfx-hf-data-server

JavaScript
13
star
29

bfx-stuff-ui

Bitfinex UI Goodies
JavaScript
13
star
30

grenache-nodejs-http

Grenache Node.JS WebSocket implementation
JavaScript
13
star
31

bfx-api-node-models

JavaScript
12
star
32

bfx-api-node-rest

JavaScript
12
star
33

bfx-reports-framework

JavaScript
10
star
34

bfx-report-ui

JavaScript
10
star
35

grenache-cli

The Grenache Command Line Interface.
M4
8
star
36

svc-js-cli

JavaScript
8
star
37

bfx-api-excel-demo

Visual Basic 6.0
7
star
38

bfx-report

JavaScript
7
star
39

bfx-hf-server

JavaScript
7
star
40

grenache-nodejs-utp

JavaScript
7
star
41

caron

Atomic Job enqueuer from Redis lists to popular Job Queues (Sidekiq, Resque, Bull, ...)
JavaScript
7
star
42

ufx-ui

JavaScript
7
star
43

hypercore-benchmark

JavaScript
6
star
44

grenache-rust

Rust
6
star
45

grenache-ruby-http

Ruby
6
star
46

mobile-pub

6
star
47

dazaar-payment

JavaScript
6
star
48

bip

6
star
49

hypercore-bisect

JavaScript
6
star
50

bfx-api-node-core

JavaScript
5
star
51

bfx-api-mock-srv

JavaScript
5
star
52

bfx-util-net-js

JavaScript
5
star
53

bfx-hf-models

JavaScript
5
star
54

ulisse

MySQL table snapshots and real time updates to Redis ordered queue
JavaScript
5
star
55

bfx-hf-util

JavaScript
5
star
56

bfx-ost-streamer

The Bitfinex osTicket Streamer Plugin.
PHP
5
star
57

dazaar-payment-lightning

JavaScript
5
star
58

lokue

LokiJS Job Queue
JavaScript
4
star
59

grenache-nodejs-zmq

Grenache Node.JS ZeroMQ implementation, by Bitfinex
JavaScript
4
star
60

bfx-svc-js

Shell
4
star
61

wasteland

JavaScript
4
star
62

bfx-api-node-util

JavaScript
3
star
63

bfx-hf-models-adapter-template

JavaScript
3
star
64

bfx-report-express

JavaScript
3
star
65

pesto-rb

Redis based distributed lock for ruby
Ruby
3
star
66

mutail

Simple and fast file(s) tail. Works with wildcards.
JavaScript
3
star
67

bfx-cli

3
star
68

dazaar-cli

JavaScript
3
star
69

bfx-api-node-plugin-example

JavaScript
3
star
70

cheesebox

JavaScript
3
star
71

grenache-ruby-ws

Ruby
3
star
72

bfx-hf-strategy-exec

JavaScript
3
star
73

grenache-nodejs-base

JavaScript
3
star
74

moonbeam

JavaScript
3
star
75

dazaar-guild

JavaScript
3
star
76

bitfinex-api-php

PHP
3
star
77

bfx-ext-eos-multisig

JavaScript
3
star
78

bfx-hf-ext-plugin-dummy

JavaScript
3
star
79

grenache-nodejs-link

JavaScript
3
star
80

bfx-facs-auth-google

JavaScript
2
star
81

bfx-api-node-plugin-managed-ob

JavaScript
2
star
82

moonbeam-history

JavaScript
2
star
83

bfx-lib-server-js

JavaScript
2
star
84

eos-block-stream

JavaScript
2
star
85

grenache-nodejs-ws-tls

JavaScript
2
star
86

affiliates-nicknames

JavaScript
2
star
87

bitfinex-terminal-order-book

JavaScript
2
star
88

bfx-api-node-plugin-managed-candles

JavaScript
2
star
89

dazaar-www

CSS
2
star
90

hypercore-tutorial

2
star
91

lib-js-util-schema

2
star
92

bfx-api-node-plugin-ob-checksum

JavaScript
2
star
93

bfx-hf-strategy-dazaar

JavaScript
2
star
94

bfx-hf-ui-config

JavaScript
2
star
95

bfx-api-node-plugin-wd

JavaScript
2
star
96

bfx-util-js

Shell
2
star
97

bfx-api-node-plugin-seq-audit

JavaScript
2
star
98

dazaar-scatter-pay

JavaScript
2
star
99

bfx-api-node-mock-data

2
star
100

lib-js-util-math

JavaScript
2
star