Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2098

Is it acceptable to omit "session" prefix/suffix on ClientSession fields/methods

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Sessions
    • None
    • Needed

      The sessions spec defines the field for the ClientSession's id as sessionId and the method for ending the session as endSession. In both these cases, the "session" part of the identifiers seems redundant, seeing as the field and method are part of a ClientSession. In addition, variables that are ClientSessions will likely contain "session" somewhere in their names, so something like session.endSession() will be quite common. One argument for endSession is that it implies a server-side endSessions command will take place, but that isn't even happening due to session caching.

      Considering all that, would it be acceptable for drivers to instead name these fields just id and end, assuming they haven't already released versions with sessionId and endSession? Then we'd have session.id and session.end(), which seem clearer and less redundant.

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: