Page 1 of 1
Most cross platform data storage medium?
Posted: Fri Sep 01, 2006 9:02 am
by alex.barylski
What do you think it is?
Considering:
- Safe mode
- Windows/Linux differences
- Default/most common PHP installs
I would think plain jane files?
I need to create a simple logging system, but do not need to support mutiple mediums via a driver/data store, etc...
So I want to pick one and forget about it (although i'm considering using a driver approach - I'm not looking for suggestions in this regard)
Posted: Fri Sep 01, 2006 9:14 am
by malcolmboston
flat files are supported by everything, however there are problems with them as im sure you know such as:
* 'slow' read / write access
* locking of files
* chmod and its associated functions
however for pure cross-platform compatability it cant be beaten.
Really i would say it all depends on what your storing, ive used a flat file system for a while for a logging class system i use on all my web-sites, mainly because i would like to keep it out of the database because some of my databases are already large.
like i say, it all depends on what you are using it for...
Posted: Fri Sep 01, 2006 9:26 am
by Ambush Commander
MySQL next. It's a database, I know, so it needs to be installed, but if you don't have it, you might as well be missing an arm.
Posted: Fri Sep 01, 2006 9:33 am
by alex.barylski
Ambush Commander wrote:MySQL next. It's a database, I know, so it needs to be installed, but if you don't have it, you might as well be missing an arm.
Agreed, but what if they don't have MySQL but PG instead? You could use a DB abstraction library like Ado, I realize...
But there are some 'cheap' hosting companies which only offer basic PHP installations...
$5/Month...
File logging seems like it's the only way to go...security is not a big deal for the data I am storing (so the file could reside anywhere)...
Posted: Fri Sep 01, 2006 11:07 am
by matthijs
So how cheap are those companies then? Since I know and have used a lot of shared hosts with php/mysql for about $2/month. That's a price anyone can afford, isn't it?
Posted: Fri Sep 01, 2006 2:09 pm
by feyd
That would depend on your income level, matthijs. For example, I know of several people that get the equivalent of about $1-5 a day.
Posted: Fri Sep 01, 2006 2:13 pm
by Luke
feyd wrote:That would depend on your income level, matthijs. For example, I know of several people that get the equivalent of about $1-5 a day.
sounds pretty lame

Posted: Fri Sep 01, 2006 2:20 pm
by feyd
It's horrible/illegal for some of us, but considering the pay scales in other countries compared to some, it's quite reasonable. It's all relative.
Posted: Fri Sep 01, 2006 2:32 pm
by matthijs
Ok, fair enough.
But is Hockey building a product sold to people who earn $1-5/day, which should be hosted somewere for 10ct/month? I just asked Hockey because I don't know any hosts which are (much) cheaper then the low-budget hosts which include mysql.
Or are we talking about the cheapest, cross-platform data storage here: recycled paper?
Mm, I think we might get really off topic here.. Most cross platform data storage medium was it? .txt files maybe?
Posted: Fri Sep 01, 2006 2:38 pm
by alex.barylski
You were off topic with your first reply
Your missing the point...my audience are not people who pay $5/month for hosting...jesus even I pay $25/month
The point was more a matter of principle...in supporting the greatest common denominator...so the maximum number of people could utilize my class *without* having to resort to some kind of abstraction layer/adapter/driver, etc...
File access, IMHO is a good starting point, but perhaps there was something else I wasn't aware of, so I asked a community...
*.txt isn't really a storage medium(or atleast what I meant by it)...as it's a plain simple file, but a *file* none the less...
LDAP, SQL, Files, SHMOP, etc...are examples of what I meant by *most* cross platform, well supported storage mediums
Cheers

Posted: Fri Sep 01, 2006 2:42 pm
by feyd
Most portable I would say is flat files, however they need to be binary safe (so probably base64'd or some other encoding that's seven bit or fewer.)
After which would be using a database. All of them support binary safe storage in some fashion. If permissions could really be an issue, this may take first choice. I've got an idea in the pipe for a database-based file system, independant of the database backend and flexible in the storage size chosen for the data itself. While it would be generally slower than the file system itself, it can be far more flexible and easier to work with I believe. Implemented right, it could support infinite file size, unlimited nesting of "folders" and some other bits too.
