Discussion:
[mongodb-user] mongo-c-driver async
Zhihua Wang
2016-12-07 10:27:32 UTC
Permalink
In c driver, I see these files mongoc-async-cmd.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-cmd.c>
, mongoc-async-private.h
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-private.h>
, mongoc-async.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async.c>
Are there any examles to use them? I want to implement an async client
instead of connection pool.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c6a66500-ab30-4a78-ad9d-50546bc471b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
A. Jesse Jiryu Davis
2016-12-07 16:45:25 UTC
Permalink
No, those are for the C Driver's own internal use only. Here's an
explanation of how the driver uses async networking internally for replica
set monitoring:

https://emptysqua.re/blog/server-discovery-and-monitoring-in-pymongo-perl-and-c/

The C Driver does not have an async client because multithreading scales
well enough for database clients. Read my analysis here:

https://jira.mongodb.org/browse/CDRIVER-27
Post by Zhihua Wang
In c driver, I see these files mongoc-async-cmd.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-cmd.c>
, mongoc-async-private.h
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-private.h>
, mongoc-async.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async.c>
Are there any examles to use them? I want to implement an async client
instead of connection pool.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/eb9740fe-953e-412d-b6a8-fb5d4dd6b0b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
A. Jesse Jiryu Davis
2016-12-07 16:51:08 UTC
Permalink
An example of using mongoc_client_pool_t with threads:

http://mongoc.org/libmongoc/current/mongoc_client_pool_t.html

On Wednesday, December 7, 2016 at 11:45:25 AM UTC-5, A. Jesse Jiryu Davis
Post by A. Jesse Jiryu Davis
No, those are for the C Driver's own internal use only. Here's an
explanation of how the driver uses async networking internally for replica
https://emptysqua.re/blog/server-discovery-and-monitoring-in-pymongo-perl-and-c/
The C Driver does not have an async client because multithreading scales
https://jira.mongodb.org/browse/CDRIVER-27
Post by Zhihua Wang
In c driver, I see these files mongoc-async-cmd.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-cmd.c>
, mongoc-async-private.h
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-private.h>
, mongoc-async.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async.c>
Are there any examles to use them? I want to implement an async client
instead of connection pool.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4c703c8d-4608-455a-911c-e9130caa6f9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Zhihua Wang
2016-12-08 01:54:32 UTC
Permalink
Thanks, very helpful

圚 2016幎12月8日星期四 UTC+8䞊午12:51:08A. Jesse Jiryu Davis写道
Post by A. Jesse Jiryu Davis
http://mongoc.org/libmongoc/current/mongoc_client_pool_t.html
On Wednesday, December 7, 2016 at 11:45:25 AM UTC-5, A. Jesse Jiryu Davis
Post by A. Jesse Jiryu Davis
No, those are for the C Driver's own internal use only. Here's an
explanation of how the driver uses async networking internally for replica
https://emptysqua.re/blog/server-discovery-and-monitoring-in-pymongo-perl-and-c/
The C Driver does not have an async client because multithreading scales
https://jira.mongodb.org/browse/CDRIVER-27
Post by Zhihua Wang
In c driver, I see these files mongoc-async-cmd.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-cmd.c>
, mongoc-async-private.h
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async-private.h>
, mongoc-async.c
<https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-async.c>
Are there any examles to use them? I want to implement an async client
instead of connection pool.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d6ac49d6-f902-42f3-8b11-6b25c7a88850%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...