Author Topic: Alternative to mysql  (Read 4385 times)

ukgimp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Alternative to mysql
« on: August 30, 2011, 05:12:13 PM »
I am developing a system, well spec only at this point and I am trying to come up with an alternative to using mysql.

Here is what I am thinking:.

I want to be able to have up to 1000 keywords, each of which create a page, and that page gets some other data from the web.

Is it crazy to think that I could run a site that reads in a txt file and basically cuts out the mysql.

I want to be able to upload and it works, not have slaves mess around with mysql users etc.

BoL, I remember you did something where you held an array in memory? Was that you. If so, would it banjax my system if I had 200 sites say?

Anyone got any thoughts please.

cheers

Rich

rcjordan

  • I'm consulting the authorities on the subject
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7348
  • Debbie says...
    • View Profile
Re: Alternative to mysql
« Reply #1 on: August 30, 2011, 05:41:11 PM »
>I want to be able to have up to 1000 keywords, each of which create a page,

I did this in a crude form some years ago with perl.   Each line in the pipe-delimited text file contained multiple keywords (the number is user defined). The line also contains the name of the file, the template to use, and the path where that output is to be written.  As I recall, it wrote 30k static pages in a minute or two.  

>and that page gets some other data from the web.

I've used the above script to make large pseudo-dynamic pages by having it reference php templates or otherwise use includes. These includes were also written to the server by the above script, though in one case I used a custom cms to manage those.

I assume you are planning something more sophisticated but the only real problem I had was keeping track of how all the bits and pieces were going to be assembled.

BTW, this was initiailly used for a white site and it got kudos for years.

Drastic

  • Need a bigger hammer...
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2357
  • Resident Redneck
    • View Profile
Re: Alternative to mysql
« Reply #2 on: August 30, 2011, 06:27:08 PM »
>Is it crazy to think that I could run a site that reads in a txt file and basically cuts out the mysql.

Makes sense to me, flat files are going to more reliable and probably faster for what you're doing.

4Eyes

  • Hero Member
  • *****
  • Posts: 817
    • View Profile
    • Email
Re: Alternative to mysql
« Reply #3 on: August 30, 2011, 06:31:42 PM »
It is exactly what I have been doing for the last couple of years - skype me for more info

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4046
    • View Profile
Re: Alternative to mysql
« Reply #4 on: August 30, 2011, 07:06:11 PM »
Text is really good for this kind of stuff, I've been using text files for years even to generate sites that are 30k+ pages.

PaulH

  • Guest
Re: Alternative to mysql
« Reply #5 on: August 31, 2011, 07:28:10 AM »
Yeah not that unusual.
fully working CMS out there that use flat files rather than a DB - great for shared hosting where the first thing to go down is the DB
http://www.tutorialfeed.org/2009/08/list-of-xml-based-cms-for-web.html

Rooftop

  • Inner Core
  • Hero Member
  • *
  • Posts: 1915
    • View Profile
Re: Alternative to mysql
« Reply #6 on: August 31, 2011, 08:20:11 AM »
Agree with all the above: sometimes flatfiles is just the best option.

If you do need something halfway between the two take a look at sqlite as well.  Gives you a bit more clout and flexbility, but still doesn't need to have anything running other than PHP.

Damian

  • Inner Core
  • Jr. Member
  • *
  • Posts: 89
    • MSN Messenger - ddoyle@gmail.com
    • AOL Instant Messenger - seodamian
    • View Profile
    • Ranks NL
    • Email
Re: Alternative to mysql
« Reply #7 on: August 31, 2011, 01:41:29 PM »
Not really an alternative to Mysql but perhaps the best of both worlds:
You can have one mother server hosting a central CMS, and have it FTP generated flat files to the machines hosting the 200 sites.  That way you can still manage your lists in a central place with the conveniences of MySQL, and work with flat files on the children sites.

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4046
    • View Profile
Re: Alternative to mysql
« Reply #8 on: August 31, 2011, 04:29:14 PM »
>fully working CMS out there that use flat files rather than a DB

It would be nice if there was a plugin for wordpress that made it work with flat files, too many sh###y hosts cause issues with mysql.

Rooftop

  • Inner Core
  • Hero Member
  • *
  • Posts: 1915
    • View Profile
Re: Alternative to mysql
« Reply #9 on: August 31, 2011, 04:50:17 PM »
Biggest problem I have seen with wordpress & mysql is poor communication from wordpress: ie major shift in requirements and only tell you halfway through the upgrade process. Fail.

ukgimp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: Alternative to mysql
« Reply #10 on: August 31, 2011, 06:19:43 PM »
I want to avoid wp as when it needs updating I don't want to have to update 100's of installs.

O want a bespoke system that has very few flaws.

bill

  • Devil's Avocado
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1281
  • Avast!
    • View Profile
    • Email
Re: Alternative to mysql
« Reply #11 on: September 05, 2011, 08:51:24 AM »
Probably not exactly what you're after, as it's a wiki, but DokuWiki works off PHP and plain text files so you don't need a database. There are some examples of it being used as a CMS.

Will.Spencer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Alternative to mysql
« Reply #12 on: September 06, 2011, 04:27:48 AM »
I want to avoid wp as when it needs updating I don't want to have to update 100's of installs.

WPMu handles multiple domains now.  You technically only need one Wordpress installation.

We are running 1,400+ Wordpress installs and I update them all with this one shell script:
Code: [Select]
#!/bin/bash

cd /usr/local/www/data

rm -rf /usr/local/www/data/wordpress
rm /usr/local/www/data/latest.zip*
wget http://wordpress.org/latest.zip
unzip latest.zip

if [ -d wordpress/wp-content ]
then
rm -rf wordpress/wp-content
fi

if [ -f wordpress/wp-config.php ]
then
rm -f wordpress/wp-config.php
fi

# use find command to get all first-level subdirectories containing Wordpress

BLOGS=$(ls  */wp-config.php | grep -v $(ls -d */wordpress-mu | cut -f1 -d'/') | cut -f1 -d'/')
 
for b in $BLOGS
do
cp -R wordpress/* $b/
done

ukgimp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: Alternative to mysql
« Reply #13 on: September 06, 2011, 09:46:46 AM »
Hello Will

Thanks for the script example.

All looks pretty neat. I will have to look into that. There are others here who will have lots of installs that could use it now.

Thanks for posting and welcome along.

thesaintv12

  • Inner Core
  • Sr. Member
  • *
  • Posts: 468
    • View Profile
    • Email
Re: Alternative to mysql
« Reply #14 on: September 06, 2011, 10:05:05 AM »
@Will.Spencer - Thanks for posting that script, it should come in very handy.