On Feb 1, 2:59 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm doing a stock app that displays lots of graphs/data and lets user
> customize some of it online.
>
> ** When a user wants to save their work, I can either create a file
> (with a bunch of numbers) or stuff those numbers in the database.
> I'm not sure what the benefits of either are. The file way seems
> easier and more *portable* so what will a database do for me?
>
> ** The session data should be held in RAM/python objects rather than
> hitting the database or file system for speed right?
This advice isn't focused on you only, it's general advice I give to
anyone who asks questions like this, and i'm not trying to be
condescending, I have learned these the hard way, you can too if you
won't and I won't look down on you :)
The first rule of web apps is, don't optimise anything you don't have
to. Only pain and pointlessly sleepless nights comes from that.
So unless you're looking at dealing with a seriously scary number of
hits, use the stuff you're given by Turbogears wherever possible, it's
already debugged, it works in threads and it fails in a known, and
usually graceful fashion.
This means turning on the session object and using that, and it means
putting your data in a database.
Only once you've done that, and figured out a load testing scenario,
and *then* decided that it's too slow, should you start thinking about
the benefits of developing your own processes for handling things
you're given for free.
At which point you can come back and ask, or ask me directly, and I
will supply you with a dizzying array of ways to make your apps
faster :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---