DESCRIPTION

Add HTTP Subsystem

This http subsystem is based on the reactor model used by the
apache httpcomponents HTTPCore-NIO library.

Change-Id: If3d13aec9145e459498087507877bb15de45ec78


COMMENTS

author: Kenny Maynard
date: 2011-07-25 17:44:08.431000000

Uploaded patch set 2.

-------------------------------------
author: Kenny Maynard
date: 2011-07-25 17:45:46.575000000

Patch Set 2:

Please note I would like to make the getView/getViews functions async in the future, but I am deferring the task for now since I want to focus on other more important api stuff.

-------------------------------------
author: Andreas Short
date: 2011-07-26 02:49:32.520000000

Patch Set 2: I would prefer that you didn't submit this

(14 inline comments)



Line:26, src/main/java/net/spy/memcached/CouchbaseClient.java -> I know this one is first review, but whitespace!

Line:44, src/main/java/net/spy/memcached/CouchbaseClient.java -> This is wrong.  The list of servers comes back from the configuration, not from an assumption that all servers have a 5894 you can query.  We'll have to fetch it out of the configuration.

Line:49, src/main/java/net/spy/memcached/CouchbaseClient.java -> public methods need javadoc

Line:57, src/main/java/net/spy/memcached/CouchbaseClient.java -> Maybe this is okay, but why return null here?  This just forces a null check elsewhere?  And should this be error level logging?

At the moment, I can't think of a good reason for getting a null View object if the view isn't there.  You won't be able to recover later.  Throw an Exception here?

Line:93, src/main/java/net/spy/memcached/CouchbaseClient.java -> similar to the other addOp, there should be doc here saying "don't use this".  Also, does it really need to be public?

Line:107, src/main/java/net/spy/memcached/CouchbaseClient.java -> The super class has this check against duplicate attempts to shutdown.  Should that check be here as well?

Line:94, src/main/java/net/spy/memcached/CouchbaseConnection.java -> Just round robining here?

Line:107, src/main/java/net/spy/memcached/CouchbaseConnection.java -> A method to maybe throw an unchecked exception and call an assertion?

Line:130, src/main/java/net/spy/memcached/CouchbaseConnection.java -> I presume getting rid of nodes needs to go in here yet?

Line:140, src/main/java/net/spy/memcached/CouchbaseConnection.java -> Must not be complete.  I'll look at API mostly in this review then.

Line:3, src/main/java/net/spy/memcached/CouchbaseNode.java -> Definitely wrong.  Feels copy and pasty.

Line:150, src/main/java/net/spy/memcached/CouchbaseNode.java -> This seems to say, if it's not MICROSECONDS, convert it to MILLISECONDS.  So if I say MAX_LONG of microseconds, then it'll wait a long set of milliseconds?

I may have this wrong, but it's not clear what you're trying to do here.  I suspect this was borrowed from an example.

Line:217, src/main/java/net/spy/memcached/CouchbaseNode.java -> log levels here need review.  I'm thinking some of these should be more error, and some should be more debug in nature.

Line:88, buildfile -> Are these the oldest we can rely on?

-------------------------------------
author: Kenny Maynard
date: 2011-07-26 06:13:07.775000000

Patch Set 2: (14 inline comments)



Line:26, src/main/java/net/spy/memcached/CouchbaseClient.java -> Done

Line:44, src/main/java/net/spy/memcached/CouchbaseClient.java -> Also adding a bug for this, but I plan on having it fixed for the developer preview. Spy-4.

Line:49, src/main/java/net/spy/memcached/CouchbaseClient.java -> Done

Line:57, src/main/java/net/spy/memcached/CouchbaseClient.java -> To me this is like doing a get in memcached and if the object doesn't exist in the cache then we return null to the user. In a later commit the view's will be returned as futures and even in that case if you try to get a non-existent view you will get null. I don't really see a better way of doing it.

Line:93, src/main/java/net/spy/memcached/CouchbaseClient.java -> Done

Line:107, src/main/java/net/spy/memcached/CouchbaseClient.java -> I made the couchbase connection check for double shutdown here too, but my solution is not an optimal one. In this case I will file a bug and solve the issue later. Spy-3.

Line:94, src/main/java/net/spy/memcached/CouchbaseConnection.java -> For now yes. In the future, I plan on doing something better.

Line:107, src/main/java/net/spy/memcached/CouchbaseConnection.java -> It was in the MemcachedConnection so I brought it over here and I do use it.

Line:130, src/main/java/net/spy/memcached/CouchbaseConnection.java -> Yes, we haven't done any cluster reconfiguration work yet. That will come later.

Line:140, src/main/java/net/spy/memcached/CouchbaseConnection.java -> No it's not complete. This will also be handled when I do the operation refactoring.

Line:3, src/main/java/net/spy/memcached/CouchbaseNode.java -> I think you told me to do this.

Line:150, src/main/java/net/spy/memcached/CouchbaseNode.java -> Done

Line:217, src/main/java/net/spy/memcached/CouchbaseNode.java -> Done

Line:88, buildfile -> Yeah, I actually saw lots of fixes pertaining to chunk encoding in the 4.1 releases.

-------------------------------------
author: Andreas Short
date: 2011-07-26 06:50:50.077000000

Patch Set 2: (3 inline comments)

A few things here.

Line:107, src/main/java/net/spy/memcached/CouchbaseConnection.java -> Not sure what you're trying to do here, this needs to be addressed.

Line:10, src/main/java/net/spy/memcached/protocol/couchdb/View.java -> Views should not be public, right?  This should be private I think.

If it is public, then it should have longer names for the strings.

Line:29, src/main/java/net/spy/memcached/couch/AsyncConnectionManager.java -> whitespace issues all over this file

-------------------------------------
author: Kenny Maynard
date: 2011-07-26 07:03:31.211000000

Patch Set 2: (3 inline comments)

Will do whitespace last

Line:107, src/main/java/net/spy/memcached/CouchbaseConnection.java -> Made it protected.

Line:10, src/main/java/net/spy/memcached/protocol/couchdb/View.java -> It's protected now.

Line:29, src/main/java/net/spy/memcached/couch/AsyncConnectionManager.java -> Will address soon.

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