kanakb / pyhelix Goto Github PK
View Code? Open in Web Editor NEWPython participant and spectator for Apache Helix
License: Apache License 2.0
Python participant and spectator for Apache Helix
License: Apache License 2.0
All that is needed is to add a key that takes arbitrary number of arguments under the PROPERTYSTORE path
More instructions here: http://kazoo.readthedocs.org/en/latest/basic_usage.html
We should be going into ERROR state when the participant code throws exceptions.
We shouldn't fail if the user doesn't support a transition. We should log an error and move on.
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.
There's a potential race condition between marking messages as read, and deleting them post-transition.
Right now this is 1, and it really should be configurable
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?
If a session is lost, we should have a method in state model that is invoked so that users can clean up.
Need a way to register a callback before the connection is established
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.
The kazoo.testing module has a usable test harness for this purpose.
One possibility is a distributed message queue system, similar to the RabbitMQ recipe in the Helix Java source.
https://github.com/kanakb/pyhelix/blob/master/pyhelix/statemodel.py has a get_current_state, but leaves it up to the user to update it. pyhelix should do this automatically
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:
If timeouts are enabled, we should go into ERROR state for transitions that take too long.
If we have to reconnect, the current state from the previous session should be removed
Need this to write pure-Python apps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.