So you also involves zookeeper... And in my view, this approach is same with the batch ledger id generation proposal (with batch size 2^24).
- Jiannan >On Fri, Jan 18, 2013 at 03:17:47AM +0900, Jiannan Wang wrote: >> For proposal 1, the performance would be very great since it's >> local generation totally. But Sijie has one concern: "in reality, >> it seems that it doesn't work. zookeeper session id is long, >> while ledger id is long, you could not put session id as part of >> ledger id. otherwise, it would cause id conflict..". >The session id part doesn't have to be 64 bit. It's 64bit if you use >the zookeeper session ID, but we could have the bookkeeper client >generate it when it connects to zookeeper by having a znode, whose >contents each client increments. It means 1 more read and 1 more write >per client, but I don't think thats a big hit. > >So if we give the session id part, 40 bits, and the client local bit >24, then each client can create up for 2^24 ledgers, and there can be >2^40 clients over the lifetime of the system. This numbers can be >tuned. > >-Ivan
