From Python to Ruby on Rails to Erlang
SlideAware - Wolfgang Mathurin - April 18, 2007We started working on SlideAware Workgroups about a year ago. After collecting feedback from Alpha users in November 06, we decided to build the simpler SlideAware Personal which allows users to publish presentation to a URL and conduct live slideshows. SlideAware Personal has been live since March 07. SlideAware Workgroups will be released in the next few months. Both applications share the same architecture.
There are really two front-ends:
- The PowerPoint toolbar which provides buttons to allow users to very easily send slides to SlideAware or get feedback from co-workers. It is written in Visual Basic Application and leverages external DLLs for image and flash generation, file compression, etc.
- The web application leverages Dojo and Scriptaculous and interacts with the server using XmlHttpRequest. The user interface is entirely done in JavaScript in the browser. The JavaScript code manipulates the business objects (slides, presentations, tags, users, etc.) and generates the user interface using Dojo widgets. The server is invoked to persist and query objects. It serves data as JSON instead of sending back HTML snippets.
The back-end has gone through several iterations.
We wrote the first version (0.1) of SlideAware Workgroups using Python and TurboGears. TurboGears combines a template engine (Kid), an object-relational mapping manager (SQLObject). Data (slides, presentations, tags, users) was stored in a SQLite database, while text indexes for the slidesâ content were stored using Lucene. We leveraged xml-rpc to communicate between the python server and the java server (Lucene). We had a Jython wrapper on the java side.
We decided to switch to Ruby on Rails for the second version (0.2) of SlideAware Workgroups. Rails has a much larger following and finding solutions to issues is therefore a lot easier. Because the presentation layer is entirely done in the browser in JavaScript, our back-end code is fairly lean and was ported to Ruby on Rails in a matter of weeks. We kept SQLite, xml-rpc and Lucene. We added Lighttpd in the mix as our web server.
At that point, we started wondering about how our heterogeneous back-end stack could be made available, reliable and scalable. We had been hearing for a while about Erlang, the concurrent programming language initially developed at Ericson, and Mnesia the real-time distributed database written in Erlang that is part of Erlangâs Open Telecom Platform, and Yaws the web server written in Erlang.
We liked the idea of replacing our multiple language stack (Lighttpd + RoR + SQLlite + XMLRpc + Jython + Lucene) with an Erlang-only solution (Yaws + Mnesia + Erlang).
We were particularly intrigued by the promises of:
- High concurrency: Yaws leverages Erlangâs light-weight threading system and supposedly performs very well under high concurrency. Mnesiaâs tables can be replicated across nodes to allow more reads to happen concurrently.
- High performance: Mnesia resides in
memory and is built to allow fast real-time lookups.
- High reliability: Erlang flagship project, the AXD301 which has over 2 million lines of Erlang has achieved a NINE nines reliability (yes, you read that right, 99.9999999%).
So we made the switch for version 0.5 of SlideAware Workgroups.
In my next post, Iâll tell you whether Erlang lived up to our expectationsâ¦
Categories: Companies SlideAware
Erlang on Twitter
» TrainByTweet_VO (TrainByTweet_VO): VOIP: Erlangs: In North America, Centium Call Seconds (CCS) are used as a measure: 36 ccs = 1 erlang
» JoeW_27 (Joe Warrick): @richh_92 nah just NAT and erlang but u know them
» farhanMHFD (Farhan): Kemana aja bisa RT”@aliefaldio: Biasa malming kemana sih hahaha RT”@farhanMHFD: Emang lg dimana lu? RT”@aliefaldio: itu kreasi is erlang
» yaaliia (Nurlia Febrianti): Salutt dah gw abng gw sekarang udh bisa ngeplayboy wkwk @doni_erlang
» voluntas (V): @shunuhs えw Erlang/OTP はネットワーク系の DSL なので、普通はいらないですw Go ええで!
» ErlAng_fei (Erlina Anggraeni Fei): RT @TheDramaKorea: “Tidak peduli kau menyukai siapa atau berkencan dgn siapa. Aku hny ingin kau disini, tetap disisiku” - To The Beautiful …
» voluntas (V): Go のすばらしさと Erlang/OTP のいけてなさを熱く語ってきた。
» Rayhankrm (Karim): Jerawat rebus buat lu”@Jeremy_DJ08: upil bakar buat lu RT @Rayhankrm: Kayu bakar buat lu”@Jeremy_DJ08: kompor meleduk lu berdua RT @Erlang
» FrancescoC (Francesco Cesarini): RT @chaddepue: super excited to be speaking at @strangeloop_stl on #erlang, paxos, vclocks and our experimental redis multi-master alternat…
» jj1bdx (Kenji Rikitake): RT @olgeni: #FreeBSD ports for oserl and common_lib are out #Erlang
Statistics
Number of aggregated posts: 10648
Most recent article: May 14, 2013
Latest comments
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…