comet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

comet

Siemen Baader
Hi,
is comet working in Iliad?

I was experimenting with the ILCometCounter example and it seems to me that the example just works because ILCometCounter >> #decrease calls both self markDirty and self triggerCometEvent: ILCometCounterChangedEvent new.
Commenting out the triggerCometEvent: has no effect. Nothing happens when I change it to:

decrease
     [ 5
         timesRepeat: [ counter decrease.
            self markDirty.
            self triggerCometEvent: ILCometCounterChangedEvent new.
            1 seconds wait ] ] fork

Which I thought should decrease the counter visibly over 5 seconds.

Network log shows a long-polling xhr request that returns after 1:36 min and a new one is set up, so something is happening.

Perhaps comet has been disabled or broken and just gone unnoticed since the example does not really rely on server side push? Or am I forking the process in the wrong way for Iliad? Similar code works when just logging to Transcript.

cheers
Siemen

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: comet

benoit
Hi Siemen,

  I never used the Comet part of Iliad and I don't know a lot about it.
But what I found working in the ILCometCounter is that :
        - open the app in a first browser, increment the counter ;
        - open the app in a second browser, the counter will be allready
incremented ;
        - increment/decrement it in either browser and the change is immediatly
visible in the other browser.

  From my understanding in the increase method :
        - self markDirty is for updating the session where the action was done ;
        - self triggerCometEvent: ILCometCounterChangedEvent new is for
updating the other opened sessions of the ILCometCounterApplication.


  I am not sure why your test with timesRepeat doesn't work.
  I tried to update the counter from a Playground with :
        ILCometCounterModel instance increase.
  but it isn't working as the singleton model is updated but the event
isn't sended to Iliad sessions.
  Looking more to the Comet code It doesn't seemed to be an entry point
to send events from outside Iliad. It should be not too hard to add one
however.

Cheers,
Benoit

Le 13/02/20 à 14:15, Siemen Baader a écrit :

> Hi,
> is comet working in Iliad?
>
> I was experimenting with the ILCometCounter example and it seems to me
> that the example just works because ILCometCounter >> #decrease calls
> both self markDirty and self triggerCometEvent:
> ILCometCounterChangedEvent new.
> Commenting out the triggerCometEvent: has no effect. Nothing happens
> when I change it to:
>
> decrease
>       [ 5
>           timesRepeat: [ counter decrease.
>              self markDirty.
>              self triggerCometEvent: ILCometCounterChangedEvent new.
>              1 seconds wait ] ] fork
>
> Which I thought should decrease the counter visibly over 5 seconds.
>
> Network log shows a long-polling xhr request that returns after 1:36 min
> and a new one is set up, so something is happening.
>
> Perhaps comet has been disabled or broken and just gone unnoticed since
> the example does not really rely on server side push? Or am I forking
> the process in the wrong way for Iliad? Similar code works when just
> logging to Transcript.
>
> cheers
> Siemen
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com 
> <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/ef96e5f4-6b5e-e33d-0a72-15b18603bfb9%40free.fr.
Reply | Threaded
Open this post in threaded view
|

Re: comet

Yuet Ip
Hello Benoit/Siemen,

Just loaded up the latest Pharo 6 and loaded the stable version of Iliad, all on Windows 10.
Something is not quite right with the Comet example for me. 
Opening a new browser (Chrome) does indeed show the latest value, however changing the value in one browser does not update any others. 
(At least not "immediately")
I haven't timed it, but I guess it takes around 2 minutes  for the other browsers to catch up...and show the latest counter value.... very strange.

Any thoughts? How do you go about finding what the problem is?

Cheers!

Yuet

On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
Hi Siemen,

  I never used the Comet part of Iliad and I don't know a lot about it.
But what I found working in the ILCometCounter is that :
        - open the app in a first browser, increment the counter ;
        - open the app in a second browser, the counter will be allready
incremented ;
        - increment/decrement it in either browser and the change is immediatly
visible in the other browser.

  From my understanding in the increase method :
        - self markDirty is for updating the session where the action was done ;
        - self triggerCometEvent: ILCometCounterChangedEvent new is for
updating the other opened sessions of the ILCometCounterApplication.


  I am not sure why your test with timesRepeat doesn't work.
  I tried to update the counter from a Playground with :
        ILCometCounterModel instance increase.
  but it isn't working as the singleton model is updated but the event
isn't sended to Iliad sessions.
  Looking more to the Comet code It doesn't seemed to be an entry point
to send events from outside Iliad. It should be not too hard to add one
however.

Cheers,
Benoit

Le 13/02/20 à 14:15, Siemen Baader a écrit :

> Hi,
> is comet working in Iliad?
>
> I was experimenting with the ILCometCounter example and it seems to me
> that the example just works because ILCometCounter >> #decrease calls
> both self markDirty and self triggerCometEvent:
> ILCometCounterChangedEvent new.
> Commenting out the triggerCometEvent: has no effect. Nothing happens
> when I change it to:
>
> decrease
>       [ 5
>           timesRepeat: [ counter decrease.
>              self markDirty.
>              self triggerCometEvent: ILCometCounterChangedEvent new.
>              1 seconds wait ] ] fork
>
> Which I thought should decrease the counter visibly over 5 seconds.
>
> Network log shows a long-polling xhr request that returns after 1:36 min
> and a new one is set up, so something is happening.
>
> Perhaps comet has been disabled or broken and just gone unnoticed since
> the example does not really rely on server side push? Or am I forking
> the process in the wrong way for Iliad? Similar code works when just
> logging to Transcript.
>
> cheers
> Siemen
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="8h2QJsGcBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">il...@googlegroups.com
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="8h2QJsGcBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">il...@googlegroups.com>.
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com&#39;;return true;">https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
> <<a href="https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: comet

Siemen Baader
Hi Yuet & Benoit,

I actually made it work but missed to write back. I'll look at my code get back to you. The implementation is indeed like Benoit outlined - the Comet event triggering mechanism explicitly executes every other session than the current one. This looks intentional, it just seems like the use case of having a server-side process trigger a Comet event has not been considered in the original implementation.

I'll get back with details in the near future.

Thanks for the pointers back then, Benoit!

-- Siemen





On Mon, Apr 13, 2020 at 2:41 PM Yuet Ip <[hidden email]> wrote:
Hello Benoit/Siemen,

Just loaded up the latest Pharo 6 and loaded the stable version of Iliad, all on Windows 10.
Something is not quite right with the Comet example for me. 
Opening a new browser (Chrome) does indeed show the latest value, however changing the value in one browser does not update any others. 
(At least not "immediately")
I haven't timed it, but I guess it takes around 2 minutes  for the other browsers to catch up...and show the latest counter value.... very strange.

Any thoughts? How do you go about finding what the problem is?

Cheers!

Yuet

On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
Hi Siemen,

  I never used the Comet part of Iliad and I don't know a lot about it.
But what I found working in the ILCometCounter is that :
        - open the app in a first browser, increment the counter ;
        - open the app in a second browser, the counter will be allready
incremented ;
        - increment/decrement it in either browser and the change is immediatly
visible in the other browser.

  From my understanding in the increase method :
        - self markDirty is for updating the session where the action was done ;
        - self triggerCometEvent: ILCometCounterChangedEvent new is for
updating the other opened sessions of the ILCometCounterApplication.


  I am not sure why your test with timesRepeat doesn't work.
  I tried to update the counter from a Playground with :
        ILCometCounterModel instance increase.
  but it isn't working as the singleton model is updated but the event
isn't sended to Iliad sessions.
  Looking more to the Comet code It doesn't seemed to be an entry point
to send events from outside Iliad. It should be not too hard to add one
however.

Cheers,
Benoit

Le 13/02/20 à 14:15, Siemen Baader a écrit :

> Hi,
> is comet working in Iliad?
>
> I was experimenting with the ILCometCounter example and it seems to me
> that the example just works because ILCometCounter >> #decrease calls
> both self markDirty and self triggerCometEvent:
> ILCometCounterChangedEvent new.
> Commenting out the triggerCometEvent: has no effect. Nothing happens
> when I change it to:
>
> decrease
>       [ 5
>           timesRepeat: [ counter decrease.
>              self markDirty.
>              self triggerCometEvent: ILCometCounterChangedEvent new.
>              1 seconds wait ] ] fork
>
> Which I thought should decrease the counter visibly over 5 seconds.
>
> Network log shows a long-polling xhr request that returns after 1:36 min
> and a new one is set up, so something is happening.
>
> Perhaps comet has been disabled or broken and just gone unnoticed since
> the example does not really rely on server side push? Or am I forking
> the process in the wrong way for Iliad? Similar code works when just
> logging to Transcript.
>
> cheers
> Siemen
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
> <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CAM47Zxr7SignXdbbfn2FgbVNdZ5%2BBF_QAuQbwEYgjewiyjO50Q%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: comet

benoit
In reply to this post by Yuet Ip
Hello Yuet,

  I don't have any idea on what could be the issue. I wasn't able to
reproduce it.
  When I test on Windows 10 between Chrome and Internet Explorer
changing the value is instantaneous (as really after the click the two
windows are updated at the same time). By the way this is with a local
Pharo install. Could it be that your browsers have distinct network
configuration ?

  If I add to investigate this, my first idea would be to check if the
delay is in Iliad/Pharo or not. To do that... Hum I was going to say to
log something in IliadKom convertResponse: but I have no idea to how
Comet is sending updated data to the client, so not sure it's using
Comanche.
  I never played with the inner of Comet and there isn't a lot of
comments to get how it works... Well, quickly looking at the code, I
think I would begin in ILWidget->triggerCometEvent: or maybe in
IlCometHandler->push.

@+
Benoit



Le 13/04/20 à 14:41, Yuet Ip a écrit :

> Hello Benoit/Siemen,
>
> Just loaded up the latest Pharo 6 and loaded the stable version of
> Iliad, all on Windows 10.
> Something is not quite right with the Comet example for me.
> Opening a new browser (Chrome) does indeed show the latest value,
> however changing the value in one browser does not update any others.
> (At least not "immediately")
> I haven't timed it, but I guess it takes around 2 minutes  for the other
> browsers to catch up...and show the latest counter value.... very strange.
>
> Any thoughts? How do you go about finding what the problem is?
>
> Cheers!
>
> Yuet
>
> On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
>
>     Hi Siemen,
>
>        I never used the Comet part of Iliad and I don't know a lot about
>     it.
>     But what I found working in the ILCometCounter is that :
>              - open the app in a first browser, increment the counter ;
>              - open the app in a second browser, the counter will be
>     allready
>     incremented ;
>              - increment/decrement it in either browser and the change
>     is immediatly
>     visible in the other browser.
>
>        From my understanding in the increase method :
>              - self markDirty is for updating the session where the
>     action was done ;
>              - self triggerCometEvent: ILCometCounterChangedEvent new is
>     for
>     updating the other opened sessions of the ILCometCounterApplication.
>
>
>        I am not sure why your test with timesRepeat doesn't work.
>        I tried to update the counter from a Playground with :
>              ILCometCounterModel instance increase.
>        but it isn't working as the singleton model is updated but the event
>     isn't sended to Iliad sessions.
>        Looking more to the Comet code It doesn't seemed to be an entry
>     point
>     to send events from outside Iliad. It should be not too hard to add one
>     however.
>
>     Cheers,
>     Benoit
>
>     Le 13/02/20 à 14:15, Siemen Baader a écrit :
>      > Hi,
>      > is comet working in Iliad?
>      >
>      > I was experimenting with the ILCometCounter example and it seems
>     to me
>      > that the example just works because ILCometCounter >> #decrease
>     calls
>      > both self markDirty and self triggerCometEvent:
>      > ILCometCounterChangedEvent new.
>      > Commenting out the triggerCometEvent: has no effect. Nothing happens
>      > when I change it to:
>      >
>      > decrease
>      >       [ 5
>      >           timesRepeat: [ counter decrease.
>      >              self markDirty.
>      >              self triggerCometEvent: ILCometCounterChangedEvent new.
>      >              1 seconds wait ] ] fork
>      >
>      > Which I thought should decrease the counter visibly over 5 seconds.
>      >
>      > Network log shows a long-polling xhr request that returns after
>     1:36 min
>      > and a new one is set up, so something is happening.
>      >
>      > Perhaps comet has been disabled or broken and just gone unnoticed
>     since
>      > the example does not really rely on server side push? Or am I
>     forking
>      > the process in the wrong way for Iliad? Similar code works when just
>      > logging to Transcript.
>      >
>      > cheers
>      > Siemen
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "Iliad project" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to [hidden email] <javascript:>
>      > <mailto:[hidden email] <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com>
>
>      >
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com 
> <https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/fc91a6eb-3e07-9242-e3a3-ca33ff8d8c45%40free.fr.
Reply | Threaded
Open this post in threaded view
|

Re: comet

Yuet Ip
Hello Benoit,

Ummm strange mine was a local install too..so this is most mysterious!
Thanks for the hints I’ll look into them.

Ultimately my target System would be running (Iliad / Aida Web) on GemStone. To this end, my self education would start with Zinc on Pharo, Zinc on GemStone; and getting some sort of websocket examples working in these environments.

Has anyone attempted the port of Iliad to GemStone? I wouldn’t want to redo something that has already been done.

Cheers!

Yuet


On Mon, Apr 20, 2020 at 5:36 PM benoit <[hidden email]> wrote:
Hello Yuet,

  I don't have any idea on what could be the issue. I wasn't able to
reproduce it.
  When I test on Windows 10 between Chrome and Internet Explorer
changing the value is instantaneous (as really after the click the two
windows are updated at the same time). By the way this is with a local
Pharo install. Could it be that your browsers have distinct network
configuration ?

  If I add to investigate this, my first idea would be to check if the
delay is in Iliad/Pharo or not. To do that... Hum I was going to say to
log something in IliadKom convertResponse: but I have no idea to how
Comet is sending updated data to the client, so not sure it's using
Comanche.
  I never played with the inner of Comet and there isn't a lot of
comments to get how it works... Well, quickly looking at the code, I
think I would begin in ILWidget->triggerCometEvent: or maybe in
IlCometHandler->push.

@+
Benoit



Le 13/04/20 à 14:41, Yuet Ip a écrit :
> Hello Benoit/Siemen,
>
> Just loaded up the latest Pharo 6 and loaded the stable version of
> Iliad, all on Windows 10.
> Something is not quite right with the Comet example for me.
> Opening a new browser (Chrome) does indeed show the latest value,
> however changing the value in one browser does not update any others.
> (At least not "immediately")
> I haven't timed it, but I guess it takes around 2 minutes  for the other
> browsers to catch up...and show the latest counter value.... very strange.
>
> Any thoughts? How do you go about finding what the problem is?
>
> Cheers!
>
> Yuet
>
> On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
>
>     Hi Siemen,
>
>        I never used the Comet part of Iliad and I don't know a lot about
>     it.
>     But what I found working in the ILCometCounter is that :
>              - open the app in a first browser, increment the counter ;
>              - open the app in a second browser, the counter will be
>     allready
>     incremented ;
>              - increment/decrement it in either browser and the change
>     is immediatly
>     visible in the other browser.
>
>        From my understanding in the increase method :
>              - self markDirty is for updating the session where the
>     action was done ;
>              - self triggerCometEvent: ILCometCounterChangedEvent new is
>     for
>     updating the other opened sessions of the ILCometCounterApplication.
>
>
>        I am not sure why your test with timesRepeat doesn't work.
>        I tried to update the counter from a Playground with :
>              ILCometCounterModel instance increase.
>        but it isn't working as the singleton model is updated but the event
>     isn't sended to Iliad sessions.
>        Looking more to the Comet code It doesn't seemed to be an entry
>     point
>     to send events from outside Iliad. It should be not too hard to add one
>     however.
>
>     Cheers,
>     Benoit
>
>     Le 13/02/20 à 14:15, Siemen Baader a écrit :
>      > Hi,
>      > is comet working in Iliad?
>      >
>      > I was experimenting with the ILCometCounter example and it seems
>     to me
>      > that the example just works because ILCometCounter >> #decrease
>     calls
>      > both self markDirty and self triggerCometEvent:
>      > ILCometCounterChangedEvent new.
>      > Commenting out the triggerCometEvent: has no effect. Nothing happens
>      > when I change it to:
>      >
>      > decrease
>      >       [ 5
>      >           timesRepeat: [ counter decrease.
>      >              self markDirty.
>      >              self triggerCometEvent: ILCometCounterChangedEvent new.
>      >              1 seconds wait ] ] fork
>      >
>      > Which I thought should decrease the counter visibly over 5 seconds.
>      >
>      > Network log shows a long-polling xhr request that returns after
>     1:36 min
>      > and a new one is set up, so something is happening.
>      >
>      > Perhaps comet has been disabled or broken and just gone unnoticed
>     since
>      > the example does not really rely on server side push? Or am I
>     forking
>      > the process in the wrong way for Iliad? Similar code works when just
>      > logging to Transcript.
>      >
>      > cheers
>      > Siemen
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "Iliad project" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to [hidden email] <javascript:>
>      > <mailto:[hidden email] <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com>
>
>      >
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com
> <https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/fc91a6eb-3e07-9242-e3a3-ca33ff8d8c45%40free.fr.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CADGE0WSF8gFmXn2vka_vEmeTdTTKFb1Z%3DLf5dy4ffJDeqw87GQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: comet

Siemen Baader
Hi Yuet, Benoit, everyone,

I found the code. What I did is I ran an interactive debugger on 'self triggerCometEvent: ' in my widget code. It is inherited from ILWidget. This led me to ILCometHandler #triggerEvent: which looks like this:

"protocol: actions"
triggerEvent: anEvent
     self otherHandlers do: [:each |
     each handleEvent: anEvent]

which I monkeypatched to:

"protocol: actions"
triggerEvent: anEvent
     "Added by SiemenBaader and appears to work.. otherHandlers are empty. Hm..."

     "--------------"
     self handleEvent: anEvent.
     "------------"
     self otherHandlers do: [ :each | each handleEvent: anEvent ]

ILCometHandlers #otherHandlers is only used by this method, so together with the ILCometCounterExample, which updates its count directly via #markDirty it seems to me that Iliad comet has simply been designed for use cases like chat where different sessions update each other - and not ones where the current session's UI is updated by a long-running server process.

I have attached a fileout of a small working clock app that shows the time on the server via comet. It requires the above patch which is not included in the fileout. 

Please share what you think & find out.

cheers
Siemen


On Mon, Apr 20, 2020 at 3:35 PM Yuet Ip <[hidden email]> wrote:
Hello Benoit,

Ummm strange mine was a local install too..so this is most mysterious!
Thanks for the hints I’ll look into them.

Ultimately my target System would be running (Iliad / Aida Web) on GemStone. To this end, my self education would start with Zinc on Pharo, Zinc on GemStone; and getting some sort of websocket examples working in these environments.

Has anyone attempted the port of Iliad to GemStone? I wouldn’t want to redo something that has already been done.

Cheers!

Yuet


On Mon, Apr 20, 2020 at 5:36 PM benoit <[hidden email]> wrote:
Hello Yuet,

  I don't have any idea on what could be the issue. I wasn't able to
reproduce it.
  When I test on Windows 10 between Chrome and Internet Explorer
changing the value is instantaneous (as really after the click the two
windows are updated at the same time). By the way this is with a local
Pharo install. Could it be that your browsers have distinct network
configuration ?

  If I add to investigate this, my first idea would be to check if the
delay is in Iliad/Pharo or not. To do that... Hum I was going to say to
log something in IliadKom convertResponse: but I have no idea to how
Comet is sending updated data to the client, so not sure it's using
Comanche.
  I never played with the inner of Comet and there isn't a lot of
comments to get how it works... Well, quickly looking at the code, I
think I would begin in ILWidget->triggerCometEvent: or maybe in
IlCometHandler->push.

@+
Benoit



Le 13/04/20 à 14:41, Yuet Ip a écrit :
> Hello Benoit/Siemen,
>
> Just loaded up the latest Pharo 6 and loaded the stable version of
> Iliad, all on Windows 10.
> Something is not quite right with the Comet example for me.
> Opening a new browser (Chrome) does indeed show the latest value,
> however changing the value in one browser does not update any others.
> (At least not "immediately")
> I haven't timed it, but I guess it takes around 2 minutes  for the other
> browsers to catch up...and show the latest counter value.... very strange.
>
> Any thoughts? How do you go about finding what the problem is?
>
> Cheers!
>
> Yuet
>
> On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
>
>     Hi Siemen,
>
>        I never used the Comet part of Iliad and I don't know a lot about
>     it.
>     But what I found working in the ILCometCounter is that :
>              - open the app in a first browser, increment the counter ;
>              - open the app in a second browser, the counter will be
>     allready
>     incremented ;
>              - increment/decrement it in either browser and the change
>     is immediatly
>     visible in the other browser.
>
>        From my understanding in the increase method :
>              - self markDirty is for updating the session where the
>     action was done ;
>              - self triggerCometEvent: ILCometCounterChangedEvent new is
>     for
>     updating the other opened sessions of the ILCometCounterApplication.
>
>
>        I am not sure why your test with timesRepeat doesn't work.
>        I tried to update the counter from a Playground with :
>              ILCometCounterModel instance increase.
>        but it isn't working as the singleton model is updated but the event
>     isn't sended to Iliad sessions.
>        Looking more to the Comet code It doesn't seemed to be an entry
>     point
>     to send events from outside Iliad. It should be not too hard to add one
>     however.
>
>     Cheers,
>     Benoit
>
>     Le 13/02/20 à 14:15, Siemen Baader a écrit :
>      > Hi,
>      > is comet working in Iliad?
>      >
>      > I was experimenting with the ILCometCounter example and it seems
>     to me
>      > that the example just works because ILCometCounter >> #decrease
>     calls
>      > both self markDirty and self triggerCometEvent:
>      > ILCometCounterChangedEvent new.
>      > Commenting out the triggerCometEvent: has no effect. Nothing happens
>      > when I change it to:
>      >
>      > decrease
>      >       [ 5
>      >           timesRepeat: [ counter decrease.
>      >              self markDirty.
>      >              self triggerCometEvent: ILCometCounterChangedEvent new.
>      >              1 seconds wait ] ] fork
>      >
>      > Which I thought should decrease the counter visibly over 5 seconds.
>      >
>      > Network log shows a long-polling xhr request that returns after
>     1:36 min
>      > and a new one is set up, so something is happening.
>      >
>      > Perhaps comet has been disabled or broken and just gone unnoticed
>     since
>      > the example does not really rely on server side push? Or am I
>     forking
>      > the process in the wrong way for Iliad? Similar code works when just
>      > logging to Transcript.
>      >
>      > cheers
>      > Siemen
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "Iliad project" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to [hidden email] <javascript:>
>      > <mailto:[hidden email] <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com>
>
>      >
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com
> <https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/fc91a6eb-3e07-9242-e3a3-ca33ff8d8c45%40free.fr.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CADGE0WSF8gFmXn2vka_vEmeTdTTKFb1Z%3DLf5dy4ffJDeqw87GQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CAM47ZxoJwhdsiQdvMbtjfGUjEAfi-yBxnVR6Nody9V6WjqOD-g%40mail.gmail.com.

NightClock.st (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: comet

Yuet Ip
Siemen,

Yay! The patch works as described.
Thank you so much!

Cheers!

Yuet

On Fri, 24 Apr 2020 at 19:04, Siemen Baader <[hidden email]> wrote:
Hi Yuet, Benoit, everyone,

I found the code. What I did is I ran an interactive debugger on 'self triggerCometEvent: ' in my widget code. It is inherited from ILWidget. This led me to ILCometHandler #triggerEvent: which looks like this:

"protocol: actions"
triggerEvent: anEvent
     self otherHandlers do: [:each |
     each handleEvent: anEvent]

which I monkeypatched to:

"protocol: actions"
triggerEvent: anEvent
     "Added by SiemenBaader and appears to work.. otherHandlers are empty. Hm..."

     "--------------"
     self handleEvent: anEvent.
     "------------"
     self otherHandlers do: [ :each | each handleEvent: anEvent ]

ILCometHandlers #otherHandlers is only used by this method, so together with the ILCometCounterExample, which updates its count directly via #markDirty it seems to me that Iliad comet has simply been designed for use cases like chat where different sessions update each other - and not ones where the current session's UI is updated by a long-running server process.

I have attached a fileout of a small working clock app that shows the time on the server via comet. It requires the above patch which is not included in the fileout. 

Please share what you think & find out.

cheers
Siemen


On Mon, Apr 20, 2020 at 3:35 PM Yuet Ip <[hidden email]> wrote:
Hello Benoit,

Ummm strange mine was a local install too..so this is most mysterious!
Thanks for the hints I’ll look into them.

Ultimately my target System would be running (Iliad / Aida Web) on GemStone. To this end, my self education would start with Zinc on Pharo, Zinc on GemStone; and getting some sort of websocket examples working in these environments.

Has anyone attempted the port of Iliad to GemStone? I wouldn’t want to redo something that has already been done.

Cheers!

Yuet


On Mon, Apr 20, 2020 at 5:36 PM benoit <[hidden email]> wrote:
Hello Yuet,

  I don't have any idea on what could be the issue. I wasn't able to
reproduce it.
  When I test on Windows 10 between Chrome and Internet Explorer
changing the value is instantaneous (as really after the click the two
windows are updated at the same time). By the way this is with a local
Pharo install. Could it be that your browsers have distinct network
configuration ?

  If I add to investigate this, my first idea would be to check if the
delay is in Iliad/Pharo or not. To do that... Hum I was going to say to
log something in IliadKom convertResponse: but I have no idea to how
Comet is sending updated data to the client, so not sure it's using
Comanche.
  I never played with the inner of Comet and there isn't a lot of
comments to get how it works... Well, quickly looking at the code, I
think I would begin in ILWidget->triggerCometEvent: or maybe in
IlCometHandler->push.

@+
Benoit



Le 13/04/20 à 14:41, Yuet Ip a écrit :
> Hello Benoit/Siemen,
>
> Just loaded up the latest Pharo 6 and loaded the stable version of
> Iliad, all on Windows 10.
> Something is not quite right with the Comet example for me.
> Opening a new browser (Chrome) does indeed show the latest value,
> however changing the value in one browser does not update any others.
> (At least not "immediately")
> I haven't timed it, but I guess it takes around 2 minutes  for the other
> browsers to catch up...and show the latest counter value.... very strange.
>
> Any thoughts? How do you go about finding what the problem is?
>
> Cheers!
>
> Yuet
>
> On Saturday, 15 February 2020 19:24:14 UTC+8, benoit wrote:
>
>     Hi Siemen,
>
>        I never used the Comet part of Iliad and I don't know a lot about
>     it.
>     But what I found working in the ILCometCounter is that :
>              - open the app in a first browser, increment the counter ;
>              - open the app in a second browser, the counter will be
>     allready
>     incremented ;
>              - increment/decrement it in either browser and the change
>     is immediatly
>     visible in the other browser.
>
>        From my understanding in the increase method :
>              - self markDirty is for updating the session where the
>     action was done ;
>              - self triggerCometEvent: ILCometCounterChangedEvent new is
>     for
>     updating the other opened sessions of the ILCometCounterApplication.
>
>
>        I am not sure why your test with timesRepeat doesn't work.
>        I tried to update the counter from a Playground with :
>              ILCometCounterModel instance increase.
>        but it isn't working as the singleton model is updated but the event
>     isn't sended to Iliad sessions.
>        Looking more to the Comet code It doesn't seemed to be an entry
>     point
>     to send events from outside Iliad. It should be not too hard to add one
>     however.
>
>     Cheers,
>     Benoit
>
>     Le 13/02/20 à 14:15, Siemen Baader a écrit :
>      > Hi,
>      > is comet working in Iliad?
>      >
>      > I was experimenting with the ILCometCounter example and it seems
>     to me
>      > that the example just works because ILCometCounter >> #decrease
>     calls
>      > both self markDirty and self triggerCometEvent:
>      > ILCometCounterChangedEvent new.
>      > Commenting out the triggerCometEvent: has no effect. Nothing happens
>      > when I change it to:
>      >
>      > decrease
>      >       [ 5
>      >           timesRepeat: [ counter decrease.
>      >              self markDirty.
>      >              self triggerCometEvent: ILCometCounterChangedEvent new.
>      >              1 seconds wait ] ] fork
>      >
>      > Which I thought should decrease the counter visibly over 5 seconds.
>      >
>      > Network log shows a long-polling xhr request that returns after
>     1:36 min
>      > and a new one is set up, so something is happening.
>      >
>      > Perhaps comet has been disabled or broken and just gone unnoticed
>     since
>      > the example does not really rely on server side push? Or am I
>     forking
>      > the process in the wrong way for Iliad? Similar code works when just
>      > logging to Transcript.
>      >
>      > cheers
>      > Siemen
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "Iliad project" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to [hidden email] <javascript:>
>      > <mailto:[hidden email] <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com>
>
>      >
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/iliad/CAM47ZxpZEv-Ef0SJgBniJ59DkTHLeAJBoQ-pJtYVE2YJqhhJew%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com
> <https://groups.google.com/d/msgid/iliad/c022bf08-73a1-4915-8e65-dc236b647221%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/fc91a6eb-3e07-9242-e3a3-ca33ff8d8c45%40free.fr.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CADGE0WSF8gFmXn2vka_vEmeTdTTKFb1Z%3DLf5dy4ffJDeqw87GQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CAM47ZxoJwhdsiQdvMbtjfGUjEAfi-yBxnVR6Nody9V6WjqOD-g%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/CADGE0WRBpBbN906F9z5RoTfGLZ1tZdHoYiY16Hk4E0%3Dd35R0VA%40mail.gmail.com.