You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by F Da Costa Gomez <da...@gmail.com> on 2004/08/13 12:33:37 UTC

[Pushlet] Question for specialists re. event pushing via engine (or servlet)

Hi,

In my effort to try and get server-push into Tapestry i've run into a 
couple of areas where i'm not seeing the 'light' yet.

I'll start with trying to give an overview of what (i think) could be 
the way to go.
Looking at the one servlet structure of Tapestry a request to subscribe 
to something should be 'hooked' into the engine instead of the actual 
applicationServlet. The Pushlet framework itself actually uses a 
separate servlet for this (the Pushlet servlet).

Assuming the engine will (to start with) at any time only have *one* 
subscription running (for as long as the page is displayed, if no page 
then no subscription).
The engine 'picks up' on the request to subscribe. This basically 
completes the request.

Now comes the tricky bit. When the publisher sends an event this goes to 
the suscribtionMgr and from there the notifications are send.
'Normally' these would go through the Pushlet servlet that contains the 
link to the subscribers.
In the case above these messages would (assumably) go to the engine.
Key question: How to move them on (through the servlet) to the client?

Even if one where to produce a pushlet service this question would still 
remain (or would it?).

Or would one use the seperate Pushlet to 'handle these things' instead. 
Letting the applicationServlet/engine hand of the pushlet request to the 
Pushlet and letting *it* deal with the rest of the message processing.

I reckon the service option would be the best because that would allow 
for the creation of a pushlet component one would just 'drop' on a page 
for anything that requires 'pushed refreshing'. No plumbing or whatever, 
just straight Tapestry ;-)

Sorry for the longish post but this one is eluding me a bit (even with 
the book in my hand).
Any help/ suggestion putting me on the right track would be much 
appreciated (& might even get server-push in Tapestry).

TIA,
Fermin DCG


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [Pushlet] Question for specialists re. event pushing via engine (or servlet)

Posted by F Da Costa <da...@xs4all.nl>.
Howard Lewis Ship wrote:
> I'm not familiar enough with the technology to discuss this.
> 
Fair enough.
I thought this was a subject that nobody really cared about so i'm 
already pleased that the post was actually read. (have to be fair to 
Geoff as well who gave me a couple of pointers).

www.pushlets.com will take you to the site where the framework can be found.

> I have been thiking for a couple of years (!) about letting Tapestry
> handle intersertials. An interserial is a MIME (instead of HTML)
> response that contains multiple complete HTML pages, rendered in
> sequence, as they arrive.
> 
> That would be a clean way to handle "loading ..." pages and would be
> an amazing feather in the Tapestry cap. Just time, and checking
> browser compatibility, that's been holding me back. It would require a
> lot of work on the page render cycle, because you would be rendering a
> series of pages (or even, the same page several times) instead of just
> rendering a single page as the response.
> 
> The Pushlet business looks like it may be a similar case.
> 
I'm not sure about all of the above but i do know that i got the first 
pushlet component working.
Putting the Pushlet component on a page gets you a real-time updating 
field. The rest of the page still behaves as it should and always has. 
And no re-rendering takes place during the updating sequence. This only 
happens when a 'normal' Tapestry action takes place.

Basically what i did was introduce a second servlet that only serves to 
'feed' the requested data. The ApplicationServlet is not used in the 
process because i'm not sure how that would impact things and this way 
the whole 'pushlet thing' is nicey separated.

It should also be able to pull stuff without re-rendering (haven't been 
there yet though).

I could probably elaborate further but am not sure whether it would be 
of any interest to anybody. If you think it could be let me know and 
i'll whip something up.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [Pushlet] Question for specialists re. event pushing via engine (or servlet)

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm not familiar enough with the technology to discuss this.

I have been thiking for a couple of years (!) about letting Tapestry
handle intersertials. An interserial is a MIME (instead of HTML)
response that contains multiple complete HTML pages, rendered in
sequence, as they arrive.

That would be a clean way to handle "loading ..." pages and would be
an amazing feather in the Tapestry cap. Just time, and checking
browser compatibility, that's been holding me back. It would require a
lot of work on the page render cycle, because you would be rendering a
series of pages (or even, the same page several times) instead of just
rendering a single page as the response.

The Pushlet business looks like it may be a similar case.

On Fri, 13 Aug 2004 12:33:37 +0200, F Da Costa Gomez
<da...@gmail.com> wrote:
> Hi,
> 
> In my effort to try and get server-push into Tapestry i've run into a
> couple of areas where i'm not seeing the 'light' yet.
> 
> I'll start with trying to give an overview of what (i think) could be
> the way to go.
> Looking at the one servlet structure of Tapestry a request to subscribe
> to something should be 'hooked' into the engine instead of the actual
> applicationServlet. The Pushlet framework itself actually uses a
> separate servlet for this (the Pushlet servlet).
> 
> Assuming the engine will (to start with) at any time only have *one*
> subscription running (for as long as the page is displayed, if no page
> then no subscription).
> The engine 'picks up' on the request to subscribe. This basically
> completes the request.
> 
> Now comes the tricky bit. When the publisher sends an event this goes to
> the suscribtionMgr and from there the notifications are send.
> 'Normally' these would go through the Pushlet servlet that contains the
> link to the subscribers.
> In the case above these messages would (assumably) go to the engine.
> Key question: How to move them on (through the servlet) to the client?
> 
> Even if one where to produce a pushlet service this question would still
> remain (or would it?).
> 
> Or would one use the seperate Pushlet to 'handle these things' instead.
> Letting the applicationServlet/engine hand of the pushlet request to the
> Pushlet and letting *it* deal with the rest of the message processing.
> 
> I reckon the service option would be the best because that would allow
> for the creation of a pushlet component one would just 'drop' on a page
> for anything that requires 'pushed refreshing'. No plumbing or whatever,
> just straight Tapestry ;-)
> 
> Sorry for the longish post but this one is eluding me a bit (even with
> the book in my hand).
> Any help/ suggestion putting me on the right track would be much
> appreciated (& might even get server-push in Tapestry).
> 
> TIA,
> Fermin DCG
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org