[ANN] Asynchronous Java Driver 1.0.1 Released

382 views
Skip to first unread message

Rob Moore

unread,
Oct 7, 2012, 10:54:40 AM10/7/12
to mongod...@googlegroups.com

Version 1.0.1 of the Asynchronous Java Driver is now available:

This version is source and binary compatible with the 1.0.1 version of the driver and contains bug fixes and 1 addition to the API.

Changes since the 1.0.1 release include:
  • Updated the MongoCollection interface to support the save(...)/saveAsync(...) operation as a short cut for either an insert or update. See the JavaDoc for the full details.
  • Updated the QueryBuilder.and(...) to optimize away the $and operator when the sub-conditions of the query did not collide. In sharded environments, the mongos process does not route $and queries to a single shard and instead always relies on the scatter/gather strategy. Scatter/gather forces client update()s to set the multi-update flag to true. By optimizing the $and operator away, we can avoid having to set the multi-update flag.
  • Updated parsing of responses to inserts to throw a DuplicateKeyException in the case of an "ok" value of 1 but still having an error message.
  • Improved error handling for the send and receive threads to ensure connections are never into a half open state.
Thanks to all those who provided feedback and helped with testing the driver.

Keep the comments, suggestions, questions, and bug reports coming.

Rob.

gelin yan

unread,
Oct 19, 2012, 11:58:07 PM10/19/12
to mongod...@googlegroups.com


在 2012年10月19日星期五UTC+8上午12时20分55秒,Phil Gates-Idem写道:
Rob,

Perhaps you could move the project to GitHub? I have been looking for an alternative MongoDB Java driver that utilizes non-blocking I/O and you seem to have built your driver around that goal. I think community development support would be a good thing to have for this driver. Maybe it could eventually replace the synchronous driver that is officially supported.

Thanks,
Phil


Hi 

   I am interested in using this driver on android. Does it work?

Regards

gelin yan 

Rob Moore

unread,
Oct 22, 2012, 8:54:15 PM10/22/12
to mongod...@googlegroups.com


Hi 

   I am interested in using this driver on android. Does it work?


To be honest I don't know.  It should work as the dependencies within the JVM are from the "core" but I have not tried it.

Have you tried and run into a problem or are you wondering if someone has been successful already?

I have not found an easy method for validating that a third party jar works on the Dalvik runtime.  If anyone knows of one I'd be interested in the details.

Rob

Rob Moore

unread,
Oct 22, 2012, 9:35:24 PM10/22/12
to mongod...@googlegroups.com


On Thursday, October 18, 2012 12:20:55 PM UTC-4, Phil Gates-Idem wrote:
Rob,

Perhaps you could move the project to GitHub? I have been looking for an alternative MongoDB Java driver that utilizes non-blocking I/O and you seem to have built your driver around that goal. I think community development support would be a good thing to have for this driver. Maybe it could eventually replace the synchronous driver that is officially supported.


Phil,

Actually, the driver does not use non-blocking I/O.  Instead it uses a pair of threads (reader/writer) and fast message passing between the application thread and the read/write threads.  A very early version of the driver used NIO and selectors but after testing the performance we found the threaded model was better and the main win for NIO is handling lots of connections which is exactly what the driver is trying to avoid.

On hosting: The driver is still in very young and we are working hard to avoid fragmentation/breaks/cruft in the driver's API.  For this and a few other reasons we don't plan to add the code to GitHub.

If there are a features that you would like to see added to the driver you can either post a topic to this group or send me a message directly.  I do hope to one day get a public ticket system created. So far the copy/paste cycle for the few issues we have had people report has not caused enough pain to cause me to actually get it setup and other work always jumps in front.

Thanks for your feedback,
Rob.

anucekay

unread,
Dec 14, 2012, 4:22:41 PM12/14/12
to mongod...@googlegroups.com
Hai Rob, 

   I am looking at using your driver for reading from the oplog collection. I got to the point where i create the db, open the oplog and 
read the contents. Does the driver support tailable cursor?

thanks
Anu

Robert Moore

unread,
Dec 14, 2012, 7:52:20 PM12/14/12
to mongod...@googlegroups.com, anuc...@gmail.com
On 12/14/2012 04:22 PM, anucekay wrote:
> Hai Rob,
>
> I am looking at using your driver for reading from the oplog
> collection. I got to the point where i create the db, open the oplog and
> read the contents. Does the driver support tailable cursor?
>

In theory all of the pieces exist. I never exposed the capability
through the interfaces since I did not feel it had seen enough testing
and was worried about the impact it would have on other requests via the
same Mongo instance.

If you are willing to run a snapshot version and give me some feedback
on how it is interacting with other requests/usage of the
client/connection I'll send you a link to a version with the capability
exposed.

Rob.

anucekay

unread,
Dec 15, 2012, 4:08:19 PM12/15/12
to mongod...@googlegroups.com, anuc...@gmail.com
Sure. Send us the link and we want to give it a try.

Anu 

Rob Moore

unread,
Dec 20, 2012, 12:26:46 AM12/20/12
to mongod...@googlegroups.com, anuc...@gmail.com
Wanted to check in on how the testing of the tailable cursors was going and if you had an questions. 

Rob.

Rob Moore

unread,
Jan 3, 2013, 1:11:01 AM1/3/13
to mongod...@googlegroups.com, anuc...@gmail.com
On Saturday, December 15, 2012 4:08:19 PM UTC-5, anucekay wrote:
Sure. Send us the link and we want to give it a try.

 
Anu -

The 1.1.0 version of the driver has just been posted and contains the tailable cursor capability you requested.

Download from: http://www.allanbank.com/mongodb-async-driver/download.html

Rob. 
Reply all
Reply to author
Forward
0 new messages