Building your own Heroku

When we started Risktronics, we really didn’t want to care about where should we host the app. Heroku seemed a pretty obvious choice, and in the end, the pleasure was all ours to use it and it was definitely a win… Well, at least for some time.

Our latest bill for Heroku was something we didn’t plan, at least not that soon:
our bill

The decision that followed was to move away from Heroku to an own server. All great, except the fact that this means we will have to change the way we were deploying the code and monitoring its health — things I didn’t want.

Below you will find the hooks I used to fire on a deployment using git. Beside detecting the Gemfile changes and running bundler, I really wanted a solution to restart/start the application on new commits.

We were already using foreman, and it’s great (solving problems like environment variables, sub-process spawning, master process), but in order to use foreman upstart integration, you would need root permissions or some other sudo magic. So for us, foreman has to live on a user level, and nginx should take care of stuff to proxy with it.
In the end, if you pre-set a port on which the app has to live, this should solve any other problems.

To recap, I eneded up with something like this, on every commit I make (including Gemfile changes):

Counting objects: 2347, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1775/1775), done.
Writing objects: 100% (2347/2347), 330.17 KiB, done.
Total 2347 (delta 1533), reused 879 (delta 526)
remote: Master branch changes. Starting the deployment...
remote: Gemfile updated...
remote: Running bundler...
remote: Using rake (0.9.2.2)
...
remote: Using bundler (1.0.21)
remote: Your bundle is complete! It was installed into /home/app/.bundle
remote: Sending TERM to 19934...
remote: Starting the app...
remote: HEAD is now at aa2a2 My last commit
To git@ourserver.risktronics.net:apps/risktronics.net
 * [new branch]      HEAD -> master

Pretty cool, eh?!

A not so bad CUBRID feedback

I took a chance to play around with CUBRID today (well it’s kinda new Open Source RDBMS, partially developed by Romanian engineers, claiming to be very fast and mostly compatible with MySQL solution). Reason for that was:

  1. I didn’t do something like this for years, lately, most of my research interests got away from servers administration and all the stuff that’s happening around it
  2. They started a contest that touched my feelings because of PHP being used and their nice WordPress support page (WordPress has nothing to do with the contest, but it uses PHP and MySQL and that connected the dots)
If you are still reading this article in the hope to find the contest answers, go away, it’s not about it. It’s about how ready is CUBRID for development and my experience with it on Ubuntu (Natty).
First of all kudos to the team for great set of pre-compiled builds and tools, but the lack of debs is a problem right now. Searching for CUBRID PPA took me to their Launchpad page, that is way outdated and that kinda pisses off developers that use Debian/Ubuntu, and a lot of them do! So even though the software looks easy to install, having a debs repo is a no excuse thing that should be done.
Also on this topic, none of the PDO or PHP driver packages worked for me (I’m using PHP 5.3.5-1ubuntu7.2 from Natty repos) so I had to install PEAR and compile one. From that point, the Nginx+PHP5-FPM+CUBRID_8.4.0 development environment was ready.
The contest problem itself is not a hard one, but reading it’s statement should lead you to discover interesting features of the CUBRID, along which I was pretty impressed with:
  • SQL tool Client-Server, Standalone execution mode
  • Cleaner SQL syntax, though pretty-much compatible with MySQL (no storage engines, encoding… just like the new <html> tag)
  • Service and user management tools (users are stored in plain text files, everything has a tool for it, servers are started per database, well defined ACL, all very clean and well designed)
  • Databases can have the home you want for them (you can create databases of what size you want and wherever you want inside your filesystem) and the renaming is a snap, also you can define an SQL file for those to use and so on… very smart!
  • Not the last, it was a pleasure to work with their latest “implicit type conversion” feature (More details here…).
Per all, it was worth spending a couple of hours playing with the technology, more than that, I also submitted a solution for their contest, so It might be fun too. Give it a try if you’re searching for a self hosted RDBMS solution for your start-up or just to hack.

A simple AppEngine framework for writing Facebook apps

During last year, I wrote a couple of Facebook apps.

I used both, the beloved (by Facebook) PHP library for that and the Python library, and (not) surprisingly I found that writing Facebook apps on Python (and mostly because you have the handy AppEngine for deploying those) is way easier and needs no special treatment from your customers (you handle them the code and access to the application panel).

So along with my projects I used mostly the same approach, ending up with the code I published today on github.

This is a simple MVC like framework, which I recommend checking out to anyone who wants to try writing the Facebook apps on Google’s AppEngine.

BuddyPress Courseware 0.1.5

Lately the Courseware was pretty stable, so I’m releasing the 0.1.5 version that comes mostly with new features.
If you want to read the changelog, it’s here.

With this article I would like to explain what are the next plans for Courseware.

First things first. I will start working on an authentication solution like LDAP/AD for Courseware. As a LMS it will make sense to allow people connect their existing databases to our system. Making it a snap and perfectly integrating it (with automatic Teachers discovery functionality) might open for us a new userbase.

Next, I was keeping this in secret, but we will likely ally with guys from LabRemote, and integrate Courseware with their app. This can also bring us to a new level of users, where mobility for teachers matters.

The final news is that Courseware will likely become my thesis work, if I graduate this year… So I will work on the tests/quizes functionality for it. This isn’t an easy task, I would call it a challenge. If we can offer a secure and guaranteed online evaluation solution for our system, this will totally change the way virtual education is percepted today.

Also, I must say, BuddyPress (and) Courseware was a great success at WordCamp Bucharest (slides here, if you missed it)!

If you share the plans I described, leave me a comment or explain your position if you think different, maybe we can make it even better.
Keep in touch.

Announcing an alternative to Moodle

With this post I’m announcing my Google Summer of Code 2010 project as finished.

The BuddyPress Courseware today got it’s home, along with the first stable version: 0.1

I’m very happy to report that this was an awesome experience, and the final results kick ass.
Not to forget my mentors that helped a lot during the last 3 months: Jeremy Boggs and Boone B. Gorges, and a whole community of colleagues!

Thanks and come join the team, since the project development continues!

Dilema persoanelor WordPress în România

WordPress
Mai nou primesc mai multe întrebări legate de WordPress în Română:

  • Cât de mare este comunitatea?
  • Cât de simplu e să obții asistență sau să găsești persoane serioase pentru proiecte serioase?
  • Cât costă serviciile?
  • Unde pot găzdui proiectele pe WordPress în România?

Cel mai simplu răspuns ar fi că: „Nu se știe exact cât de mare este comunitatea, numărul dezvoltatorilor în România și calificarea acestora sau costul serviciilor”. Cert e că WordPress e la fel de popular în România ca în toată lumea (8% din Internet include și .ro-ul), și din acest motiv a fost creat, acum ceva vreme, forumul WordPress în Română.

Astfel, utilizatorii WordPress pot primi atât asistență de la membrii forumului, cât și publica anunțurile despre proiectele personale/comerciale în scopul solidificării comunității și extinderii acesteia. Așadar, acum există un loc unde se pot întâlni persoanele WordPress atât mai tehnice cât și simplii utilizatori.

De asemenea, sincer sper ca anul acesta WordCamp România să aibă o continuare, iar ce-i care ne cunoaștem mai mult offline, să ajungem să ne întâlnim la eveniment față în față.

Meantime…

I didn’t want to write about this until I had something to show, now I got some updates and I think I will be the last person involved in this project who didn’t write anything about it yet. Yes, I was accepted as a Google Summer of Code student this year. And the umbrella project I will be am working for is WordPress (which is the best I could only dream about) and their social network project called BuddyPress.

So what coding exactly I’m doing this summer? Remember Moodle, or Blackboard (yep, that was new to me too) or if you know what is a LMS, well, I am building a LMS above the BuddyPress social network. This means everyone can get a facebook/ning and a moodle in a box once the project is done.

The crew. Besides me there are two more mentors:

and a bunch of people I have to mention for their support and ideas: Jane, Kyle, WP-Edu subscribers.

The project timeline and updates can be followed on my other blog. Also there you will find, the instructions for how to install the new component.