DESCRIPTION

JVMCBC-205: Support HELLO command and feature negotiation.

Motivation
----------
To negotiate supported features between the client and the server,
a new HELLO command has been introduced. The client asks what features
are available (that it supports) and the server will respond with the
ones it has enabled.

The common baseline can then be utilized at runtime. This allows the
client to conditionally use new features like optimized observe,
optimized RYW N1QL queries or forcing TCP_NODELAY on the server
side.

In addition to that, it allows for future negotiations like compression,
datatypes and many more.

Finally, on every HELLO command the client identifies itself with its
user agent, allowing for better logging and tracing on the server side
(which clients are active,...).

Modifications
-------------
In this changeset, the negotiation process is hooked up into the KV
pipeline and always asks for:

- TCP_NODELAY (disable nagle)
- MUTATION_SEQNO (returning seqnos on mutations)

If the server supports them, they will be enabled.

Both options will be made configurable in later changesets to not
bloat this one too much. See JVMCBC-206 and JVMCBC-207 for the
follow-up tickets.

Result
------
Intelligent handshaking between client and server features.

Change-Id: I5dd15c8cb5767fcb7b3152216ad215cda0c1ddd8
Reviewed-on: http://review.couchbase.org/51974
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2015-06-15 17:05:54.499000000

Change has been successfully cherry-picked as 536c944e556b7c25c9fab1da10a4f465b667701b

-------------------------------------
