websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-8

Reliablity and expense of session.isActive() / container.getActiveSessions()

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      There is no reliable way to tell if the session is active or not without doing an expensive ping.pong.

      SO is this method really useful ?

      Should it be: 'is it not inactive' ?

      Is there a better way to express this ? hasBeenClosed() ?

      Also, container.getActiveSessions() - the useful case is tracking the active sessions per endpoint, not per container.

      Will this work in the distributed container ?

        Activity

        dannycoward created issue -
        Hide
        Sutanu Ghosh added a comment -

        I think a better name would be isOpen(). It should return true if and only if the WebSocket is open i.e. not yet closed by either endpoint.
        Also this should not be about the underlying socket since the socket is still open for a while after one endpoint closes the WebSocket session.

        Show
        Sutanu Ghosh added a comment - I think a better name would be isOpen(). It should return true if and only if the WebSocket is open i.e. not yet closed by either endpoint. Also this should not be about the underlying socket since the socket is still open for a while after one endpoint closes the WebSocket session.
        dannycoward made changes -
        Field Original Value New Value
        Summary Reliablity and expense of session.isActive() Reliablity and expense of session.isActive() / container.getActiveSessions()
        Description There is no reliable way to tell if the session is active or not without doing an expensive ping.pong.

        SO is this method really useful ?

        Should it be: 'is it not inactive' ?

        Is there a better way to express this ? hasBeenClosed() ?
        There is no reliable way to tell if the session is active or not without doing an expensive ping.pong.

        SO is this method really useful ?

        Should it be: 'is it not inactive' ?

        Is there a better way to express this ? hasBeenClosed() ?

        Also, container.getActiveSessions() - the useful case is tracking the active sessions per endpoint, not per container.

        Will this work in the distributed container ?
        Hide
        dannycoward added a comment -

        We have reworked the naming and semantics to be based on the open/close information the websocket protocol provides.

        So now it is isOpen instead of isActive() and getOpenSessions() instead of getActiveSessions().

        Show
        dannycoward added a comment - We have reworked the naming and semantics to be based on the open/close information the websocket protocol provides. So now it is isOpen instead of isActive() and getOpenSessions() instead of getActiveSessions().
        dannycoward made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            dannycoward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: