From a0d4e795e93a6a70bb6e932194e13c57881ade7d Mon Sep 17 00:00:00 2001 From: Dachary Date: Mon, 4 Dec 2023 16:44:48 -0500 Subject: [PATCH] (DOCSP-34585): Clarify details about the different ways of connecting with Edge Server (#642) * Move wire protocol connection details to 'Connect' page * Add details about the different ways you can connect * Apply suggestion from review Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- source/edge-server/connect.txt | 71 +++++++++++++++++++++++++++++++--- source/edge-server/mongodb.txt | 34 +++------------- 2 files changed, 72 insertions(+), 33 deletions(-) diff --git a/source/edge-server/connect.txt b/source/edge-server/connect.txt index 9da2a7a32..be2859f13 100644 --- a/source/edge-server/connect.txt +++ b/source/edge-server/connect.txt @@ -4,6 +4,10 @@ Connect to an Edge Server ========================= +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -14,15 +18,26 @@ Once the Edge Server is :ref:`configured ` and :ref:`running `, you can connect to it from a client application. +There are two ways you can connect to the Edge Server from a client: + +- Using the Device SDKs +- Using MongoDB Drivers and tools + +When you connect to Edge Server using a Device SDK, Device Sync automatically +synchronizes data across devices and with the Edge Server. If you connect +to Edge Server using MongoDB Drivers or tools, you can perform CRUD operations +with a subset of supported MongoDB APIs. + .. _edge-server-connect-from-client: -Connect to the Edge Server from a Client ----------------------------------------- +Connect to the Edge Server from the Device SDK +---------------------------------------------- -To connect to the Edge Server from a client, your app must: +To connect to the Edge Server from a Device SDK client, your app must: -- Set the Sync URL to the public-accessible DNS address you set in the - Edge Server :ref:`config's ` ``hostname`` +- Set the Sync URL on the App configuration to the public-accessible DNS + address you set in the Edge Server + :ref:`config's ` ``hostname`` field. - If TLS is not enabled, use HTTP over port 80. @@ -33,6 +48,18 @@ To connect to the Edge Server from a client, your app must: you can coordinate with your Product or Account Representative to configure HTTPS with a self-signed certificate. +For information about customizing the App configuration, refer to the +documentation for your preferred SDK: + +- C++ SDK: :ref:`cpp-connect-to-backend` +- Flutter SDK: :ref:`flutter-connect-to-backend` +- Java SDK: :ref:`java-init-appclient` +- Kotlin SDK: :ref:`kotlin-connect-to-backend` +- .NET SDK: :ref:`dotnet-init-appclient` +- Node.js SDK: :ref:`node-connect-to-mongodb-realm-backend-app` +- React Native SDK: :ref:`react-native-connect-to-mongodb-realm-backend-app` +- Swift SDK: :ref:`ios-init-appclient` + Example: SwiftUI Template App ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -161,3 +188,37 @@ modifications you can make to the :github:`Swift template app In a console app, delete the ``mongodb-realm`` directory. If you're using an iOS or Android simulator or device, uninstall and reinstall the app. + +.. _edge-server-wireprotocol-connect: + +Connect to the Edge Server with a MongoDB URI +--------------------------------------------- + +You can connect to the Edge Server using standard MongoDB Drivers and tools. +Clients use a specialized MongoDB URI connection string to connect to +Edge Server and send requests. + +The wire protocol server is on by default. You can connect to it via the +host machine using this MongoDB URI: + +.. code:: console + + mongodb://EDGE_SERVER_HOSTNAME:27021 + +The ``EDGE_SERVER_HOSTNAME`` is the public DNS of your Edge Server host. +For more information, refer to :ref:`edge-server-install-and-configure`. + +You must make port 27021 accessible to the client through port mapping or +firewall rules. + +.. example:: + + A wire protocol connection URI for an Edge Server hosted on Amazon EC2 + might look similar to: + + .. code:: console + + mongodb://ec2-13-58-70-88.us-east-2.compute.amazonaws.com:27021 + +Edge Server currently supports a subset of the MongoDB APIs. For information +about the supported APIs, refer to :ref:`edge-server-mongodb`. diff --git a/source/edge-server/mongodb.txt b/source/edge-server/mongodb.txt index 517cf900d..ce78b7e3b 100644 --- a/source/edge-server/mongodb.txt +++ b/source/edge-server/mongodb.txt @@ -4,6 +4,10 @@ Edge Server MongoDB API Support =============================== +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -15,38 +19,12 @@ which allows you to access your Atlas data on the Edge using standard MongoDB drivers and tools. Clients use a specialized MongoDB URI connection string to connect and -send requests. +send requests. For more information about how to connect to the Edge Server +using a MongoDB connection string, refer to :ref:`edge-server-wireprotocol-connect`. Edge Server currently supports a subset of the MongoDB APIs over the wire protocol. -.. _edge-server-wireprotocol-connect: - -Connect to the Edge Server --------------------------- - -The wire protocol server is on by default. You can connect to it via the -host machine using this MongoDB URI: - -.. code:: console - - mongodb://EDGE_SERVER_HOSTNAME:27021 - -The ``EDGE_SERVER_HOSTNAME`` is the public DNS of your Edge Server host. -For more information, refer to :ref:`edge-server-install-and-configure`. - -You must make port 27021 accessible to the client through port mapping or -firewall rules. - -.. example:: - - A wire protocol connection URI for an Edge Server hosted on Amazon EC2 - might look similar to: - - .. code:: console - - mongodb://ec2-13-58-70-88.us-east-2.compute.amazonaws.com:27021 - CRUD APIs ---------