How exactly can I replace the server event with a websocket?

I am using Jersey to create a RESTful webservice that uses server-side event heavily. Since we all know IE does not support Server-Sent Event (SSE), for a while I thought I could use websocket and not SSE (finally I am using polyfill), but the problem is how can I do that what?

One solution I came up with was to use the websocket endpoint as a jersey client so that I could receive the response and convert it to an event and then send it to the real client. I know there are many problems, for example not all requests result in an event. I can imagine the websocket endpoint is going to be very complex and will get out of hand soon if I consider very much the situation.

Any idea? Thank.

+3


source to share





All Articles