[JAVA-2266] Implement The MongoDB Handshake Protocol Created: 29/Jul/16  Updated: 19/Oct/16  Resolved: 13/Sep/16

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: None
Fix Version/s: 3.4.0

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-304 MongoDB Handshake protocol Closed
is depended on by SERVER-72 handshake optional parameters for dri... Closed
Duplicate
is duplicated by JAVA-1843 Include git commit hash/release tag i... Closed
Related
is related to JAVA-2308 Driver version check fails when there... Closed
Epic Link: MongoDB 3.4 for Java driver

 Description   

https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst

TL;DR: Every socket connecting to MongoDB MUST issue isMaster announcing itself to the server with the following pseudo document.
There is also new connection URI field appname the user can provide (client.application.name) which the server will write out in its logs and profile entries, making correlating server log entries to respective applications trivial.

isMaster({
    client: {
        /* OPTIONAL. If present, the "name" is REQUIRED */
        application: {
            name: "<string>"
        },
        /* REQUIRED, including all sub fields */
        driver: {
            name: "<string>",
            version: "<string>"
        },
        /* REQUIRED */
        os: {
            type: "<string>",         /* REQUIRED */
            name: "<string>",         /* OPTIONAL */
            architecture: "<string>", /* OPTIONAL */
            version: "<string>"       /* OPTIONAL */
        },
        /* OPTIONAL */
        platform: "<string>"
    }
})



 Comments   
Comment by Githook User [ 14/Sep/16 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Allow library authors to extend the handshake metadata.

JAVA-2266
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/dc3329a80f629a4ba56ad1619596e95988407206

Comment by Githook User [ 13/Sep/16 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Updated build.gradle so that we always provide a git description

JAVA-2266
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/cb68bf5cd853fb16d60385bcbd5276ce89e7fdd4

Comment by Githook User [ 12/Sep/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2266: Add support for server handshake to send client metadata, including driver, os, platform, and application name
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/ada84cb43d42fa8127139c6a8b2d19c4b6162eed

Generated at Thu Feb 08 08:56:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.