|
| 1 | +.. _c-async-driver: |
| 2 | + |
| 3 | +============================== |
| 4 | +Async C Driver: Public Preview |
| 5 | +============================== |
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 1 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +.. facet:: |
| 14 | + :name: genre |
| 15 | + :values: reference |
| 16 | + |
| 17 | +.. meta:: |
| 18 | + :keywords: amongoc, async, preview, asynchronous, prototype |
| 19 | + |
| 20 | +We are excited to share the release of a new prototype that could reshape how |
| 21 | +C developers interact with MongoDB: the ``amongoc`` library. This experimental driver |
| 22 | +leverages the power of asynchronous programming to offer an efficient, non-blocking |
| 23 | +interface for MongoDB operations. Although still in public preview and not yet ready |
| 24 | +for production, your feedback will play a crucial role in shaping the future direction |
| 25 | +of this project. |
| 26 | + |
| 27 | + |
| 28 | +What is amongoc? |
| 29 | +---------------- |
| 30 | + |
| 31 | +``amongoc``, short for "asynchronous MongoDB C driver," is designed for developers |
| 32 | +who need a performant, asynchronous client library for MongoDB. It implements a selected |
| 33 | +subset of MongoDB driver APIs to provide a sneak peek into what a C-based asynchronous |
| 34 | +client might look like. By evaluating this prototype, developers can help us gather |
| 35 | +critical insights that could influence the development of a production-ready solution |
| 36 | +in the near future. |
| 37 | + |
| 38 | +Why Go Asynchronous? |
| 39 | +-------------------- |
| 40 | + |
| 41 | +The motivation for building ``amongoc`` is rooted in performance optimization and |
| 42 | +providing high concurrency. Asynchronous programming decouples the initiation of a |
| 43 | +task from its continuation, addressing the inefficiencies of synchronous operations, |
| 44 | +particularly I/O, which are inherently slow and can block other processes. |
| 45 | +Asynchronous programming allows applications to remain responsive while waiting for |
| 46 | +I/O operations to complete, making it ideal for high-performance, network-intensive |
| 47 | +use cases. ``amongoc`` will also facilitate the integration of MongoDB into asynchronous |
| 48 | +frameworks like Drogon. Notably, it has also been the `top requested feature <https://feedback.mongodb.com/forums/924286-drivers/suggestions/47080057-asynchronous-variant-of-mongodb-c-driver>`__ for the |
| 49 | +C driver by users. |
| 50 | + |
| 51 | +Getting Started with amongoc |
| 52 | +---------------------------- |
| 53 | + |
| 54 | +To explore ``amongoc``, visit the `GitHub repository <https://github.com/mongodb-labs/mongo-c-driver-async/>`__ |
| 55 | +and access our comprehensive `Documentation <https://mongodb-labs.github.io/mongo-c-driver-async/>`__. |
| 56 | +Our resources include: |
| 57 | + |
| 58 | +- A step-by-step `Quickstart guide <https://github.com/mongodb-labs/mongo-c-driver-async/tree/develop/etc/quickstart>`__ |
| 59 | + to help you set up and initiate your first connection. |
| 60 | +- Detailed `Reference documentation <https://mongodb-labs.github.io/mongo-c-driver-async/ref/>`__ |
| 61 | + covering the configuration, building, and usage of the library. |
| 62 | +- `Tutorials <https://mongodb-labs.github.io/mongo-c-driver-async/learn/>`__ to walk you through |
| 63 | + common use cases and showcase the potential of asynchronous operations. |
| 64 | +- A list of `amongoc features <https://mongodb-labs.github.io/mongo-c-driver-async/ref/features/>`__ |
| 65 | +- Descriptions of `amongoc’s design considerations <https://mongodb-labs.github.io/mongo-c-driver-async/explain/consider/>`__ |
| 66 | + and `amongoc’s asynchrony model <https://mongodb-labs.github.io/mongo-c-driver-async/explain/async-model/>`__ |
| 67 | + |
| 68 | +The following example is an application that initializes an asynchronous event loop and attempts to establish a connection to a local MongoDB server using the ``amongoc`` library: |
| 69 | + |
| 70 | +.. literalinclude:: /includes/async-c-driver-example.c |
| 71 | + :language: c |
| 72 | + :dedent: |
| 73 | + |
| 74 | +Feedback: Your Voice Matters |
| 75 | +---------------------------- |
| 76 | + |
| 77 | +This public preview release is focused on gathering user feedback to inform the architectural |
| 78 | +decisions for a production-ready version of ``amongoc``. We invite you to share your thoughts and |
| 79 | +suggestions in GitHub `discussions <https://github.com/mongodb-labs/mongo-c-driver-async/discussions>`__ |
| 80 | +and `issues <https://github.com/mongodb-labs/mongo-c-driver-async/issues>`__. We are especially |
| 81 | +interested in your opinions about the interface, and the build and runtime requirements. Our goal |
| 82 | +is to collect as much user input as possible to align with the needs and expectations of our user community. Your feedback is invaluable, and we eagerly look forward to hearing from you and seeing what you'll create with ``amongoc``! |
0 commit comments