Hi Michele, thanks for bringing this up. Supporting advanced push technologies is an interesting topic for RAP, we just didn't find the time to look deeper into it yet.
The RAP server is built on the HttpServlet API, it registers a servlet, distinguishes user sessions based on the HttpSession, etc. When run on OSGi, the RAP servlet is registered with the HttpService. Clients send HTTP POST requests, the default web client uses XHR to do so. There are other clients (currently for Android and iOS) that use third-party HTTP client implementations. RAP has a server push mechanism that can be enabled by applications when needed, this mechanism uses the classic long polling (Comet) approach. Advanced technologies such as WebSockets are currently not supported. I'm not familiar with CometD and can't tell what has to be done to integrate it with RAP. There is no support for pluggable transports in RAP, but since all client-server communication is based on JSON, it should be generally possible to support alternative transports / protocols. If you'd like to help to investigate this topic, your help is very appreciated. It would be a great project for the RAP Incubator! Best regards, Ralf On Thu, May 16, 2013 at 3:40 PM, Michele Rossi <[email protected]> wrote: > hi all, > I am very new to RAP having only found out about it last night so please > forgive me if my questions don't appear to be too relevant. > > I am very curious about RAP specifically for the possibility of building > dual target rich internet applications re-using Eclipse RCP code. > > I have read about the half-object RAP protocol and found it very > interesting. > > I have read that it's based on JSON and I have seen examples about the JSON > messages but I couldn't find anything on the type of transport used by RAP > Javascript GUIs to communicate with their servers. > > I assume that it's a variation of HTTP (XHR?) and I am interested in how and > if the procotol covers server to web client data push. > > I am asking this question because I am quite familiar with CometD, a Java > framework that implements the Bayeux protcol leveraging some bits of Jetty. > CometD provides a very fast and efficient way to implement server-to-web > push. > The protocol is message based (not request reply) and it works with a number > of transport level protocols such as HTTP Long Polling and WebSockets. > It uses JSON as a message representation format. > It has a Java and JavaScript client side libraries - the latter > automatically chooses the best transport available trying to use WebSockets > if the browser supports it. > > > This is a very long shot but I had the feeling that RAP and CometD together > would be very fantastic. > This is a statement made without knowing much about RAP so please take it > for what it's worth. > > Is there a way to plug in different transports / protocols in RAP? > > Any comments on this would be really appreciated. > > thanks, > Michele > > > > _______________________________________________ > rap-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/rap-dev > _______________________________________________ rap-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/rap-dev
