Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rap-dev] RAP & CometD for real time web (Ralf Sternberg)

Hi Michele, Simone,

could you explain how CometD could improve the performance in RAP?

What are the preconditions for employing CometD? For example, can
CometD work with an existing servlet, or would it require that we use
a servlet that comes with CometD?

Thanks,
Ralf
Ralf Sternberg
Project Lead, Remote Application Platform (RAP)
EclipseSource

Tel: +49 721 66 47 33-0

Innoopract Informationssysteme GmbH
Lammstraße 21, 76133 Karlsruhe, Germany
General Manager: Jochen Krause
Registered Office: Karlsruhe, Commercial Register Mannheim HRB 107883


On Sun, May 19, 2013 at 10:02 AM, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
> hi Ralf,
> I am adding Simone Bordet to this conversation, he is the "daddy" of CometD
> and he might want to comment too.
>
> From what you say it sounds like you are using a protocol / communication
> technique that is related to Bayeux and CometD but a lot less developed.
>
> High performance real time updates are especially important for financial
> applications.
> Being able to show a demo of an application that works both as Eclipse RCP
> and Eclipse RAP and showing a grid with high speed ticking market data would
> probably attract the attention of a whole new group of people.
>
> There might be scope for a marriage of convenience here :)
>
>
> thanks,
> Michele
>
>
>
> From: Ralf Sternberg <rsternberg@xxxxxxxxxxxxxxxxx>
> To: RAP project development-related communication
>         <rap-dev@xxxxxxxxxxx>
> Subject: Re: [rap-dev] RAP & CometD for real time web
> Message-ID:
>         <CAMr=csq2q_mZRxhd4Rz=W5LhvFtOm3RZ=T7hnhUBFF_TAxY5RA@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=UTF-8
>
> 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 <michele.rossi@xxxxxxxxx>
> 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


Back to the top