HTTP/2 Server Push

299 views
Skip to first unread message

Evan Ruff

unread,
Dec 23, 2016, 2:32:26 PM12/23/16
to GWT Users
Hello,

I've been away from GWT for a bit and am looking into creating an embeeded jCEF project using a Jetty Backend and a Chromium Browser. I was wondering if there were any libraries out there to help integrate the GWT client side with the HTTP/2 Server Push features of Jetty 9 (and later Servlet 4)?

I'd like to use something like RESTEasy with GWTRestly to do the actual data mapping, but was hoping for some information about how other people had approached the problem.

Thanks for any insight!

David

unread,
Dec 24, 2016, 4:09:18 AM12/24/16
to google-we...@googlegroups.com
I am using gwt-jackson in combination with Websockets. I just created a JsInterop mapping to the browser native api. Very little code needed.


--


You received this message because you are subscribed to the Google Groups "GWT Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.


To post to this group, send email to google-we...@googlegroups.com.


Visit this group at https://groups.google.com/group/google-web-toolkit.


For more options, visit https://groups.google.com/d/optout.


Evan Ruff

unread,
Jan 4, 2017, 1:36:05 PM1/4/17
to google-we...@googlegroups.com
Thanks David, that's the approach I'll take. 

E

On Dec 24, 2016 4:09 AM, "David" <david...@gmail.com> wrote:
I am using gwt-jackson in combination with Websockets. I just created a JsInterop mapping to the browser native api. Very little code needed.


On Fri, 23 Dec 2016 at 20:32, Evan Ruff <evan...@gmail.com> wrote:
Hello,

I've been away from GWT for a bit and am looking into creating an embeeded jCEF project using a Jetty Backend and a Chromium Browser. I was wondering if there were any libraries out there to help integrate the GWT client side with the HTTP/2 Server Push features of Jetty 9 (and later Servlet 4)?

I'd like to use something like RESTEasy with GWTRestly to do the actual data mapping, but was hoping for some information about how other people had approached the problem.

Thanks for any insight!









--


You received this message because you are subscribed to the Google Groups "GWT Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.



To post to this group, send email to google-web-toolkit@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/pQW1IqsiWE0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.

Srini v

unread,
Jan 16, 2017, 12:14:03 AM1/16/17
to google-we...@googlegroups.com
Hi,
Do you have an example demonstrating that please?

 Many thanks

David

unread,
Jan 16, 2017, 3:39:08 AM1/16/17
to google-we...@googlegroups.com
I just noticed that my code is actually still just using the Elemental library:

Here is my initiatlisation code to setup a websocket.
// websocket protocol is either ws or wss, so we just strip http from the document url
final String url = "ws" + GWT.getHostPageBaseURL().substring(4) + "api/monitor";
this.socket = Browser.getWindow().newWebSocket(url);
this.socket.setOnopen(event -> {
// for some reason this can only be set after the socket is opened
this.socket.setOnmessage(event2 -> this.onEvent((MessageEvent) event2));
});
this.socket.setOnerror(this::onWebSocketError);
this.socket.setOnclose(this::onWebSocketClose);

The onEvent method just uses GWT jackson to decode the JSON data payload:

final MyEventType event = this.mapper.read((String) pEvent.getData());

The error and close handlers just try to setup the websocket at regular intervals (when the server restarts).


On Mon, Jan 16, 2017 at 6:13 AM, Srini v <gvssr...@gmail.com> wrote:
Hi,
Do you have an example demonstrating that please?

 Many thanks

On Sat, 24 Dec 2016 09:09 David, <david...@gmail.com> wrote:
I am using gwt-jackson in combination with Websockets. I just created a JsInterop mapping to the browser native api. Very little code needed.


On Fri, 23 Dec 2016 at 20:32, Evan Ruff <evan...@gmail.com> wrote:
Hello,

I've been away from GWT for a bit and am looking into creating an embeeded jCEF project using a Jetty Backend and a Chromium Browser. I was wondering if there were any libraries out there to help integrate the GWT client side with the HTTP/2 Server Push features of Jetty 9 (and later Servlet 4)?

I'd like to use something like RESTEasy with GWTRestly to do the actual data mapping, but was hoping for some information about how other people had approached the problem.

Thanks for any insight!









--


You received this message because you are subscribed to the Google Groups "GWT Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.


To post to this group, send email to google-web-toolkit@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.

Ignacio Baca Moreno-Torres

unread,
Jan 16, 2017, 11:11:26 AM1/16/17
to google-we...@googlegroups.com
I have been testing server sents events to see how to integrate it in autorest. Not sure, but might be interesting too 😜. https://github.com/ibaca/autorest-streaming-example

 Many thanks

To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.


To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages