Skip to content

DOCSP-31430: Explain new API benefits #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 15, 2023
32 changes: 30 additions & 2 deletions source/legacy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Migrate from the Legacy API
Overview
--------

In this section, you can identify the changes you need to make to migrate from
the legacy API to the current API.
On this page, you can identify the changes you must make to migrate from the
legacy API to the current API. You can also learn about features unique to
the current {+driver-short+} and the benefits of migrating to the new API.


The legacy API, packaged as the ``mongodb-driver-legacy`` JAR, contains
the legacy synchronous Java driver and uses naming conventions used in earlier
Expand All @@ -37,6 +39,32 @@ In addition to updating your application to handle any necessary changes,
always check for any other differences in options and return values before
moving it to production.

Current API Benefits
--------------------

You can continue to use the legacy API with each new {+mdb-server+} release.
However, the legacy API does not support any updates introduced in {+mdb-server+}
3.0 or later. Additionally, the legacy API lacks support for certain features
of the current {+driver-short+}. Some features only available in the non-legacy
API include:

- **Change streams**, a {+mdb-server+} feature designed to monitor real-time
changes to a single collection, database, or deployment
- **Multi-document ACID transactions**, which ensure atomicity of reads and
writes to multiple documents and allow for transactions across multiple
operations, collections, databases, documents, and shards
- **Time series collections**, which store sequences of measurements over a
period of time and improve query efficiency for time series data
- **Queryable Encryption**, which allows you to encrypt sensitive workloads
and to query the encrypted data
- **Java records**, or concise Java classes that separate business logic from
data representation and reduce boilerplate code
- **Native POJO support**, which provides automatic or custom mapping between
MongoDB documents and Java objects

To learn about more features of the current API, see :ref:`java-whats-new`.


API Changes
-----------

Expand Down