All Projects → Abc-Arbitrage → Zebus

Abc-Arbitrage / Zebus

Licence: mit
A lightweight Peer to Peer Service Bus

Projects that are alternatives of or similar to Zebus

Layr
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme
Stars: ✭ 90 (-59.46%)
Mutual labels:  distributed-systems, peer-to-peer
Servicebus
Simple service bus for sending events between processes using amqp.
Stars: ✭ 415 (+86.94%)
Mutual labels:  bus, service-bus
fabric
Fabric is an experimental protocol for exchanging information.
Stars: ✭ 46 (-79.28%)
Mutual labels:  distributed-systems, peer-to-peer
Crdt Playground
Stars: ✭ 215 (-3.15%)
Mutual labels:  peer-to-peer, distributed-systems
Go2p
Simple to use but full configurable p2p framework
Stars: ✭ 80 (-63.96%)
Mutual labels:  peer-to-peer, distributed-systems
Cadence
Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
Stars: ✭ 5,522 (+2387.39%)
Mutual labels:  service-bus, distributed-systems
Arbore
Friend-to-friend filesharing app to save the world from dystopia
Stars: ✭ 270 (+21.62%)
Mutual labels:  peer-to-peer, distributed-systems
Temporal
Temporal service
Stars: ✭ 3,212 (+1346.85%)
Mutual labels:  service-bus, distributed-systems
Titanoboa
Titanoboa makes complex workflows easy. It is a low-code workflow orchestration platform for JVM - distributed, highly scalable and fault tolerant.
Stars: ✭ 787 (+254.5%)
Mutual labels:  service-bus, distributed-systems
Neutrino
Privacy-Preserving Bitcoin Light Client
Stars: ✭ 564 (+154.05%)
Mutual labels:  peer-to-peer, distributed-systems
Gossip Python
Implementation of the gossip protocol
Stars: ✭ 100 (-54.95%)
Mutual labels:  peer-to-peer, distributed-systems
Diztl
Share, discover & download files in your network 💥
Stars: ✭ 162 (-27.03%)
Mutual labels:  peer-to-peer, distributed-systems
Fastcast
🌊 Stream peer-to-peer audio and video content
Stars: ✭ 202 (-9.01%)
Mutual labels:  peer-to-peer
Habitat
Modern applications with built-in automation
Stars: ✭ 2,334 (+951.35%)
Mutual labels:  distributed-systems
Kungfu
KungFu: Making Training in Distributed Machine Learning Adaptive
Stars: ✭ 199 (-10.36%)
Mutual labels:  distributed-systems
6.824 2017
⚡️ 6.824: Distributed Systems (Spring 2017). A course which present abstractions and implementation techniques for engineering distributed systems.
Stars: ✭ 219 (-1.35%)
Mutual labels:  distributed-systems
Testground
🧪 A platform for testing, benchmarking, and simulating distributed and p2p systems at scale.
Stars: ✭ 216 (-2.7%)
Mutual labels:  distributed-systems
Zio Saga
Purely Functional Transaction Management In Scala With ZIO
Stars: ✭ 200 (-9.91%)
Mutual labels:  distributed-systems
Beehive
Distributed Programming Framework in GoLang
Stars: ✭ 196 (-11.71%)
Mutual labels:  distributed-systems
Erpc
An efficient, extensible and easy-to-use RPC framework.
Stars: ✭ 2,274 (+924.32%)
Mutual labels:  peer-to-peer

Zebus

Build NuGet Gitter

Zebus is a lightweight peer to peer service bus, built with CQRS principles in mind. It allows applications to communicate with each other in a fast and easy manner. Most of the complexity is hidden in the library and you can focus on writing code that matters to you, not debugging messaging code.

Introduction

Zebus is peer to peer, so it does not depend on a broker to dispatch messages between the peers. This allows it to reach a throughput of 140k msg/s and a roundtrip latency under 500µs (have a look at the Performance page for details).

It is resilient thanks to the absence of a broker and an optional persistence feature that ensures that messages are not lost if a peer is down or disconnected.

It is stable, since we have been using it on a production environment at Abc Arbitrage for more than six years, handling hundreds of millions of messages per day.

Key concepts

Peer

We call a peer any program that is connected to the bus, a peer is identified by a unique identifier called a PeerId that looks like this: MyAmazingPeer.0 (we use this convention to identify different instances of the same service).

Event

An event is sent by a peer to notify everyone who is interested that something happened (ex: MyBusinessObjectWasSaved, AlertTriggered...).

Command

A command is sent to a peer asking for an action to be performed (ex: SaveMyBusinessObjectCommand).

Message Handler

A class deriving from IMessageHandler<T> will be scanned by the bus and will be used to handle messages of the T kind on reception.

Bus

The piece of code that is the point of entry to use Zebus, the methods that you will use the most are Publish(IEvent) and Send(ICommand).

A quick demo

On startup, the bus will scan your assemblies for message handlers and notify the other peers that you are interested by those messages. When a peer publishes a message, it will use the Directory to know who handles it and send the message directly to the correct recipients.

Receiver

public class MyHandler : IMessageHandler<MyEvent>
{
    public void Handle(MyEvent myEvent)
    {
        Console.WriteLine(myEvent.Value);
    }
}

Sender

public void MethodThatSends(IBus bus)
{
    bus.Publish(new MyEvent { Value = 42 });
}

Event description

[ProtoContract]
public class MyEvent : IEvent
{
    [ProtoMember(1)]
    public int Value { get; set; }
}

And you're set ! This is all the code you need to send an event from one machine to the other. If you want to read more about how the magic happens, have a look at the wiki. Or if you want a more detailed walkthrough (what to reference, how to start the Bus...) visit the Quick start page.

Requirements

On Windows, you will need to have Microsoft Visual C++ 2017 Redistributable installed in order to load the x86 or the x64 version of libzmq embedded in the project.

Release notes

We try to stick to the semantic versioning principles and keep the release notes and directory release notes up to date.

Other repositories

  • Zebus.MessageDsl - a DSL which simplifies the writing of ProtoBuf contracts for Zebus
  • Zebus.TinyHost - a lightweight host used to run Zebus enabled services
  • Zebus.Samples - miscellaneous samples that show how to get started with Zebus

Copyright

Copyright © 2019 Abc Arbitrage Asset Management

License

Zebus is licensed under MIT, refer to LICENSE.md for more information.

Tools

We use

resharper_icon

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].