[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638976#comment-14638976
 ] 

Shay Hazor commented on ZOOKEEPER-2209:
---------------------------------------

[~fpj ] & [~rakeshr] I agree, this code needs the community feedback in order 
to convince you (and me) it's ready. It would be great if you could add it to 
the contrib folder. Should I make a new patch that puts the code in a contrib 
sub-folder? will I be able to post updates like it's "my" repo? will it be in 
the trunk branch ?

I'd like to tell you a bit about why I did it this project.
3 months ago I started a new job in a place that uses mostly open source 
software, which was totally new to me. My first task was to learn about MS 
project Orleans and write a membership table implementation using ZK. I didn't 
know what Orleans or ZK were. so I took [~ewhauser]'s code and started playing 
with it. It worked most of the times, but there were some issues: sometimes I'd 
get "connection lost" for no apparent reason, the tests weren't passing 
consistently, no support for ZK multi and it wasn't async. When I told my boss 
we need to find another solution, he said "write a new one". (he wasn't aware 
of the size of the task, me neither)
I made a clone of 3.4.6 release tag of the official ZK repo, to base on the 
latest stable code. I started with some static code conversion tools to get the 
easy parts out of the way. As I'm not a java programmer, the conversion wasn't 
easy (java selector almost killed me). Luckily, I am eloquent in c#. After 
about a month of not much sleep, I had a working c# client. all tests were 
passing consistently. but it wasn't async and the recipes weren't converted 
yet, that took two more weeks. I'm still improving performance, memory 
consumption and basically everything I can think of.
Note that this code will soon be tested heavily in staging and production, 
since where I work we're rewriting our whole product with Orleans. 
My personal goal is to make ZK available to any .NET programmer. this JIRA is a 
step in that direction.

> A .NET C# version of ZooKeeper client 3.4.6 release
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-2209
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2209
>             Project: ZooKeeper
>          Issue Type: New Feature
>    Affects Versions: 3.4.6
>         Environment: .NET CoreCLR
>            Reporter: Shay Hazor
>            Assignee: Shay Hazor
>              Labels: .NET, CoreCLR, async, c#
>             Fix For: 3.4.6
>
>         Attachments: ZOOKEEPER-2209.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Inspired by the work of ewhauser .
> I propose a C# Client that supports the current stable version of ZK 3.4.6.
> It was built by using static code conversion tools followed by manual editing 
> and C# implementations of java selector and other java constructs. 
> A great measure was taken to follow the logic of the java version. In fact, 
> the code is almost identical. Thus allowing easy evolution alongside the java 
> version. 
> Main features:
> * fully .NET async, not explicit threads used
> * all relevant unit tests have been converted and passing consistently
> * recipes are included, will be converted to async soon
> * Code is 100% CoreCLR compliant
> * NuGet package - 
> [ZooKeeperNetEx|https://www.nuget.org/packages/ZooKeeperNetEx] is already 
> integrated in [Microsoft Project Orleans|https://github.com/dotnet/orleans] 
> as the only open-source membership provider.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to