For those that have been watching my G+ feed you will have noticed some videos being posted. Those vidoes are of the OAE 1.2 UI running on a server developed in Python using DJango. I am getting a increasing stream of questions about what it is, hence this blog post.
What is PyOAE?
PyOAE is a re-implementation of the OAE server using DJango and a fully relational database schema. I use PostgeSQL and/or SqlLite3 but it would probably wok on any RDBMS supported by DJango. The implementation uses the OAE 1.2.0 UI code (the yet to be released 1.2.0 branch) as its specification and runs that UI unmodified.
Is it a port of Nakamura to Python?
It is not a port of the Java code base called Nakamura that is the official server of OAE and shares no common code or concepts. It does not contain the SparseMap content system or a Python port of SparseMap.
When will it be released ?
It is not, yet, functionally complete and so is not ready for release. When it is, I will release it.
Will it scale ?
The short answer is I don’t have enough evidence to know at this stage. I have some circumstantial evidence and some hard evidence that suggests that there is no reason why a fully RDBMS model using DJango might not scale.
Circumstantial: DJango follows the same architectural model used by many LAMP based applications. Those have been shown to be amenable to scaling. Wordpress, Wikipedia etc. In the educational space MoodleRooms scaled Moodle to 1M concurrent users with the help of MySQL and others.
Circumstantial: Sakai CLE uses relational storage and scales to the levels required to support the institutions that want to use it.
Circumstantial: DJango has been used for some large, high traffic websites.
Hard: I have loaded the database with 1M users and the response time shows no increase wrt to the number of users.
Hard: I have loaded the database with 50K users and 300K messages with no sign of increasing response time.
Hard: I have loaded the content store with 100K users and 200K content items and seen no increase in response time.
However, I have not load tested with 1000’s of concurrent users.
Will it support multi tenancy ?
Short answer is yes, in the same way that Wordpress supports multi tenancy, but with the potentially to support it in other ways.
Is it complex to deploy ?
No, its simple and uses any of the deployment mechanisms recommended by DJango.
Does it use Solr?
At the moment it does not, although I havent implemented free text searching on the bodies of uploaded content. All queries are relational SQL generated by DJango’s ORM framework.
What areas does it cover?
Users, Groups, Content, Messaging, Activities, Connections are currently implemented and tested. Content Authoring is partially supported and I have yet to look at supporting World. Its about 7K lines of python including comments covering about 160 REST endpoints with all UI content being served directly from disk. There are about 40 tables in the database.
What areas have you made different ?
Other than the obvious use of an RDBMS for storage there are 2 major differences that jumps out. The content system is single instance. ie if you upload the same content item 100 times, its only stored once and referenced 100 times. The second is that the usernames are not visible in any http response from the server making it impossible to harvest usernames from an OAE instance. This version uses FERPA safe opaque IDs. Due to some hard coded parts of the UI I have not been able to do the same for Group names which can be harvested.
Could a NoSQL store be used ?
If DJango has an ORM adapter for the NoSQL store, then yes although I havent tried, and I am not convinced its necessary for the volume of records I am seeing.
Could the same be done in Java?
Probably, but the pace of development would be considerably less (DJango development follows a edit-save-refresh pattern and requires far fewer lines of code than Java). Also, a mature framework that had solved all the problems DJango has addressed would be needed to avoid the curse of all Java developers, the temptation to write their own framework.
Who is developing it?
I have been developing it in my spare time over the past 6 weeks. It represents abut 10 days work so far.
Why did you start doing it?
In January 2012 I heard that several people whose opinion I respected had said Nakamura should be scrapped and re-written in favour of a fully relational model I wanted to find out if they were correct. So far I have found nothing that says they are wrong. My only regret is that I didn’t hear them earlier and I wish I had tried this in October 2010.
Why DJango ?
I didn’t want to write yet another framework, and I don’t have enough free time to do this in Java. DJango has proved to have everything I need, and Python has proved to be quick to develop and plenty fast enough to run OAE.
Didn’t you try GAE ?
I did try writing a Google App Engine backend for OAE, however I sound found two problems. The UI requirements for counting and querying relating to Groups were incompatible with BigStore. I also calculated a GAE hosted instance would rapidly breach the free GAE hosting limits due to the volume of UI requests. Those two factors combined to cause me to abandon a GAE based backend.