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 <da...@xs4all.nl> on 2004/08/28 14:13:46 UTC

Re: [Pushlet] Question for specialists re. event pushing (longish)

Jon Newton wrote:
> [snip] 
> 
>>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.
>>
> 
> 
> Keep going... This is very interesting. 
Here it goes.
When you look at the pushlet-framework y'll basically notice a 
publish-subscribe mechanism, a servlet communicating to the clients and 
an eventSource that is either pushing/generating 'stuff' or responding 
to a pull from the clientside.

The source i'v activated via an extension (could possibly be done 
differently but for now it works ;-) ). The different actual subjects 
being published can be found in a properties file (of the 
pushlet-framework).

At the moment i need to run it within a frame setting. Hiding the 
communication frame and only showing the displayFrame. For me this works 
because i always use Tapestry with a script library on the client 
(allows me to 'hold on' to intermediate client stuff more easily).
I'm not sure about others.

Created a Pushlet component that renders itself within a <span> so that 
the implementing template can do with it whatever it likes.
Following the .jwc spec:
<component-specification class="org.dcg.jwc.pushlet.Pushlet" 
allow-body="yes" allow-informal-parameters="yes" >
  <parameter name="tagID" required="yes" type="String" />
  <parameter name="subject" required="no" type="String" />
  <parameter name="item" required="no" type="String" />
  <parameter name="dataElement" required="yes" type="String" />
  <parameter name="value" required="no" type="java.lang.Object" />
  <parameter name="libFrameName" required="no" 
default-value="'frmPushlet'" type="String" />

</component-specification>

The dataElement and value parameters need a second look!

A HTML spec could be:
Pushlet: <span jwcid="@pushlet:Pushlet" subject="/stocks/nyse" 
item="ibm" dataElement="" tagID="ibmID" 
refreshValueListener="ognl:listeners.refreshValueListener" /><br />
	Pushlet: <span jwcid="@pushlet:Pushlet" subject="/stocks/nasdaq" 
item="*" dataElement="" tagID="allID" 
refreshValueListener="ognl:listeners.refreshValueListener" />

The above would show changing data of ibm and all the items within the 
nasdaq subject (as defined).
Obviously this structure could just as well be used for other monitoring 
purposes as well. It just depends on the eventGenerator and to which 
event the client is subscribing.

For now i'm only testing against the Gecko engine because i'v had too 
many unpleasant IE experiences. I'm sure it will also work on IE if one 
were to spend some time on it ;-)

Currently there are still 3 basic things i want to work out:
1. A generic (client-based) way to deal with subscriptions on 
dataElement/value level (* and item are ok-ish).
2. Seamless integration into a tableColumn (using the Block component).
3. Another look at the eventGenerator (making it more flexible to also 
do db-monitoring, for example).

I'm assuming i might be overlooking something or looking at stuff in the 
wrong way, so constructive criticism is welcome.
One small note though. I am still surprised that nobody has had the need 
for real-time updating data within Tapestry.

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

Posted by F Da Costa Gomez <da...@gmail.com>.
Erik Hatcher wrote:
> More options exist in this space too.  Check out Streamlets and the 
> other links (and comments) here:
> 
>     http://radio.weblogs.com/0112098/2004/08/27.html#a503
> 
> The remote scripting stuff I've done using MSRS and JSRS would certainly 
> work (see the comments mentioned above).
Read through your articles (not in-depth though) and from what i could 
tell the Pushlet framework contains some of the relevant elements you 
discussed/ mentioned.

Re. Streamlets (i wonder where they got the name from or is it vice 
versa?). Unless one is actually looking for a messaging system with all 
its attached 'stuff' it might be a bit too much. Also i wonder about the 
'uniqueness' of the polling strategy. The pushlet framework also carries 
that feature. I guess one could even implement it using Tapestry, 
setting a refesh=x interval in a hidden iframe somewhere.

If one is however looking for 'something' that has the server actively 
push something to the client (because a certain page is loaded) the 
Streamlet would not work, would it? It has the client poll the server 
and is not setup to passively recieve data.

JSRS is actually quite similar to the pushlet framework from a 
clientside perspective. The pushlet framework has been extended though 
to also offer a publish subscribe and EventSource structure on the server.

I appreciate the difference between the two frameworks but i was looking 
for a way to simply push data from the server to the client. No user- 
interaction required.
If one does not worry too much about bits of data/ messages getting lost 
(whenever that may happen) than "throwing data" at the client 
irrespectively might just be sufficient. It integrates rather well with 
Tapestry (could be improved, obviously ;-) ) so i'm quite pleased with 
the pushlet offering.

Fermin


---------------------------------------------------------------------
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 (longish)

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
More options exist in this space too.  Check out Streamlets and the 
other links (and comments) here:

	http://radio.weblogs.com/0112098/2004/08/27.html#a503

The remote scripting stuff I've done using MSRS and JSRS would 
certainly work (see the comments mentioned above).

	Erik

On Aug 28, 2004, at 8:13 AM, F Da Costa wrote:

> Jon Newton wrote:
>> [snip]
>>> 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.
>>>
>> Keep going... This is very interesting.
> Here it goes.
> When you look at the pushlet-framework y'll basically notice a 
> publish-subscribe mechanism, a servlet communicating to the clients 
> and an eventSource that is either pushing/generating 'stuff' or 
> responding to a pull from the clientside.
>
> The source i'v activated via an extension (could possibly be done 
> differently but for now it works ;-) ). The different actual subjects 
> being published can be found in a properties file (of the 
> pushlet-framework).
>
> At the moment i need to run it within a frame setting. Hiding the 
> communication frame and only showing the displayFrame. For me this 
> works because i always use Tapestry with a script library on the 
> client (allows me to 'hold on' to intermediate client stuff more 
> easily).
> I'm not sure about others.
>
> Created a Pushlet component that renders itself within a <span> so 
> that the implementing template can do with it whatever it likes.
> Following the .jwc spec:
> <component-specification class="org.dcg.jwc.pushlet.Pushlet" 
> allow-body="yes" allow-informal-parameters="yes" >
>  <parameter name="tagID" required="yes" type="String" />
>  <parameter name="subject" required="no" type="String" />
>  <parameter name="item" required="no" type="String" />
>  <parameter name="dataElement" required="yes" type="String" />
>  <parameter name="value" required="no" type="java.lang.Object" />
>  <parameter name="libFrameName" required="no" 
> default-value="'frmPushlet'" type="String" />
>
> </component-specification>
>
> The dataElement and value parameters need a second look!
>
> A HTML spec could be:
> Pushlet: <span jwcid="@pushlet:Pushlet" subject="/stocks/nyse" 
> item="ibm" dataElement="" tagID="ibmID" 
> refreshValueListener="ognl:listeners.refreshValueListener" /><br />
> 	Pushlet: <span jwcid="@pushlet:Pushlet" subject="/stocks/nasdaq" 
> item="*" dataElement="" tagID="allID" 
> refreshValueListener="ognl:listeners.refreshValueListener" />
>
> The above would show changing data of ibm and all the items within the 
> nasdaq subject (as defined).
> Obviously this structure could just as well be used for other 
> monitoring purposes as well. It just depends on the eventGenerator and 
> to which event the client is subscribing.
>
> For now i'm only testing against the Gecko engine because i'v had too 
> many unpleasant IE experiences. I'm sure it will also work on IE if 
> one were to spend some time on it ;-)
>
> Currently there are still 3 basic things i want to work out:
> 1. A generic (client-based) way to deal with subscriptions on 
> dataElement/value level (* and item are ok-ish).
> 2. Seamless integration into a tableColumn (using the Block component).
> 3. Another look at the eventGenerator (making it more flexible to also 
> do db-monitoring, for example).
>
> I'm assuming i might be overlooking something or looking at stuff in 
> the wrong way, so constructive criticism is welcome.
> One small note though. I am still surprised that nobody has had the 
> need for real-time updating data within Tapestry.
>
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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