Friday, July 23, 2010

REST to The Rescue?

Luke Palmer has written a very interesting article on programming and the eternal tension between reusing code and writing it anew, in the context of our technologicaly accelerating society. He argues for the need of a new approach – most likely supported by new technology – to facilitate the repurposing of code not originally intended for reuse.

In the spirit of using what is available now, I think REST provides the best current option for taking advantage of other people's work. No need for developers to release source code if they don't want to, as would be needed for source-translation approaches; no dev environment or build-time integration issues, as could be the case for virtual machines; and no language constraints, as in OSGi and other component frameworks.

Granted, uptime is a problem. But what if REST service providers could be deployed locally, turning individual computers into small, private "machine Internets"? For many years now infrastructure software such as web and application servers have been doing something similar, eschewing native GUI's in favour of browser-accessible web-like consoles that run on the same infrastructure they help manage.

The nice part is everyone could join in quickly: as interprocess protocols go, REST is quite simple, and every language from C to Scheme already has an embeddable web server library these days. Also, as mainstream development has been steadily moving towards a browser-centered approach, it seems only natural that local applications also start using web-like interfaces, for communicating among each other as well as with users.