Introduction

Beehive is a genetic distributed programming framework that:

Learn more

Motivation

To implement a distributed application, one needs to implement common boilerplates, such as seralization, placement, synchronization, and concurrency, in addition to the core of the application logic. These boilerplates are difficult to implement, hard to get right, and often dwarf the core of the distributed application.

Our goal is to hide these boilerplates to faciliate distributed programming. This is quite challenging, since our framework must be generic enough to support a wide-range of distributed programs and efficient enough to be practical.

Learn more

Example

This is a sample key-value store that can put, get, and delete keys and values:

type KVStore struct {}

func (s *KVStore) Rcv(msg Msg, ctx RcvContext) error {
    switch data := msg.Data().(type) {
    case Put:
        return ctx.Dict(dict).Put(data.Key, data.Val)
    case Get:
        v, err := ctx.Dict(dict).Get(string(data))
        if err != nil {
            return errKeyNotFound
        }
        ctx.Reply(msg, Result{Key: string(data), Val: v.(string)})
        return nil
    case Del:
        return ctx.Dict(dict).Del(string(data))
    }
    return errInvalid
}

Simple, eh?

This application is implemented just like a centralized key-value store, yet is distributed in the same way that memcached shards its keyspace. It can handle more than 100k Puts per bucket per second with 5x replication.

Learn more

Kandoo on GitHub