GithubHelp home page GithubHelp logo

pyhelix's Introduction

pyhelix

Python bindings for Apache Helix

Install:

sudo easy_install pyhelix

OR

sudo pip install pyhelix

Start a participant:

# Imports
import pyhelix.participant as participant
import pyhelix.examples.dummy.dummy_statemodel as statemodel

# Define a participant
p = participant.Participant('test-cluster', 'myhost', 12120, 'zkhost:2181')

# Register a state model factory
p.register_state_model_fty('MasterSlave', statemodel.DummyStateModelFactory())

# Connect
p.connect()

# Disconnect
p.disconnect()

Build Status

pyhelix's People

Contributors

camillser avatar flier avatar jrgp avatar kanakb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyhelix's Issues

Support batch messaging mode

This was a feature added in 0.6.1, and it would be nice to support it as it can reduce the number of callbacks.

Process transitions faster

For resources with a large number of assigned partitions, this participant can be slow in processing everything. There are a few ways to tackle this:

  • batch ZK operations
  • make some ZK operations asynchronous
  • native code?

Forced participant ID convention: "host_port"?

This formatting is hardcoded here:

class Participant(object):
    ...
    self._participant_id = '{0}_{1}'.format(host, port)

But there's much more flexibility in naming instances when using helix-admin.sh to set up the cluster initially (maybe the setup flow if auto-join not allowed for some cluster). Should Participant also have this same level of flexibility?

Write a helix agent

Similar to the one in Java, this should invoke commands based on state transitions while monitoring a process whose liveness indicates whether or not the connection should remain open.

Handle client timeouts

If timeouts are enabled, we should go into ERROR state for transitions that take too long.

Support property store

All that is needed is to add a key that takes arbitrary number of arguments under the PROPERTYSTORE path

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.