Ticket #89 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

SelectorController: compute expiry time automatically

Reported by: obaltzer Assigned to: somebody
Priority: normal Milestone: 0.8.0
Component: Controller Version:
Severity: normal Keywords:
Cc:

Description

Ideally, in the future, when the selector is queried from the database, it should automatically determine the earliest time it needs to be renewed if not previously invalidated by an event submission. We can just scan the list of events in the selector to determine the earliest time an event or announcement expires or announcement becomes active.

Change History

09/08/05 10:43:24 AM changed by nichols

This should be done right after an event or announcement is submitted.

09/08/05 11:13:50 AM changed by obaltzer

Yes, if it is reasonable to find out, to which selectors the event belongs to without querying the database. Modeling the selector entity associations inside of Ruby is most likely a pain, but it is necessary to inverse the selector operation: what selectors select a particular event. Certainly an interesting task.

I think just invalidating all selectors after adding an event is just easier. Since, we query the database anyway when we load the selector for the first time, figuring out when the selector expires is pretty straight forward.

If we do customized selectors at some point, we also have to think about a more sophisticated caching mechanism, since 1000 selectors probably hold to 50% the same data which is about 50% more memory than we really need to use. In this case, we may want to cache all upcoming events/current announcements and then do the whole selector computation for each request in memory without querying the database at all.

06/09/05 04:36:17 PM changed by obaltzer

  • milestone changed from WishList to 2.00.

03/04/06 11:12:33 AM changed by ssmith

  • milestone changed from 0.11 to 0.8.0.

Milestone 0.11 deleted