Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # dev >> Handling protocol versions


+
Devaraj Das 2012-07-31, 00:47
+
Jimmy Xiang 2012-07-31, 03:09
+
Ted Yu 2012-07-31, 03:11
+
Ted Yu 2012-07-31, 21:50
+
Stack 2012-08-01, 08:41
+
Todd Lipcon 2012-08-01, 18:04
+
Andrew Purtell 2012-08-01, 19:39
+
Devaraj Das 2012-08-03, 18:40
+
Stack 2012-12-27, 20:05
+
Jimmy Xiang 2012-12-27, 21:13
+
Enis Söztutar 2012-12-28, 01:37
Copy link to this message
-
Re: Handling protocol versions
On Thu, Dec 27, 2012 at 5:37 PM, Enis Söztutar <[EMAIL PROTECTED]> wrote:

> I think what Devaraj describes is a valid use case, and I am sure we will
> need it a few times. However, I suspect each of these might be unique, and
> we have to deal with how to handle backwards-forwards compat from the
> client differently (image META moving to zk, after 0.96). So we cannot
> easily generalize, and we may still have to drop support for features
> gradually.
>
>
I agree.  Just trying to make sure we have some facility in place to help
us over some of the humps.
> If we still keep the version, do we bump it every time a parameter is added
> to a method, or only when a new method is added? It does not sound very
> maintainable.
>
>
Version alone won't work.

The 0.94 branch might be version 100.

The 0.96 branch might be 105.

If we want to backport the method that cuts CO2 emissions by 25% but only
this method, what version do we give 0.94's protocol?  We could make it 101
but maybe 0.96.3 was 101?  We could give it a version that has not been
seen before but then it gets a little awkward to manage and understand.
 Regardless, client would have to keep a dictionary of methods per version
number, a pain.

The suggestion above was that the server gives off a list of features
written in shorthand, a bitmap, where bits are set when a feature is added.
 This way a client can look at the bitmap and see if the C02 saving feature
is available in the 0.94 server and if so, use that method.

> Not knowing much about the recent changes, why don't we go full PB, and
> define actual rpc methods as services? (as in
> https://developers.google.com/protocol-buffers/docs/proto#services)
>
>
I thought about it.  It has some nice facility that comes for free.  For
example, you can get an aforementioned pb'd description of the "protocol"
and actually used the return to compose an invocation against the server.
 Nice.  Our 'protocols' actually already implement Service.Interface from
pb (actually Service.BlockingInterface).  I'm not sure why as it looks to
complicate things going by a quick examination today (I started stripping
it out to see what would break).  So it would not take too much to get a
Stub on clientside and have servers implement the Service.  We could try
shoehorning our RPC so it implemented the necessary RpcController, etc.
Interfaces.

But it would seem Service is deprecated with a good while now [1] and folks
are encouraged to do otherwise because as is, the generated code makes for
too much "indirection" [1].

I could try playing around some more w/ using Service to learn more about
this 'indirection'.  We could use the long-hand service descriptor in place
of the above suggested bitmap figuring what the server provides.

St.Ack

1.
https://developers.google.com/protocol-buffers/docs/reference/java-generated#service
+
Stack 2013-01-02, 00:44
+
Elliott Clark 2013-01-02, 22:34
+
Stack 2013-01-07, 21:15
+
Devaraj Das 2012-12-28, 09:31
+
Stack 2012-12-28, 16:59
+
Devaraj Das 2012-12-28, 17:22
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB