<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:55 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-344] Asynchronous (event driven) Driver</title>
                <link>https://jira.mongodb.org/browse/CXX-344</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;The biggest drawback in the client driver currently is that all the API functions are blocking. &lt;/p&gt;

&lt;p&gt;Being able to pass a callback function to functions such as getLastError will not only lead to better design, but also a huge performance and concurrency increase.&lt;/p&gt;

&lt;p&gt;The low level sockets are as far as I can deduce already asynchronous. It should be possible to build from that into an asynchronous event driven driver.&lt;/p&gt;

&lt;p&gt;Since boost is already employed I recommend looking at asio and bind.&lt;/p&gt;</description>
                <environment></environment>
        <key id="158823">CXX-344</key>
            <summary>Asynchronous (event driven) Driver</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="david.golden@mongodb.com">David Golden</assignee>
                                    <reporter username="pieterwjordaanpc@gmail.com">Pieter Jordaan</reporter>
                        <labels>
                            <label>async</label>
                            <label>concurrency</label>
                            <label>driver</label>
                            <label>events</label>
                            <label>performance</label>
                    </labels>
                <created>Thu, 18 Sep 2014 07:29:04 +0000</created>
                <updated>Mon, 8 Jan 2024 15:30:25 +0000</updated>
                            <resolved>Fri, 9 Sep 2016 16:15:37 +0000</resolved>
                                                                                        <votes>1</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1380601" author="david.golden" created="Fri, 9 Sep 2016 16:15:37 +0000"  >&lt;p&gt;I&apos;m doing a review of long-open tickets to clean up our backlog.  Given the current design wrapping the C driver, we won&apos;t be implementing async support in the C++11 driver.&lt;/p&gt;

&lt;p&gt;I&apos;ll raise the general issue with our product management team for longer-term planning.&lt;/p&gt;</comment>
                            <comment id="1124720" author="pieterwjordaanpc@gmail.com" created="Sat, 2 Jan 2016 09:53:57 +0000"  >&lt;p&gt;I agree that this can be done with threads at the application level, however it would be much more efficient when done at socket level in the driver itself. &lt;/p&gt;</comment>
                            <comment id="1124719" author="alexhultman" created="Sat, 2 Jan 2016 08:09:49 +0000"  >&lt;p&gt;I would like to see this as well. But just like Andrew said, it doesn&apos;t really matter that much since you can simulate this with threads. It&apos;s a completely different thing dealing with 100k connections but since you typically have a very limited amount of connections to mongod, it&apos;s no problem at all to use threads. Don&apos;t buy into the hype of async without thinking about what you really need. I used this blocking driver at my last workplace and it performed far beyond any JavaScript async counterpart when paired with efficient threading.&lt;/p&gt;</comment>
                            <comment id="840148" author="acm" created="Mon, 2 Mar 2015 15:01:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pieterwjordaanpc%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;pieterwjordaanpc@gmail.com&quot;&gt;pieterwjordaanpc@gmail.com&lt;/a&gt; -&lt;/p&gt;

&lt;p&gt;Thanks for getting back to us. I&apos;m happy to re-open this ticket, thought I&apos;d like to provide some clarification on why I don&apos;t expect it to be resolved in the near term.&lt;/p&gt;

&lt;p&gt;The first important thing to consider is that the master branch driver is really a thin shell around the C driver, and we hope to retain this model. The C driver does not currently expose an asynchronous interface. So designing and implementing an async API for the C driver is a prerequisite to offering an asynchronous interface for the C&amp;#43;&amp;#43; driver. I recommend coordinating with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mira.carey%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mira.carey@mongodb.com&quot;&gt;mira.carey@mongodb.com&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt; to either file a CDRIVER ticket requesting this, or to follow an existing ticket, if one already exists.&lt;/p&gt;

&lt;p&gt;The second consideration is that it was unclear to the developers of the C&amp;#43;&amp;#43;11 driver what direction the ISO C&amp;#43;&amp;#43; committee was taking networking and async support post C&amp;#43;&amp;#43;14. We are very interested in seeing what emerges from the TS process, and felt that it was premature to design a solution before, at the very least, the network TS arrives.&lt;/p&gt;

&lt;p&gt;Overall, we felt that delaying the C&amp;#43;&amp;#43;11 driver further in an effort to wait out the above issues would have been a mistake.&lt;/p&gt;

&lt;p&gt;Finally, I think it is very likely possible to effectively simulate an async driver by placing a thread pool and work queue of closures in front of the driver. If you are interested in pursuing this angle we would be happy to provide sample code, most likely as an additional mongocxx example.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Andrew&lt;/p&gt;</comment>
                            <comment id="839998" author="pieterwjordaanpc@gmail.com" created="Mon, 2 Mar 2015 09:41:10 +0000"  >&lt;p&gt;Will you reopen this for the C++11 rewrite master branch?&lt;/p&gt;</comment>
                            <comment id="799138" author="adam.midvidy" created="Wed, 7 Jan 2015 16:48:22 +0000"  >&lt;p&gt;At this time we do not plan to make significant changes to the implementation of the legacy driver.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="298518">CXX-965</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsjf3j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>138267</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>