Skip to content

Remove edge server mentions #3388

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 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions source/sdk/dotnet/app-services/connect-to-app-services-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,68 +50,3 @@ method. The following example sets the LogLevel and the request timeout:
You can create multiple App client instances to connect to multiple
Apps. All App client instances that share the same App ID use the same
underlying connection.

.. _dotnet-connect-to-specific-server:

Connect to a Specific Server
----------------------------

By default, Atlas Device SDK connects to Atlas using the global ``baseURL``
of ``https://services.cloud.mongodb.com``. In some cases, you may want to
connect to a different server:

- Your App Services App uses :ref:`local deployment <local-deployment>`, and
you want to connect directly to a local ``baseURL`` in your region.

You can specify a ``baseURL`` in the
:dotnet-sdk:`AppConfiguration <reference/Realms.Sync.AppConfiguration.html#Realms_Sync_AppConfiguration_BaseUri>`.

.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs
:language: csharp

Connect to a Different Server During Runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 12.1.0

In some cases, you might want to change the ``baseURL`` while the app is
running. To change
the ``baseURL`` during runtime, call the
:dotnet-sdk:`app.UpdateBaseUriAsync() <reference/Realms.Sync.App.html#Realms_Sync_App_UpdateBaseUriAsync_System_Uri_>`
method:

.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs
:language: csharp

This API is experimental. As seen above, you must use ``#pragma warning disable Rlm001``
and ``#pragma warning restore Rlm001`` to suppress the experimental errors,
where ``Rlm001`` is the experimental attributes's ``diagnosticId``.

If you want to change the ``baseURL`` after you have logged in a user and
have opened a synced database, the app must perform a
:ref:`client reset <dotnet-client-resets>`. Perform these steps in your code:

1. :ref:`Pause the Sync session <dotnet-suspend-resume-sync>`.
2. Update the ``baseURL`` by calling the ``app.updateBaseUrl(to: )`` method.
3. Authenticate and log the user in again with the new ``baseURL``.
4. Open a synced database pulling data from the new server.

Both the server and the client must be online for the user to authenticate and
connect to the new server. If the server is not online or the client does not
have a network connection, the user cannot authenticate and open the database.

.. important:: Changing an App Config After Initializing the App

.. versionchanged:: v11.7.0
``BaseUri`` is not cached in the App configuration

When you initialize the App client, the configuration is cached internally.
Attempting to close and then re-open an App with a changed configuration
within the same process has no effect. The client continues to use the
cached configuration.

In .NET SDK version 11.7.0 and later, the :dotnet-sdk:`BaseUri <reference/Realms.Sync.AppConfiguration.html#Realms_Sync_AppConfiguration_BaseUri>`
is *no longer* cached in the App configuration. This means that you can change the
``BaseUri``, and the App client will use the updated configuration. In
earlier SDK versions, changes to the ``BaseUri`` in a cached App
configuration have no effect.
48 changes: 0 additions & 48 deletions source/sdk/kotlin/app-services/connect-to-app-services-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,54 +261,6 @@ method, which accepts a Boolean value.
This feature is currently only available on Android and Java Virtual
Machine (JVM) platforms.

.. _kotlin-connect-to-specific-server:

Connect to a Specific Server
----------------------------

By default, Atlas Device SDK connects to Atlas using the global ``baseUrl``
of ``https://services.cloud.mongodb.com``. In some cases, you may want to
connect to a different server:

- Your App Services App uses local deployment, and you want to connect directly to a local ``baseUrl`` in your region.
For more information, refer to the :ref:`<local-deployment>` App Services documentation.

You can specify a ``baseUrl`` in the
`AppConfiguration <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb/-app-configuration/index.html>`__:

.. literalinclude:: /examples/generated/kotlin/AppClientTest.snippet.custom-base-url.kt
:language: kotlin

Connect to a Different Server During Runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 1.16.0

In some cases, you might want to change the ``baseUrl`` while the app is
running.

To change the ``baseUrl`` during runtime, call the experimental
`app.updateBaseUrl <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb/-app/index.html#2007791704%2FFunctions%2F380376748>`__ method. You can
pass ``null`` to reset the ``baseUrl`` to the default value.

.. literalinclude:: /examples/generated/kotlin/AppClientTest.snippet.change-base-url.kt
:language: kotlin

If you change the ``baseUrl`` *after* you have logged in a user and
have opened a synced database, the app must perform a client reset. For more
information, refer to :ref:`kotlin-client-reset`.

Perform the following in your code:

1. :ref:`Pause the Sync session <kotlin-pause-resume-sync>`
2. Update the ``baseUrl`` using the ``app.updateBaseUrl`` method
3. Re-authenticate the user to log in using the new ``baseUrl``
4. Open a synced database pulling data from the new server

Both the server and the client *must* be online for the user to authenticate and
connect to the new server. If the server is not online or the client does not
have a network connection, the user cannot authenticate and open the database.

Close the App Client
--------------------

Expand Down
95 changes: 0 additions & 95 deletions source/sdk/node/app-services/connect-to-app-services-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,98 +139,3 @@ To encrypt App metadata:
:tabid: javascript

.. include:: /examples/generated/node/v12/formatted/metadata.test.snippet.encrypt-metadata.js.rst

Connect to a Specific Server
----------------------------

By default, Atlas Device SDK connects to Atlas using the global ``baseURL``
of ``https://services.cloud.mongodb.com``. In some cases, you may want to
connect to a different server:

- Your App Services App uses :ref:`local deployment <local-deployment>`, and
you want to connect directly to a local ``baseURL`` in your region.

You can specify a ``baseURL`` in the
:js-sdk:`AppConfiguration <types/Realm.AppConfiguration.html>`:

.. tabs-realm-languages::

.. tab::
:tabid: typescript

.. literalinclude:: /examples/generated/node/v12/formatted/app-services.test.snippet.custom-base-url.ts.rst
:language: typescript

.. tab::
:tabid: javascript

.. literalinclude:: /examples/generated/node/v12/formatted/app-services.test.snippet.custom-base-url.js.rst
:language: javascript

.. _node-change-server-during-runtime:

Connect to a Different Server During Runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 12.8.0

In some cases, you might want to change the ``baseURL`` while the app is
running.

To change the ``baseURL`` during runtime, call the ``app.updateBaseUrl()``
method. Note that the string value can't end in a trailing slash.

.. tabs-realm-languages::

.. tab::
:tabid: typescript

.. include:: /examples/generated/node/v12/formatted/app-services.test.snippet.change-base-url.ts.rst

.. tab::
:tabid: javascript

.. include:: /examples/generated/node/v12/formatted/app-services.test.snippet.change-base-url.js.rst

This API is experimental, so you must use the experimental import in the file
where you want to use this API:

.. include:: /examples/generated/node/v12/formatted/app-services.test.snippet.import-experimental-baseurl.ts.rst

.. _node-change-server-typescript:

TypeScript Config for Experimental API
``````````````````````````````````````

The ``app.updateBaseUrl()`` method is in an experimental module that you must
import separately. To get the proper types from this module, you need to set the
following fields in your ``tsconfig.json`` file:

.. code-block:: json
:copyable: true

{
"target": "es2022",
"module": "node16",
"moduleResolution": "node16",
// ...
}


Change Server with Logged-in User
`````````````````````````````````

If you want to change the ``baseURL`` after you have logged in a user and
have opened a synced database, the app must perform a
:ref:`client reset <node-perform-a-client-reset>`. Perform these steps in your
code:

1. :ref:`Pause the Sync session <node-pause-or-resume-a-sync-session>`.
2. Update the ``baseURL`` by calling the ``app.updateBaseUrl()`` method.
3. Go through the authentication flow again to log in the user through the
new ``baseURL``.
4. Open a synced database pulling data from the new server.

Both the server and the client must be online for the user to authenticate and
connect to the new server. If the server is not online or the client does not
have a network connection, the user cannot authenticate and open the database.
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,3 @@ To encrypt App metadata:
#. Pass the App configuration object to ``new Realm.App()``.

.. include:: /examples/generated/react-native/v12/EncryptMetadata.snippet.encrypt-metadata.tsx.rst

Connect to a Specific Server
----------------------------

By default, Atlas Device SDK connects to Atlas using the global ``baseURL``
of ``https://services.cloud.mongodb.com``. In some cases, you may want to
connect to a different server:

- Your App Services App uses :ref:`local deployment <local-deployment>`, and
you want to connect directly to a local ``baseURL`` in your region.

You can specify a ``baseURL`` as a prop for :ref:`AppProvider <react-native-app-provider>`.
All :js-sdk:`AppConfiguration <types/Realm.AppConfiguration.html>` keys can be
passed as props to ``AppProvider``.

Connect to a Different Server During Runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionchanged:: ``[email protected]``

In some cases, you might want to change the ``baseURL`` while the app is
running.

Currently, this feature is implemented as an experimental module that requires
specific TypeScript configuration. The required configuration can be difficult
to make work with a React Native app. For more information on implementation, refer to :ref:`documentation for the
Node.js SDK <node-change-server-typescript>`.
49 changes: 0 additions & 49 deletions source/sdk/swift/app-services/connect-to-app-services-backend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,55 +104,6 @@ refer to :objc-sdk:`RLMSyncTimeoutOptions <Classes/RLMSyncTimeoutOptions.html>`.
.. literalinclude:: /examples/generated/code/start/RealmApp.snippet.app-config-sync-timeout.swift
:language: swift

.. _swift-connect-to-specific-server:

Connect to a Specific Server
----------------------------

By default, Atlas Device SDK connects to Atlas using the global ``baseURL``
of ``https://services.cloud.mongodb.com``. In some cases, you may want to
connect to a different server:

- Your App Services App uses :ref:`local deployment <local-deployment>`, and
you want to connect directly to a local ``baseURL`` in your region.

You can specify a ``baseURL`` in the
:swift-sdk:`AppConfiguration <Extensions/AppConfiguration.html>`:

.. literalinclude:: /examples/generated/code/start/RealmApp.snippet.custom-base-url.swift
:language: swift

Connect to a Different Server During Runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 10.50.0

In some cases, you might want to change the ``baseURL`` while the app is
running. To change
the ``baseURL`` during runtime, call the ``app.updateBaseUrl(to: )`` method:

.. literalinclude:: /examples/generated/code/start/RealmApp.snippet.change-base-url.swift
:language: swift

This API is experimental, so you must use the experimental import in the file
where you want to use this API:

.. literalinclude:: /examples/generated/code/start/RealmApp.snippet.import-experimental.swift
:language: swift

If you want to change the ``baseURL`` after you have logged in a user and
have opened a synced database, the app must perform a
:ref:`client reset <ios-client-reset>`. Perform these steps in your code:

1. :ref:`Pause the Sync session <swift-suspend-sync-session>`.
2. Update the ``baseURL`` by calling the ``app.updateBaseUrl(to: )`` method.
3. Authenticate and log the user in again with the new ``baseURL``.
4. Open a synced database pulling data from the new server.

Both the server and the client must be online for the user to authenticate and
connect to the new server. If the server is not online or the client does not
have a network connection, the user cannot authenticate and open the database.

Supported Operating Systems
---------------------------

Expand Down
Loading