Does the WebSocket spec support Packing of Posting Messages for Performance

When receiving messages form the ADS via WebSocket, the ADS packs multiple updates into an array of messages. The format appears to be and array of JSON formatted messages.

When posting publishing for performance testing, it would be beneficial to able to pack the post update messages into an array of messages and then send the array.

Is this possible? I can find no reference to message packing in the spec, the examples or on the forums.

Thanks!

Best Answer

  • Jirapongse
    Answer ✓

    @michael.sherman

    Thank you for reaching out to us.

    I tested with ADS 3.5.1.L1 and it can support an array of post messages.

    I sent the following JSON messages to the server.

    [
        {
            "Ack": true,
            "Domain": "MarketPrice",
            "ID": 3,
            "Message": {
                "Domain": "MarketPrice",
                "Fields": {
                    "ASK": 453.60,
                    "BID": 452.60
                },
                "ID": 0,
                "Type": "Update"
            },
            "PostID": 20,
            "PostUserInfo": {
                "Address": "127.0.0.1",
                "UserID": 10000
            },
            "Type": "Post"
        },
        {
            "Ack": true,
            "Domain": "MarketPrice",
            "ID": 3,
            "Message": {
                "Domain": "MarketPrice",
                "Fields": {
                    "ASK": 600.60,
                    "BID": 452.60
                },
                "ID": 0,
                "Type": "Update"
            },
            "PostID": 21,
            "PostUserInfo": {
                "Address": "127.0.0.1",
                "UserID": 10000
            },
            "Type": "Post"
        }
    ]

    Then, I got the following responses back.

    [
        {
            "ID": 3,
            "Type": "Update",
            "UpdateType": "Unspecified",
            "Key": {
                "Service": "DIST_CACHE",
                "Name": "IBM.N"
            },
            "Fields": {
                "ASK": 453.60,
                "BID": 452.60
            }
        },
        {
            "ID": 3,
            "Type": "Ack",
            "AckID": 20
        },
        {
            "ID": 3,
            "Type": "Update",
            "UpdateType": "Unspecified",
            "Key": {
                "Service": "DIST_CACHE",
                "Name": "IBM.N"
            },
            "Fields": {
                "ASK": 600.60,
                "BID": 452.60
            }
        },
        {
            "ID": 3,
            "Type": "Ack",
            "AckID": 21
        }
    ]

Answers