Most cross platform data storage medium?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Most cross platform data storage medium?
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)
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)
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
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...
* '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...
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Agreed, but what if they don't have MySQL but PG instead? You could use a DB abstraction library like Ado, I realize...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.
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)...
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?
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?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
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
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
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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.
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.