Async C driver

607 views
Skip to first unread message

Marcus Clyne

unread,
Sep 1, 2011, 10:19:39 AM9/1/11
to mongodb-user
Hi,

Is there any update on when you'll have an async C client ready for
Mongo?

Thanks,

Marcus.

Gergely Nagy

unread,
Sep 1, 2011, 11:19:33 AM9/1/11
to mongod...@googlegroups.com
> Is there any update on when you'll have an async C client ready for
> Mongo?

There is a C driver that can be used in an async manner:
https://github.com/algernon/libmongo-client

Though, the async parts are not too well documented (as in: there's
hardly any examples on how to use them), and it's not all that
convenient to use it that way, either, but it certainly is possible.

That driver makes it possible to assemble binary blobs you can send
over the wire to MongoDB, in whatever way you please. So you assemble
the blob, and send it async, collect the reply, parse it (the library
provides tools to do that) and you can proceed from that point
onwards.

I have a half-baked async API, that's more convenient than the current
one, in the works, which will be part of the upcoming 0.2.0 release of
my driver. It should be ready by the end of October or thereabouts.

I'm happy to give pointers on async usage, either in private, or on the list.

--
|8]

Marcus Clyne

unread,
Sep 1, 2011, 12:32:10 PM9/1/11
to mongod...@googlegroups.com
Hi Gergely,

On 01/09/2011 18:19, Gergely Nagy wrote:
>> Is there any update on when you'll have an async C client ready for
>> Mongo?
> There is a C driver that can be used in an async manner:
> https://github.com/algernon/libmongo-client

Thanks for the link. I just had a quick look at the code, and it seems
pretty comprehensive. Good work!

How stable is it? Are you using it in production webservers anywhere?


> Though, the async parts are not too well documented (as in: there's
> hardly any examples on how to use them), and it's not all that
> convenient to use it that way, either, but it certainly is possible.
>
> That driver makes it possible to assemble binary blobs you can send
> over the wire to MongoDB, in whatever way you please. So you assemble
> the blob, and send it async, collect the reply, parse it (the library
> provides tools to do that) and you can proceed from that point
> onwards.
>
> I have a half-baked async API, that's more convenient than the current
> one, in the works, which will be part of the upcoming 0.2.0 release of
> my driver. It should be ready by the end of October or thereabouts.

OK. I'll keep my eye out. I probably wouldn't be able to work on using
the library until then anyway.


> I'm happy to give pointers on async usage, either in private, or on the list.

Thanks. I'll probably wait until v 0.2.0, then will ask if I need help. :-)

Cheers,

Marcus.

Kyle Banker

unread,
Sep 1, 2011, 3:07:26 PM9/1/11
to mongodb-user
There are plans to add an async module to the current mongo-c-driver,
but this likely won't be available for a couple months. Please add
yourself as a watcher to this issue:
https://jira.mongodb.org/browse/CDRIVER-27

Looks like you'll have more than one implementation to choose from!

Gergely Nagy

unread,
Sep 1, 2011, 4:02:11 PM9/1/11
to mongod...@googlegroups.com
Marcus Clyne <mar...@mylanguage.me> writes:

> Hi Gergely,
>
> On 01/09/2011 18:19, Gergely Nagy wrote:
>>> Is there any update on when you'll have an async C client ready for
>>> Mongo?
>> There is a C driver that can be used in an async manner:
>> https://github.com/algernon/libmongo-client
>
> Thanks for the link. I just had a quick look at the code, and it
> seems pretty comprehensive. Good work!
>
> How stable is it? Are you using it in production webservers anywhere?

I've been using it in production since about february, no problems so
far. Not with a webserver though, I store my system logs in MongoDB, and
it goes through the above library.

>> I'm happy to give pointers on async usage, either in private, or on the list.
> Thanks. I'll probably wait until v 0.2.0, then will ask if I need help. :-)

With a bit of luck, 0.2.0 will also come with more documentation and
examples than the current version (mind you, I think it has reasonably
decent docs even now :P).

--
|8]

Marcus Clyne

unread,
Sep 1, 2011, 4:29:28 PM9/1/11
to mongod...@googlegroups.com
On 01/09/2011 23:02, Gergely Nagy wrote:
> With a bit of luck, 0.2.0 will also come with more documentation and
> examples than the current version (mind you, I think it has reasonably
> decent docs even now :P).
Great, I'll keep an eye out for it.

Thanks,

Marcus.

ABo

unread,
Aug 17, 2014, 8:47:58 PM8/17/14
to mongod...@googlegroups.com


Gergely,

Have you any progress w async on your driver

Its easy to see the sync connections and cursors.. but nothing that suggested the asyc described above. Whats the file or function name??
mongo_sync_connection
*conn;
mongo_sync_cursor *cursor;
Reply all
Reply to author
Forward
0 new messages