All Projects → zhebrak → Raftos

zhebrak / Raftos

Licence: mit
Asynchronous replication framework for distributed Python projects

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Raftos

Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (+91.99%)
Mutual labels:  replication, raft
Nuraft
C++ implementation of Raft core logic as a replication library
Stars: ✭ 428 (+49.13%)
Mutual labels:  replication, raft
Tupl
The Unnamed Persistence Library
Stars: ✭ 83 (-71.08%)
Mutual labels:  replication, raft
Pysyncobj
A library for replicating your python class between multiple servers, based on raft protocol
Stars: ✭ 468 (+63.07%)
Mutual labels:  replication, raft
slock
High-performance distributed sync service and atomic DB
Stars: ✭ 50 (-82.58%)
Mutual labels:  replication, raft
Paxos raft protocol
分布式一致性协议相关论文及中文译文,涵盖Paxos、Raft、Zab
Stars: ✭ 255 (-11.15%)
Mutual labels:  raft
Creed
Sophisticated and functionally-minded async with advanced features: coroutines, promises, ES2015 iterables, fantasy-land
Stars: ✭ 265 (-7.67%)
Mutual labels:  asynchronous
krahodb
An open-source database designed to support multi-master replication. It is designed on the top of PostgreSQL, providing bidirectional replication, as well as row filtering.
Stars: ✭ 52 (-81.88%)
Mutual labels:  replication
xtra
🎭 A tiny actor framework
Stars: ✭ 111 (-61.32%)
Mutual labels:  asynchronous
Mushroom
Distributed In-Memory Index 分布式内存索引
Stars: ✭ 280 (-2.44%)
Mutual labels:  raft
Completable Futures
Utilities for working with futures in Java 8
Stars: ✭ 277 (-3.48%)
Mutual labels:  asynchronous
Zio
ZIO — A type-safe, composable library for async and concurrent programming in Scala
Stars: ✭ 3,167 (+1003.48%)
Mutual labels:  asynchronous
Circuits
circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.
Stars: ✭ 256 (-10.8%)
Mutual labels:  asynchronous
Permazen
Language-Natural Persistence Layer for Java
Stars: ✭ 265 (-7.67%)
Mutual labels:  raft
kerala
Distributed KV Streams
Stars: ✭ 16 (-94.43%)
Mutual labels:  raft
Firefly
Firefly is an asynchronous web framework for rapid development of high-performance web application.
Stars: ✭ 277 (-3.48%)
Mutual labels:  asynchronous
postage-rs
The feature-rich, portable async channel library
Stars: ✭ 122 (-57.49%)
Mutual labels:  asynchronous
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (-9.76%)
Mutual labels:  asynchronous
Pg chameleon
MySQL to PostgreSQL replica system
Stars: ✭ 274 (-4.53%)
Mutual labels:  replication
Floyd
A raft consensus implementation that is simply and understandable
Stars: ✭ 259 (-9.76%)
Mutual labels:  raft

raftos

Build Status PyPI version

Asynchronous replication framework based on Raft Algorithm for fault-tolerant distributed systems.

Install

pip install raftos

Register nodes on every server

import raftos


loop.create_task(
    raftos.register(
        # node running on this machine
        '127.0.0.1:8000',

        # other servers
        cluster=[
            '127.0.0.1:8001',
            '127.0.0.1:8002'
        ]
    )
)
loop.run_forever()

Data replication

counter = raftos.Replicated(name='counter')
data = raftos.ReplicatedDict(name='data')


# value on a leader gets replicated to all followers
await counter.set(42)
await data.update({
    'id': 337,
    'data': {
        'amount': 20000,
        'created_at': '7/11/16 18:45'
    }
})

In case you only need consensus algorithm with leader election

await raftos.wait_until_leader(current_node)

or

if raftos.get_leader() == current_node:
    # make request or respond to a client

or

raftos.configure({
    'on_leader': start,
    'on_follower': stop
})

Whenever the leader falls, someone takes its place.

Paper & Video

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].