-
Notifications
You must be signed in to change notification settings - Fork 58
Comments on the API #18
Comments
The handshake is required because the protocol support fallback and to make sure the proper protocol version is used. |
@jhthorsen Regarding your second point (#9), if you are talking about the per-message ID, you can set it in the request or get it out of the request object if you don't set it. @jfarcand When you have a service that returns a large response, the underlining framework will typically trigger in a series of the write operations, which, in turn, will generate a series of swaggersocket responses that have no indication of which one is the last one. I think we should add a flag in the response to indicate the last message. Otherwise, we would need to buffer the data until the close is invoked and then to flush the entire data at once as a single swaggersocket over the WebSocket. So, it's one thing to add this flag to the protocol, the other thing is how to implement it. When the underlining framework is guaranteed to invoke the close operation at the end, we can buffer the data up to the default buffer size, return only the overflown data during the write operation and return the final message by flushing the remaining buffer at the close operation. In addition to this requirement, we also might want to provide a way to return no body responses. Currently, when the service returns no body, that means there is no write operation invoked and there is no response at all. In conjunction with the above approach of buffering and flushing at the close operation, we can also provide a way to return a body-less swaggersocket responses. How do you think? I think we should provide this option so that various usages can be supported. regards, aki |
@elakito OK I agree we could add a flag saying this is the last message, but note that with Atmosphere if the Agree for the body-less response! |
@jfarcand |
@elakito Ok completely swamped those by the work this week, will take a look ASAP. |
@jfarcand no problem. |
@elakito IIRC, the protocol is able to handle that case using the |
@jfarcand, In #28, I went ahead and added the code that adds a boolean primitive regards, aki 2015-03-09 13:39 GMT+01:00 Jeanfrancois Arcand notifications@github.com:
|
@elakito For consistency I would vote for a |
@jfarcand Okay. Then, we can keep it that way. I think further One thing that I wanted to add before 2.0.0 is an option to filter/include 2015-03-09 14:47 GMT+01:00 Jeanfrancois Arcand notifications@github.com:
|
👍 for the headers. Yes I think we need to release |
@jfarcarnd For 2.0.0, I think we can close it up this week. For the 2015-03-09 16:26 GMT+01:00 Jeanfrancois Arcand notifications@github.com:
|
@elakito should be 2015 Reverb :) Thanks for checking in, we're sweeping through things right now and updating any missing copyright notices. |
Closing this, since it seems like a stale issue. |
First: I'm sorry for making an issue, which is simply a series of questions/comments. Please let me know if I should have contacted you in a different format.
The reason I'm asking is that before I saw this implementation, I was working on my own, which I consider much simpler. https://github.com/jhthorsen/swagger2/compare/websocket
So to the questions/comments:
I would really like to get some feedback.
Thanks in advance.
The text was updated successfully, but these errors were encountered: