You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Sam Baskinger <sa...@networkedinsights.com> on 2010/05/05 22:06:27 UTC
Demo Code: Shared/Exclusive Lock
All,
It was suggested that more demo code would be welcome. I've gotten the "OK" to release a shared/exclusive Lock.java implementation we have in our test labs at Networked Insights. If the community would find it useful, please do use it! :)
All the best, and thanks for the excellent tool,
Sam Baskinger
Software Engineer
Networked Insights
http://www.networkedinsights.com<http://www.networkedinsights.com/>
Re: Demo Code: Shared/Exclusive Lock
Posted by Henry Robinson <he...@cloudera.com>.
Sam -
This is great - the more contributed code the better!
Did you attach the code to your mail? The mailing lists strip out
attachments. If you wouldn't mind creating a JIRA (see
https://issues.apache.org/jira/browse/ZOOKEEPER), formatting your code as a
patch and clicking the button that says you're happy for the ASF to use your
code, that would be awesome - doing so makes it easier for us to add your
code into Apache-hosted source repositories.
Thanks again for your contribution - really pleased to see it.
cheers,
Henry
On 5 May 2010 13:06, Sam Baskinger <sa...@networkedinsights.com>wrote:
> All,
>
> It was suggested that more demo code would be welcome. I've gotten the "OK"
> to release a shared/exclusive Lock.java implementation we have in our test
> labs at Networked Insights. If the community would find it useful, please do
> use it! :)
>
> All the best, and thanks for the excellent tool,
>
>
> *Sam Baskinger
> *Software Engineer
> Networked Insights
> http://www.networkedinsights.com
>
>
--
Henry Robinson
Software Engineer
Cloudera
415-994-6679
Re: Demo Code: Shared/Exclusive Lock
Posted by Sam Baskinger <sa...@networkedinsights.com>.
Mahadev and Henry,
Thanks for the warm welcome and patience. :)
The code is lightly used and has been manually tested to block and release. As Networked Insights transitions code out of its labs it generally matures the code through a refactor and adding additional tests. This code is still somewhat young in the process.
Regarding what it does differently / adds, if I'm reading the existing code correctly it adds the concept of a shared lock where many processes may lock until the exclusive lock is reached. Only one process may hold the exclusive lock. The use case we had in mind was kicking off a herd of machines to perform write operations (exclusive lock) on HDFS data, but not if there was a process reading it (shared lock).
I would love this sort of artifact to exist in the core of ZooKeeper, but that's another email thread. :)
I think everyone has see the JIRA issue pop up (ZOOKEEPER-767). Patch is attached.
Let me know what I can do to make this process easier! Again, thanks for the warm reception.
Sam Baskinger
Software Engineer
Networked Insights
On May 5, 2010, at 3:18 PM, Mahadev Konar wrote:
Great to see this!!!!
IT would be good to have this contributed. Sam, how does this compare to
locks implementation currently in src/recipes? Anyhow a well tested and used
implementation would nevertheless be useful!
You can open a jira and submit your code to it. I am pretty committers will
be willing to work with you to get this in the codebase!
Thanks
mahadev
On 5/5/10 1:06 PM, "Sam Baskinger" <sa...@networkedinsights.com>>
wrote:
Re: Demo Code: Shared/Exclusive Lock
Posted by Mahadev Konar <ma...@yahoo-inc.com>.
Great to see this!!!!
IT would be good to have this contributed. Sam, how does this compare to
locks implementation currently in src/recipes? Anyhow a well tested and used
implementation would nevertheless be useful!
You can open a jira and submit your code to it. I am pretty committers will
be willing to work with you to get this in the codebase!
Thanks
mahadev
On 5/5/10 1:06 PM, "Sam Baskinger" <sa...@networkedinsights.com>
wrote:
> All,
>
> It was suggested that more demo code would be welcome. I've gotten the "OK" to
> release a shared/exclusive Lock.java implementation we have in our test labs
> at Networked Insights. If the community would find it useful, please do use
> it! :)
>
> All the best, and thanks for the excellent tool,
>
>
> Sam Baskinger
> Software Engineer
> Networked Insights
> http://www.networkedinsights.com <http://www.networkedinsights.com/>
>
>