an ordinary blog — andr3.net

rss feed

my lifestream rss feed

are you tired of this? then return to latest posts

Trying to add old flavors to Mint

Last night I was reading a post by Bryan Veloso in which he expressed his desire to import the data in his ShortStat to Mint and something happened. Well, almost. Read on.

MintThe php coder inside of me felt impatient, mainly because I hadn't seen any mysql tables from Mint, but i had from ShortStat. I knew Shaun had said Mint was built completely from scratch, but i wouldn't expect him to trash his earlier work, so i thought Mint ought to have relatively similar tables.
And it – kind of – has.


Since i don't have Mint running on my server, i IMed Bryan and he was very helpful along the way. He showed me both the structure and some example rows in Mint's database and from that i wrote a short script to output ShortStat entries as mysql queries (insert into...) to be inserted into Mint's database.

Problems

We quickly ran into some problems, mainly because of the sheer amount of entries Bryan had in his database (121 000 or so) and the script ran out of memory. Silly old me made a couple of corrections and it then worked, but outputting 25MBs of text to your browser takes a while, so i had to go to Plan B. Output a file to the server's file system.

After playing with writing permissions, he ended up with a 25MB .sql file sitting in his server.

After that, a quick backup – better safe than sorry, my mommy always say – and a jump to MySQL command prompt and the new old ShortStat data was now in Mint's table.

Results?

It kind of worked.

Some data got through, like the browser, search and popular pages. But not the overall numbers. Since i don't have a copy of Mint to mess around with, i can't look at the code and try to figure out the inner bowls of Mint. But i'm sure this wasn't the last time you heard from me on this subject. I still have a couple of ideas that could work. But i could be fooling myself... i don' know.

Now what?

Bryan's going to send the script to Shaun and let's see what he thinks.

In the meantime, you can read Bryan's post about our little experiment.

Also, do you have some insight on Mint's process of gathering data, like if are mysql entries enough, or do we need to give it a little push from other direction? Then leave some suggestions in the comments. I'd be happy to hear from you.

Comments

↑ top