TMFKSOFT   -  May 08, 2013

It's day 1 (Kinda, Its 11:34pm, Does that still count)
Im about to start work on my first script of many.
This weeks script is going to be a very simple URL Shortener.
It will be using BootStrap and a flat file database to boot.
I'll release the Script on Saturday for download.

SunnyD has mentioned using GitHub, I wont be using GitHub straight away, When all scripts are done they will be in one repo for download.

Hawkee  -  May 08, 2013

Why a flat database? Wouldn't it scale better to use something like sqlite at least?

TMFKSOFT  -  May 08, 2013

I've never been able to implement SQLite with PHP,
Plus there's not many examples of ways to store data in a flat file solution, I'd probably make it so people can choose between SQL and Flat File.
Is the live development area. So you are free to mooch about looking what files there are.

Hawkee  -  May 08, 2013

What indexing method do you plan to use in a flat file? Will you keep it persistent in memory for faster access?

TMFKSOFT  -  May 09, 2013

A simple PHP array with Serialize. Nothing easier to be honest.
No need to keep it in memory.

I could even gzcompress to save space.

Hawkee  -  May 10, 2013

That will scale terribly. Every lookup will require loading the entire file into memory in order to search it. Once the file gets too large PHP will fail to load it resulting in memory errors. Your method is guaranteed to fail in the long run.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.