Announcements question

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

Announcements question

Bernat Romagosa
Hi list,

I've just read this in the Announcements chapter of the CollaborActive Book:

If your client object is to be destroyed before the subject, do not forget to unsubscribe it from the announcer, or it will not be garbage collected and will keep receiving events!
Parent>>delete
    self session announcer unsubscribe: self

Is that an issue I should be handling in Iliad? My sessions never expire, so I'm guessing this could end up in lots of instances of widgets who subscribed to an announcement.

If so, how can I know when a widget has just stopped being "used"?

Thanks!

--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Nicolas Petton


2012/5/7 Bernat Romagosa <[hidden email]>
Hi list,


Hi Bernat, 
 
I've just read this in the Announcements chapter of the CollaborActive Book:

If your client object is to be destroyed before the subject, do not forget to unsubscribe it from the announcer, or it will not be garbage collected and will keep receiving events!
Parent>>delete
    self session announcer unsubscribe: self

Is that an issue I should be handling in Iliad? My sessions never expire

Why don't they expire?
 
, so I'm guessing this could end up in lots of instances of widgets who subscribed to an announcement.

If so, how can I know when a widget has just stopped being "used"?

You cannot know, because a tab with this widget could still be open. Until the session expires, all registered widgets/applications should be available.


Cheers,
Nico
 

Thanks!

--
Bernat Romagosa.

Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Bernat Romagosa
Hi Nico,

They only expire if the user logs out. If a user comes back after a week, when he points at the app's url, he should still be logged in. Is there a better solution than to make sessions last forever? We went this way because we'll only have around 200 users, so we thought the session data wouldn't become that huge...

Cheers!

2012/5/8 nicolas petton <[hidden email]>


2012/5/7 Bernat Romagosa <[hidden email]>
Hi list,


Hi Bernat, 
 
I've just read this in the Announcements chapter of the CollaborActive Book:

If your client object is to be destroyed before the subject, do not forget to unsubscribe it from the announcer, or it will not be garbage collected and will keep receiving events!
Parent>>delete
    self session announcer unsubscribe: self

Is that an issue I should be handling in Iliad? My sessions never expire

Why don't they expire?
 
, so I'm guessing this could end up in lots of instances of widgets who subscribed to an announcement.

If so, how can I know when a widget has just stopped being "used"?

You cannot know, because a tab with this widget could still be open. Until the session expires, all registered widgets/applications should be available.


Cheers,
Nico
 

Thanks!

--
Bernat Romagosa.




--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Nicolas Petton
Bernat Romagosa <[hidden email]> writes:

> They only expire if the user logs out. If a user comes back after a
> week, when he points at the app's url, he should still be logged in.
> Is there a better solution than to make sessions last forever? We went
> this way because we'll only have around 200 users, so we thought the
> session data wouldn't become that huge...

I would clear the state of the session (actions and
applications/widgets) instead of doing a real expire, and set the expire
to 24 hrs.

This way you keep your users logged in, and keep your sessions
lightweight.

Cheers,
Nico
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Bernat Romagosa
Thanks Nico, we'll do as you advise :)

2012/5/8 <[hidden email]>
Bernat Romagosa <[hidden email]> writes:

> They only expire if the user logs out. If a user comes back after a
> week, when he points at the app's url, he should still be logged in.
> Is there a better solution than to make sessions last forever? We went
> this way because we'll only have around 200 users, so we thought the
> session data wouldn't become that huge...

I would clear the state of the session (actions and
applications/widgets) instead of doing a real expire, and set the expire
to 24 hrs.

This way you keep your users logged in, and keep your sessions
lightweight.

Cheers,
Nico



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Bernat Romagosa
I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following:

MySession >> initialize
  super initialize.
  self expirySeconds: 10

and also:

MySession >> defaultExpirySeconds
  ^ 10

But I wait for 10 seconds and the #expire method isn't triggered. What am I doing wrong?

Thanks!

--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Bernat Romagosa
Figured it out!

The minimum expiry time is 10 minutes, as that's the interval at which ILSessionManager checks which sessions are expired. We were being too... impatient ;)

Everything working now, thanks!

2012/5/9 Bernat Romagosa <[hidden email]>
I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following:

MySession >> initialize
  super initialize.
  self expirySeconds: 10

and also:

MySession >> defaultExpirySeconds
  ^ 10

But I wait for 10 seconds and the #expire method isn't triggered. What am I doing wrong?

Thanks!

--
Bernat Romagosa.



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Nicolas Petton
Cool!

Did you manage to clear the session state instead of really expiring it?

Something like the following should work:

MySession >> expire
    "Do not actually expire. Just clear the session state and keep users logged in."
    self 
        clearActionRegistry; 
        clearStateRegistries.
    applications := nil

Nico

2012/5/9 Bernat Romagosa <[hidden email]>
Figured it out!

The minimum expiry time is 10 minutes, as that's the interval at which ILSessionManager checks which sessions are expired. We were being too... impatient ;)

Everything working now, thanks!


2012/5/9 Bernat Romagosa <[hidden email]>
I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following:

MySession >> initialize
  super initialize.
  self expirySeconds: 10

and also:

MySession >> defaultExpirySeconds
  ^ 10

But I wait for 10 seconds and the #expire method isn't triggered. What am I doing wrong?

Thanks!

--
Bernat Romagosa.



--
Bernat Romagosa.

Reply | Threaded
Open this post in threaded view
|

Re: Announcements question

Bernat Romagosa
Yep, my expire is pretty similar :)

MySession >> expire
self actionRegistry unregisterAllActions.
applications := IdentityDictionary new.
announcer := Announcer new.
self
clearActionRegistry;
clearStateRegistries.

Thanks a lot!

Bernat.

2012/5/9 nicolas petton <[hidden email]>
Cool!

Did you manage to clear the session state instead of really expiring it?

Something like the following should work:

MySession >> expire
    "Do not actually expire. Just clear the session state and keep users logged in."
    self 
        clearActionRegistry; 
        clearStateRegistries.
    applications := nil

Nico

2012/5/9 Bernat Romagosa <[hidden email]>
Figured it out!

The minimum expiry time is 10 minutes, as that's the interval at which ILSessionManager checks which sessions are expired. We were being too... impatient ;)

Everything working now, thanks!


2012/5/9 Bernat Romagosa <[hidden email]>
I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following:

MySession >> initialize
  super initialize.
  self expirySeconds: 10

and also:

MySession >> defaultExpirySeconds
  ^ 10

But I wait for 10 seconds and the #expire method isn't triggered. What am I doing wrong?

Thanks!

--
Bernat Romagosa.



--
Bernat Romagosa.




--
Bernat Romagosa.