[infinispan-dev] Hot Rod - pt3

Manik Surtani manik at jboss.org
Mon Dec 21 06:36:41 EST 2009


On 21 Dec 2009, at 11:08, Galder Zamarreno wrote:

> Hi all,
> 
> Re: http://community.jboss.org/wiki/HotRodProtocol
> 
> First, I've made the corresponding changes based on the feedback I got 
> from pt2. This included reducing the response header since clients are 
> already aware of what they sent, addition of topology view id to to non 
> dumb requests and further specification in responses when topology 
> changes have happened...etc.
> 
> I've also added flags to the request header that allow sending 
> Infinispan flags like: skip cache store, zero lock acquisition 
> timeout...etc.

> Note that I've noted this as being N * 1 byte where each byte represents 
> a flag. However, I think this could maybe be sent more efficiently by 
> using XOR, i.e.
> 
> 0x00 -> no flag
> 0x01 (0000 0001) -> zero lock acquisition
> 0x02 (0000 0010) -> cache mode local
> 0x03 (0000 0011) -> zero lock acquisition + cache mode local
> 0x04 (0000 0100) -> skip locking
> ...etc.
> 
> With 2 bytes, we could implement 16 Flags, we currently 11. However, we 
> could use vint as well, making sure that the most significant bit does 
> not mean anything flag wise. Iow, with vint, in 1 byte we'd be able to 
> define 7 diff flags. Thoughts?

+1

> I've also added the quit command that disconnects clients.

Does this have any effect on the servers?

> Finally, as far as I'm concerned, the specification is complete. I'm 
> leaving the quiet commands out of this initial scope (see 
> http://code.google.com/p/memcached/wiki/MemcacheBinaryProtocol). 
> Remember that quiet commands could be used so that the server buffers 
> responses and only when you send a non-quiet command, the server replies 
> with all the pending answers.
> 
> As you can see at the bottom of the wiki, I've added a local only put 
> request/response example so that readers get an idea of what a full 
> command looks like. I had received some feedback from readers saying 
> that it was difficult to understand how it all fit together.

The examples look good, however I would not use the LOCAL_ONLY flag since that flag really only has meaning in a p2p context.  In a client-server context, this flag is useless, and probably meaningless.  I would suggest a different flag for the example, e.g., ZERO_LOCK_TIMEOUT.

> I'll probably add a couple more examples for non-so-dumb and clever 
> request/responses but I'll held them until we have a final round of 
> feedback and people can indicate whether they want any other examples 
> appearing in the wiki.
> 
> Cheers,
> -- 
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list