-
Notifications
You must be signed in to change notification settings - Fork 40
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
DOCSP-32269 atlas top 250 revamp connection page #458
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,8 +4,9 @@ | |||||
Connect to MongoDB | ||||||
================== | ||||||
|
||||||
In this guide, you can learn how to connect to a MongoDB instance or | ||||||
replica set using the Java driver. | ||||||
This guide shows you how to connect to a | ||||||
`MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__, | ||||||
a MongoDB instance, or a replica set using the {+driver-short+}. | ||||||
|
||||||
You can view sample code to :ref:`connect to an Atlas cluster <connect-atlas-java-driver>` | ||||||
or continue reading to learn more about the ``MongoClient`` class and | ||||||
|
@@ -50,13 +51,18 @@ connect to a MongoDB deployment. It instructs the driver on how it should | |||||
connect to MongoDB and how it should behave while connected. The following | ||||||
figure explains each part of a sample connection URI: | ||||||
|
||||||
.. figure:: /includes/figures/connection_uri_parts.png | ||||||
:alt: Connection String parts figure | ||||||
.. figure:: /includes/figures/dns_seedlist_connection_string_parts.png | ||||||
:alt: Each part of the connection string | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use better alt text here for accessibility. It should be meaningful to someone who can't see this image. Something like:
Suggested change
|
||||||
|
||||||
This figure uses the :manual:`Standard Connection String Format </reference/connection-string/#std-label-connections-standard-connection-string-format>`, | ||||||
``mongodb`` for the protocol. You can also use the :manual:`DNS Seed List Connection Format </reference/connection-string/#dns-seed-list-connection-format>`, | ||||||
``mongodb+srv``, if you want more flexibility of deployment and the ability | ||||||
to change the servers in rotation without reconfiguring clients. | ||||||
In this example, we connect to an Atlas MongoDB deployment that has a | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style: Write to the user by using second person. (ref)
Suggested change
|
||||||
DNS SRV record. For more details, see the :manual:`DNS Seed List | ||||||
Connection Format | ||||||
</reference/connection-string/#dns-seed-list-connection-format>` | ||||||
documentation. This format offers flexibility in deployment and the | ||||||
ability to change the servers in rotation without reconfiguring clients. | ||||||
|
||||||
This format offers flexibility in deployment and the ability to change | ||||||
the servers in rotation without reconfiguring clients. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repeated line |
||||||
|
||||||
.. note:: | ||||||
|
||||||
|
@@ -65,11 +71,16 @@ to change the servers in rotation without reconfiguring clients. | |||||
and select Java from the language dropdown to retrieve your connection | ||||||
string. | ||||||
|
||||||
The next part of the connection URI contains your credentials if you are | ||||||
using a password-based authentication mechanism. Replace the value of ``user`` | ||||||
with your username and ``pass`` with your password. If your | ||||||
authentication mechanism does not require credentials, omit this part of | ||||||
the connection URI. | ||||||
If you are connecting to an instance or replica set that does not have a | ||||||
DNS SRV address, you must use ``mongodb`` for the protocol, which specifies | ||||||
the :manual:`Standard Connection String Format | ||||||
</reference/connection-string/#std-label-connections-standard-connection-string-format>`. | ||||||
|
||||||
After the protocol, the next part of the connection string contains | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: I think "after the protocol" and "the next part" mean the same thing. I think it could be simplified to:
Suggested change
|
||||||
credentials if you are using a password-based authentication mechanism. | ||||||
Replace the value of ``user`` with your username and ``pass`` with your | ||||||
password. If your authentication mechanism does not require credentials, | ||||||
omit this part of the connection URI. | ||||||
|
||||||
The next part of the connection URI specifies the hostname or IP | ||||||
address, followed by the port of your MongoDB instance. In the example, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick/Suggestion: I think the phrase "This guide shows you" is personifying the page. It seems more clear to me to stick with the "you can learn" format. (This is probably pretty subjective so feel free to take or leave this comment)