Comments (14)
ActiveState's fork ( https://github.com/ActiveState/doozerd ) has support for ephemeral nodes.
from doozerd.
awesome. let's keep this issue open until it's merged and documented
from doozerd.
Patches GLADLY reviewed.
from doozerd.
I poked around ActiveState's fork and, to be honest, I'm not terribly happy with the implementation chosen.
I think any node should be able to be created as ephemeral (not just some specific hard coded path requiring special case handling in both get and set code).
I think this would produce the most flexible implementation but I acknowledge that it might mean more breaking changes to the API.
I'm curious to hear other's thoughts before I take a swing at this.
from doozerd.
@mreiferson I also looked at the code and I agree. It's obvious that ActiveState did what anyone else would have done in their place - quickly get the feature to work. But for it to be useful to everyone, this needs to be done properly and thoughtfully. Before we hit major version 1 I think it's perfectly acceptable to break API, considering how important this feature is.
from doozerd.
@pitr Yes, absolutely, it's always a matter of tradeoffs 😄
from doozerd.
It's obvious that ActiveState did what anyone else would have done in their place - quickly get the feature to work.
that's exactly what happened (the commit itself was titled "limited ephemeral node support").
I think any node should be able to be created as ephemeral (not just some specific hard coded path requiring special case handling in both get and set code).
+1
But for it to be useful to everyone, this needs to be done properly and thoughtfully. Before we hit major version 1 I think it's perfectly acceptable to break API, considering how important this feature is.
as for the API, how about having SET take an extra argument (t.req.CreateMode = EPHEMERAL
)?
as for the implementation, i'm thinking that the list of ephemeral paths can be stored in the conn{}
struct; to be deleted during disconnection.
from doozerd.
@srid I was thinking the same thing (your suggested implementation)
Do you want to take a stab at this? I'm working on cleaning up logging and other misc odds and ends so I might not get to this for a bit.
from doozerd.
sure, i'll take a look.
from doozerd.
should directories have ability to be ephemeral?
from doozerd.
@pitr at the moment you only ever indirectly create directories (SET
works on "file" paths), so my vote would be no.
from doozerd.
Agreed. And there's no real need for data-owning directories in the use cases I've seen.
from doozerd.
I've certainly seen Zookeeper use cases where ephemeral znodes with other nodes underneath them (ephemeral directories in Doozer) are useful. For instance, a server might come online, open up an ephemeral node called $HOSTNAME
to indicate its existence and keep status information in files underneath that.
But since you don't really deal with directories directly in Doozer, I see how that wouldn't really make sense here.
from doozerd.
Sorry my comment is unclear. I meant data-owning in the sense that all nodes in zk can have data associated, but they can't in doozer. A path like /myHostname/ can't have data attached, but an easy work around is to apply children paths like /myHostname/ipAddress with the data you want to store.
from doozerd.
Related Issues (20)
- Persistence HOT 4
- Documentation should include "Doozer in production" HOT 3
- Update Documentation to show cluster startup script
- Find depth or list at path
- Distinguish between create and update during change notifications
- web ui shows a regularly-updating line with nothing but "(-3) ="
- wish: automatic bootstrapping
- bin/doozer_init talks about "my_cal" (based on two digits at end of hostname) but /ctl/cal seems to be first come first serve HOT 1
- Temporary packet loss causes permanent node hang HOT 1
- 0.8 (everything) and current master (web view) not working on Mac OS 10.8 HOT 2
- Node bounce causes healthy node to be dropped
- update docs w/r/t builds HOT 9
- Security : Encrypted communication between doozerd instances HOT 1
- Are there consequences to storing additional information in each of the ctl/node entries? HOT 1
- In firedrill it cause all three instance hang when :8046 be killed
- service bind port traffic
- Web ui doesn't seem to work v0.8
- dependency on code.google.com/p/goprotobuf/proto HOT 2
- unable to detect version control system for code.google.com
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doozerd.