• PyCon 2010: Grig Gheorghiu on Creating RESTful Web Services with restish

Grig Gheorghiu, Director of Operations at Evite, discovered Python in 2003 working as a test engineer. He needed an programming language that would work on all Platforms, and discovered that Python provided simplicity, elegance, ease of maintenance, and cross platform support, and says “I haven’t looked back since”.
Gheorgiu attests to the beauty of Python and his affection for the PyCon conference, and speaks of a compelling atmosphere that presents an appealing case for attending PyCon. Gheorgiu also discussed some the Web Server Gateway Interface (WSGI), and building RESTful Web services to make application development simpler; giving a preview into his upcoming presentation at PyCon.

Please tell us a little bit about your Python experience.

Grig Gheorghiu: I use quite a bit of Python in my day-to-day activities, in fact all my automation tools for application deployments; cloud instance management, testing, etc. are written in Python. We use Python in production at Evite too, for specific portions of our site’s functionality. We started using Tornado shortly after it was open sourced, and we’ve had a very good experience with it.

Please tell us about your involvement with PyCon

Grig Gheorghiu: My first PyCon was in Washington D.C. in 2005. I attended every single one of them since, and I presented both talks and tutorials almost every year. This year I will give a talk on ‘Creating RESTful Web services with restish (http://us.pycon.org/2010/conference/schedule/event/21/). PyCon is by far my favorite conference. The fact that I’ve got to know so many people over the years makes it very special. I find that the best part of PyCon is talking to people outside of the regular conference track.

Q: What are some examples you will be demonstrating in your restish Tech session?

Grig Gheorghiu: I will use restish to build a RESTful Web service that allows you to manage your to-do lists. I will show examples of CRUD operations (create, read, update, delete) on lists and list items. I will also discuss the issue of transactions in a REST architecture. On the client side, the side that consumes the Web service, I will show how to use the curl command line utility, and also how to write simple Python scripts using the httplib2 module. I will also show how to test the Web service using WebTest for unit testing and twill for functional testing.

Q: What is WSGI and how does it fit into restish?

Grig Gheorghiu: WSGI is described in PEP 333 (http://www.python.org/dev/peps/pep-0333/). According to the PEP, It is  “a simple and universal interface between web servers and web applications or frameworks”. Most modern Python Web application frameworks, restish included, are WSGI compliant, which makes it easy to plug them into WSGI-aware Web servers — for example Apache with mod_wsgi. WSGI also makes it easier for your application to use middleware components developed by third parties. In my talk, I won’t insist on the WSGI aspect of restish, except in the testing section, where I will show how easy it is to unit test a WSGI application using Ian Bicking’s WebTest tool.

Q: You mention that many rest implementations are improperly implemented; how does restish address improper implementation problems?

Grig Gheorghiu: REST is an architectural style, a set of design constraints for your Web application. How you put these design constraints into practice is up to you, and no framework does it for you. This is why it’s important in my view to understand what exactly is meant by ‘resource-oriented architecture’ (I didn’t coin this term, Richardson and Ruby did in their book ‘RESTful Web Services’) and how to make sure your Web application takes advantage of REST-specific properties such as the uniform interface, addressability, statelessness, connectedness. If this is double-dutch to you, then please come to my PyCon talk and I hope I’ll clear things up.

A framework such as restish makes it easier to apply these design constraints into practice by offering a simple way for your application to handle HTTP requests and responses, and also ‘resources’, which are the URLs that your application exposes to its clients.

Futher Reading

Reigster for PyCon https://us.pycon.org/2010/register/
Grig Gheorghiu’s PyCon Talk http://us.pycon.org/2010/conference/schedule/event/21/
WSGI http://www.wsgi.org/wsgi/
Restish http://ish.io/projects/show/restish

By Matthew Sacks

Share and Enjoy:
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • E-mail this story to a friend!
  • FriendFeed
  • HackerNews
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • FSDaily
  • Ping.fm

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

  1. Tweets that mention PyCon 2010: Grig Gheorghiu on Creating RESTful Web Services with restish » The Bitsource: System Administration - Software Engineering - Web Application Development -- Topsy.com Says:

    [...] This post was mentioned on Twitter by The Bitsource, The Bitsource, msacks, msacks, Grig Gheorghiu and others. Grig Gheorghiu said: Interview with /me on bitsource: http://bit.ly/cURuz0 [...]

  2. uberVU - social comments Says:

    Social comments and analytics for this post…

    This post was mentioned on Twitter by msacks: ##PyCon 2010: Grig Gheorghiu on Creating #RESTful Web Services with #restish http://bit.ly/azZB2h...

Leave a Reply

You must be logged in to post a comment.