swiftone has asked for the wisdom of the Perl Monks concerning the following question:
Anyway, I'm writing up a bulletin board system, stealing ideas from any other system I can see. To improve performance in retrieving nested threads, I have a mapping field for each message. Like so:
| Mapping ID | NodeID |
| 1024 | 1 |
| 2048 | 2</td |
So after a certain amount of nesting (I'm still working through the math), there will not be room for a new MapID, and ALL MapIDs must be recalcuated (I'd actually want to do this a few levels BEFORE required, to allow for detection time). I could either run this in a cron job, or I can have it triggered by the posting script.
My question (finally!) is a procedural one. Should I have a monitoring program check periodically, or should I have the user posting a message trip the program? Should I have the posting script do the work of recalculating the mapping IDs, or should it pass the task to an external program?
|
|---|