Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: precalculating event dates vs.recalculating them.

by roboticus (Chancellor)
on Jun 24, 2008 at 12:23 UTC ( #693722=note: print w/replies, xml ) Need Help??


in reply to Re^2: precalculating event dates vs.recalculating them.
in thread precalculating event dates vs.recalculating them.

samtregar:

Actually, I always keep the clients foremost in my mind when coding. But we are probably imagining two different things. I wasn't intending that JavaScript do something computationally intensive. If the browser is showing a week or month calendar, it seems to me that having a bit of javascript interpret a dozen recurrence items ought not be demanding. But having the server do a dozen recurrence item calculations for tens of millions of customers might be prohibitive. I was imagining that few clients would have very many recurring tasks, and that computing the rules wasn't terribly serious. (I've not written it, but I think I could imagine what the code would basically look like.)

Having said that, I'm not intending to backpedal. I'm just saying that I don't think it would be very demanding at all (but I've been wrong before). I was simply intending to promote "compute it as you need it" rather than "bulk compute in case you need it".

Disclaimers:
  • I *only rarely* do web stuff, and haven't written a line of JavaScript in over 10 years. So I really don't know if it's that much of a pig or not.
  • I'm not imagining terribly complicated recurrence rules.
  • I'm anticipating very few customers with very many recurrence rules.
  • And I'm *certainly* not advocating that Google treat our machines as a compute-farm! ;^)
...roboticus
  • Comment on Re^3: precalculating event dates vs.recalculating them.

Replies are listed 'Best First'.
Re^4: precalculating event dates vs.recalculating them.
by samtregar (Abbot) on Jun 24, 2008 at 16:30 UTC
    I'm anticipating very few customers with very many recurrence rules.

    Well in that case why bother? It hardly matters what approach you take if you're not planning for lots of users. Surely your server has the power to compute tons of calender data for just a few users.

    Aside from that, what you're saying almost makes sense... But I have a nagging sense that the case you're presenting isn't actually possible. So much work that your server can't do it, but so little work that you should hand it off to some Javascript to run on the client. I just can't imagine when that would be the case, but perhaps I'm getting too used to having really beefy servers.

    When I think of client processing power I picture my parent's last PC - an Athlon 1800 with 256MB of RAM being slowly choked to death by XP and a collection of useless desktop widgets. The disk was chugging basically constantly during web browsing. Let's just say there wasn't a lot of spare power left for unnecessary Javascript!

    -sam

      I'm anticipating very few customers with very many recurrence rules. Well in that case why bother? It hardly matters what approach you take if you're not planning for lots of users. Surely your server has the power to compute tons of calender data for just a few users.

      Heh ... I didn't mean the system would have very few customers: I meant many customers, but only a few with a *lot* of recurrence rules (i.e. enough to be a burden to a minimally-configured client).

      But I have a nagging sense that the case you're presenting isn't actually possible. So much work that your server can't do it, but so little work that you should hand it off to some Javascript to run on the client. I just can't imagine when that would be the case, but perhaps I'm getting too used to having really beefy servers.

      You're probably right. It's getting difficult to *not* have a beefy server any longer.

      ...roboticus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://693722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-05-25 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (146 votes). Check out past polls.

    Notices?