We started developing the very first version of Suruk just after a small discussion in a coffee shop way back in May ’09 (That does seem like ages ago). Anenth and myself were just starting to learn J2ME and PHP, we completed the product within a month. We do often laugh over the fact that a Java class in client app ran over 2000+ LOC and server side code well over 1000+. But, what was really motivating was the fact that it worked, and people loved it. Suddenly we were like this bunch of guys in college who had real customer issues to tackle. In the midst of our assignments, we would set aside a couple of nights for dealing with “real” customer feedback. We’ve come a long way since May ’09, we iterated tons of times over Suruk codebase and it’s quite stable on all platforms today. With every version, iteration and product, the learning we all acquired was really valuable. Since all our apps were related to travel and commute, having a consolidated data model was perhaps a natural progression. We started writing reusable components and modules which were used across products, and this made life much easier. The iteration time reduced immensely and we were launching newer stuff in rapid speed. Hence Wander (we code-named it so, as it was dealing with objects in travel and commute) was born.. and Cosec joins us in IIM-A! We started evaluating various platforms like Sinatra, Zend, Django, Flask, wsloader and so on. Being Python lovers we decided to stick to Python platforms and ruled out likes of RoR and PHP. Keeping in mind our requirement of APIifying modules, we finally nailed it down to wsloader. A big shout goes out to Tahir Hashmi, developer of wsloader, who was more than happy to guide us through some initial queries we had and we were good to go. Cosec also did some performance testing comparing wsloader with other frameworks and we were really happy with the findings. In simple words, wsloader allows exposing native Python interfaces as WebServices (REST+JSON) without having to write any HTTP/Web service specific code. In some ways it’s a parallel to web.py, but makes it insanely easy to make any python module a webservice. It’s a WSGI module which runs on top of Apache with error handling integrated with Apache error logs. Consider an example python module as given below:class greeter:def say_hello():return “Hello Ideophone!” The say_hello() method can be accessed via http://{hostname}/services/greeter/say_hello Super simple, no? To get started, simply visit http://code.google.com/p/wsloader/. Do keep in mind that wsloader is a minimalistic framework and does not provide in-depth support for session and user management as the likes of Django would give. More on Django (our latest crush) will come soon to a blogpost near you. Till then, APIfy your code
Details