Jun 19, 2008

Rails Performance

We've spent most of the last 2 weeks trying to fix a difficult-to-find bug in the edu2.0 site. Every now and again, after a few hours of running, occasional page requests freeze. It's frustrating, because the rest of the time the site works fine.

So far, we've tried a bunch of things, each of which has improved the site performance but none have fixed the bug. Improvements include:

  • lowering the debug level of our production servers to reduce the amount of logfile output
  • changing from the Apache2 prefork model to the threading model
  • adding 2GB memory to the mongrel servers
  • increasing the possible number of open connections to the database
  • upgrading to the latest version of all gems
  • upgrading to Rails 1.6
  • doing more fragment caching using memcached

We also plan on moving to an evented mongrel, adding more mongrel servers, and upgrading to Rails 2.1 soon, but none of those things will fix the bug.

Today, we noticed that a couple of the mongrels had frozen with timeout error messages, and our production log indicated a couple of timeouts blocked on a session write to memcached. So my best guess right now is that the memcached clients are somehow freezing.

According to the blogs here and here, others have noticed the same thing. So we're going to experiment with adding the timeout code to see if this fixes the issue.

For the record, this is an area that Rails could do with some improvements; it seems like some of the standard libraries are still a little immature. As long as we can fix this bug soon, I will remain happy with our choice of Ruby on Rails.

Rails

Jun 06, 2008

edu2.0: 10,000 members

I was happy to see edu2.0 recently pass the 10,000 member mark! Our company news announcement with more details is here.

During a semester we are adding about 100 members a day, and outside of a semester it's about 50 members a day. As the site starts to get more recognition I expect those numbers to rise.

We still have a healthy to-do list, including real-time video, co-teaching and indexing more educational material, but the site already has so many features that we have the luxury of slowing down the rate of release of new stuff.

The next phase of edu2.0 is to focus on fundamentally improving the way that subjects like Math and taught and learned. This will be the topic of my next post.

Party

May 20, 2008

Auto-translating forums

My Edu2.0 education site currently support 10 languages. To facilitate translating the site we wrote a web-based system that allows translators to convert key words and phrases from English to another language. This has worked very well, and now the site is kept up-to-date by translators all over the world.

However, one of the issues that still remains is how to support our forums with an international audience. For example, since 65% of our members are English, most of the forum postings are also in English. When a member posts something in Spanish, I would have to use Google translation to convert it into English, then write a response in English, then finally tranlate my reply back to Spanish before posting to the forum. Nasty.

So yesterday we added full automatic translation for all our forums.

When someone posts to a forum, we store the posting and its original language setting. If someone who speaks a different language reads the post, we automatically call Google translate and display the translated version with the original version. We also cache the translated version so the next time the same thing happens the translation is instantaneous.

Next week we will add auto-translation to our messaging and chat system as well.

It's really fun to see in action. To see what it's like, visit this public thread and then select the Spanish language using the flag icon at the top of the page:

http://www.edu20.org/community_forum/thread?thread=6832

Here's a snapshot of the thread showing the translated and original versions of each post:

Flags2_3   

May 18, 2008

Upgrading Edu2.0 Infrastructure

Traffic to our Edu2.0 web site has been steadily increasing so we decided to upgrade our infrastructure.

Specifically, we:

  • added a dedicated database server
  • upgraded from Rails 1.1.6 to Rails 1.2.6
  • use memcached for session storage
  • added "expires" headers for browser caching

These improvements resulted in a snappier web site and increased capacity. With any luck these changes (with perhaps a few SQL optimizations) will support another 10,000-20,000 members. We also plan on upgrading to Rails 2.1 shortly for the timezone support.

Rails

Mar 05, 2008

Good EDU 2.0 Review

Traveller 301 recently reviewed some of the most popular web-hosted learning management systems and then post the results to Classroom 2.0. One of the sites he reviewed was EDU 2.0 and I'm happy to say that we passed with flying colors:

Initial Experience: Wow! Yeah, that good.

That made my day.

Logo

Mar 01, 2008

Code stats: EDU 2.0, Moodle, Sakai

After I recently posted some statistics on the EDU 2.0 code base, I decided to gather similar statistics on Moodle and Sakai, two open source education platforms similar in functionality to EDU 2.0.

I used the following sources to gather some basic statistics:

I have made no attempt to verify these statistics but by cross-referencing articles I believe they're in the right ball-park. Here are the results of my quick-and-dirty research:

  • Moodle: 1,500,000 lines of PHP, 300 man years
  • Sakai: 2,000,000 lines Java, 250 man years
  • EDU 2.0: 16,000 lines of Ruby, 2 man years

All three systems support the following functionality:

  • forums
  • classes
  • gradebook
  • chat
  • wiki
  • personal blog
  • groups
  • lessons
  • HTML editor for content
  • student roster
  • attendance
  • online submissions
  • quizzes
  • assignments
  • surveys
  • messaging w/ email integration
  • RSS feeds
  • calendar and custom events
  • student transcripts
  • task list
  • alerts
  • daily events

EDU 2.0 also provides the following functions:

  • e-portfolios
  • private class blogs
  • points system for contributions, games
  • social networking features
  • custom RSS feeds for each class
  • shared & moderated resource library
  • rubrics
  • web-based community translation system
  • couple of community games
  • structured class debates
  • self-study system
  • custom curricula

In addition, I have no doubt that Moodle and Sakia provide some features that EDU 2.0 currently doesn't have.

I don't draw many conclusions from the statistics, but they did make me feel pretty good about our architecture and efficiency!

Logo

Feb 26, 2008

EDU 2.0: Code Base Statistics

For fun, I ran "rake stats" on the edu 2.0 "Ruby on Rails" codebase to get some statistics.

Here's the outcome:

  • 16,500 lines of code
  • 309 classes (139 controllers, 142 models, 28 libraries)
  • 1881 methods
  • 6 methods per class on average
  • 6 lines of code per method on average

One trend I noticed is towards making controllers responsible for a particular facet of a model. For example, we used to have a single controller that supported all the operations on a teacher's class, but now we have about 10 controllers, one which supports student attendance, another which supports the gradebook, and another which supports the teacher's view of the class forum, etc.

The codebase could be improved some more, but I think it's already pretty lean and mean. In another post, I'll contrast the edu 2.0 code base statistics against those from Moodle and Sakai.

Edu20logo

Dec 02, 2007

Web site Evolution

I've always been fascinated to see how my products evolve. They change based on a combination of user feedback and my team's sense of direction; for example, here are some screen shots that show the evolution of my edu 2.0 home page:

This is the first version:

Edu20a

This is the second version:

Edu20b

This is the current version; I can't wait to see what it looks like in 3 months time!

Edu20c

Nov 26, 2007

Edu 2.0: Debates

We just added a new feature to edu2.0 that allows students to practice critical thinking: debates.

Here's how it works:

First a teacher creates a debate with a proposition like "Star Trek was the best ever science fiction TV series". Students can then vote either for or against the proposition as well as add supporting statements. As students add reasons either for or against the proposition, other students can challenge the reasons. It's a bit like a forum, but more structured and with a voting mechanism.

We think that features like this one demonstrate the true power of networked education systems, and we plan on releasing several more such features over the coming months.

Here's a screen shot of one debate in action:

Debate

Nov 08, 2007

edu 2.0 superowl

One of the benefits of recovering from jet lag is that you're inspired to do lots of coding during the night hours. After a little fiddling about with Unicode issues, we managed to squeeze out two more internationalized versions of edu 2.0. Chinese will follow shortly.

Japanese:

Japanese

Russian:

Russian

Destiny

  • Destiny is my science fiction movie about the future of humanity. It's an epic, similar in breadth and scope to 2001: A Space Odyssey.

    To see the 18 minute video, click on the graphic below.

    Destiny17small

People