websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-9

API Usability: Consider API renaming, minor refactorizations for usability

    Details

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

      Description

      In particular, Session and FrameBuilder, configurations.

      RemoteEndpoint/Peer/WebSocket

      Annotations have long names.

      Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

      Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

      Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

      one for basic whole message sending
      one for streaming message sending
      one for async message sending
      one for batching, which could be optional.

      DefaultServerConfiguration should be DefaultServerEndpointConfiguration
      ditto client config class.

      private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?

      IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

      Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?

      Refactor standard handshake header names into one separate util class.

      ServerApplicationConfiguration should be renamed: According to the spec, there may be more than one ServerApplicationConfiguration classes in the application. In that case ServerApplicationConfiguration should be renamed to something else, as it is not application configuration. We need a name that distinguishes it from endpoint configurations, yet there may be some confusion with the name Application causing people to think there can only be one per application package, which is not true.

        Activity

        dannycoward created issue -
        dannycoward made changes -
        Field Original Value New Value
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Consolidate MessageHandlers and RemoteEndpoint.send methods to one or two interfaces / method sigs.
        dannycoward made changes -
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Consolidate MessageHandlers and RemoteEndpoint.send methods to one or two interfaces / method sigs.
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Consolidate MessageHandlers and RemoteEndpoint.send methods to one or two interfaces / method sigs.


        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.
        dannycoward made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        dannycoward made changes -
        Summary API Usability: Consider using Fluid style throughout the API, rework naming API Usability: Consider API renaming, minor refactorizations for usability
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Consolidate MessageHandlers and RemoteEndpoint.send methods to one or two interfaces / method sigs.


        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.
        dannycoward made changes -
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

        Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?
        dannycoward made changes -
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

        Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

        Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?

        Refactor standard handshake headers into one separate util class
        dannycoward made changes -
        Description In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

        Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?

        Refactor standard handshake headers into one separate util class
        In particular, Session and FrameBuilder, configurations.

        RemoteEndpoint/Peer/WebSocket

        Annotations have long names.

        Session is perhaps too general. Session/WebSocketSession/Connection/Conversation.

        Feedback: I think the Session class would be more intuitively served by calling Connection because that's what it seems to captures between the two peers. There is no message bag to store properties (no need to have it) to make this class look like a session. All other methods on this class seem more like properties of a connection rather than a session.

        Split RemoteEndpoint send functionality into a handful of specialized RemoteEndpoints, each with a different mode:-

        one for basic whole message sending
        one for streaming message sending
        one for async message sending
        one for batching, which could be optional.

        DefaultServerConfiguration should be DefaultServerEndpointConfiguration
        ditto client config class.

        private static String CLIENT_CLASSNAME_PROPERTYNAME = "websocket.clientcontainer.classname"; and WebSocketContainer.getClientContainer(). Should not need to be client specific -> getContainer() ?


        IOException on client connect APIs for IO errors, deployment error would then only be for badly formed endpoints.

        Annotation names: too long ? Need WebSocket in all of them ? Better distinction between client and server annotations ?

        Refactor standard handshake header names into one separate util class.

        ServerApplicationConfiguration should be renamed: According to the spec, there may be more than one ServerApplicationConfiguration classes in the application. In that case ServerApplicationConfiguration should be renamed to something else, as it is not application configuration. We need a name that distinguishes it from endpoint configurations, yet there may be some confusion with the name *Application* causing people to think there can only be one per application package, which is not true.
        dannycoward made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee dannycoward [ dannycoward ]
        Tags v013
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: