Most cross platform data storage medium?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Most cross platform data storage medium?

Post 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)
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post 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...
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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)...
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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 :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post 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?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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 :P

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 :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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. :)
Post Reply