Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hardly changing data on persistent aplications: wut do?

Name: Anonymous 2013-12-22 11:35

For persistent web applications, is it recommended to store hardly changing values in build-in variables? Should I set up a memory database (such as Redis) to store those values? Or a memory cache?

For example: configuration files will hardly change, and if they do, it's because you did it manually. Any thoughts?

Name: Anonymous 2013-12-22 11:56

Another example, since we are in a text board. Storing board information in variables, so you can query faster its configuration.

Name: Anonymous 2013-12-24 7:25

I don't think the place where it's stored matters much, but if it doesn't change much and there isn't very much of it, you may as well cache it in volatile memory once, and only reload when restarting the server or when a configuration change has occurred. But then again maybe it would pay off to have access to it as flexible as any other content on the site. What if you wanted to change a configuration while the site was getting lots of hits, and wanted to minimize the downtime?

Name: Anonymous 2013-12-24 8:04

I don't know much about this sort of thing, but isn't the typical response ``Put the information in whatever place makes the most sense for maintainance purposes, then stick [a cluster running] memcached in between storage and usage.''? If your data isn't trivial, you can't do much better than putting it in RAM (except perhaps if it changes so infrequently that you can afford to #define it and recompile whenever the data changes, hoping that the compiler will optimize lots of stuff out for you), and if it's too big to fit in memory of a single machine, you'll probably want to scale cluster-wise before you drop back to disk, so you might as well eat the local network penalty anyway.

I think. Take that with a grain of salt.

Name: Anonymous 2013-12-25 6:08

>>2
I know I'll get reamed for this because in this case caching shouldn't be relied on but there is caching.

Name: Anonymous 2016-06-15 12:20

Check em

Name: Malloc Once Never Free 2016-06-15 15:10

Malloc Once Never Free

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List