My first experience with PagodaBox

📅 — 🧮 597 words — 🏷️ tech

What is PagodaBox

Pagoda Box
Pagoda Box

PagodaBox.com is a Platform as a Service (PaaS) for PHP.
They have plans for Ruby and Python, but they're not here yet as of this writing.

At Pagoda you can launch components, such as; web (Apache + PHP), database (I know MySQL works for a fact), cache (Memcache or Redis), worker and cron job (beta).

My app uses the first two, but I'm actually trying to figure out Memcache as I type this.

The idea is that you can just launch new components to scale your app. This is so easy that a non-techy front office person can monitor the app and scale it when needed, it is literally just one click of a button.

Up, up and away (with Wordpress)

I think I ended up at the site because I was looking at Heroku stuff. Anyway, a colleague of mine saw it and he knew it too. Said it was PaaS for PHP, so in the end I decided to test it out.

First I ran a simple pre-configured WordPress app, this worked. But this is not what this service is for.

My experience

Sad Database component
Sad Database component

So my next attempt was making it all by myself. First a PHP web component, yep, worked and phpinfo() gave me a bunch of nice stats.
Then the database component, up and running within a few seconds.
But it showed me a sad smiley face. Apparently, without any tables and whatever, the MySQL component takes up 90% of the allocated 10MB.

Git
Then I started working on my app, staging files to my local git repo, committing them, pushing them.. and waiting. A long time.

Redeploying from git commits.

Happy Web component
Happy Web component

When you push your local changes to the PagodaBox git server (you can also choose the not-recommended SFTP option when signing up) they totally rebuild, redeploy and relocate your components. This last part is nice because when you add changes, your 'old' site still works until the new one is up and running after which some magic happens and your URL gets redirected to the new machine.

Only after I finished my app that evening, I noticed you can turn this feature off in your account settings. But then you have to deploy your site yourself based on a commit. Maybe it would be nice if you could send some kind of flag with your git push command; --no-deploy.

Pagoda Tunneling
Also there's no PHPMyAdmin, the beast we all came to love. To work on your database you have to use their Pagoda Tunnel system. This requires you to install Ruby and download their Tunnel gem. After that you can tunnel into your app by opening the command line tool: pagoda tunnel -a <app_name> -c <component_name>

This will turn your terminal window into a little server/tunnel, and you can use a SQL tool (I used HeidiSQL) to connect to localhost:45000 where you will find your Pagoda database.

Learning
So as you understand it's quite a big endeavour, and I personally don't require the need for scaling, so I can't really test any of that. But I can say it was quite a nice learning experience.

Also, I did manage to get Memcache running (first time ever) but I'm not noticing any difference, guess my queries and database aren't that big for it to be noticeable.
.. or the fact that all these servers are probably in the US and it takes 600ms anyway.


comments powered by Disqus
The problem(s) with Open Data
The problem(s) with Open Data
Quickly create an empty stdClass object in PHP
Quickly create an empty...
Find any post in the archive.