NAME

OpenResty - General-purpose web service platform for web applications

VERSION

This document describes OpenResty 0.5.2 released on November 27, 2008.

DESCRIPTION

This module implements the server-side OpenResty web service protocol. It provides scriptable and extensible web services for both server-side and client-side (pure AJAX) web applications.

Currently this module can serve as a public web interface to a distributed or desktop PostgreSQL database system. In particular, it provides roles, models, views, actions, captchas, the minisql language, and many more to the web users.

"Another framework?" No, no, no, not all!

OpenResty is not a web application framework like Jifty or Catalyst. Rather, it is

  • A REST wrapper for relational databases

  • A web runtime for 100% JavaScript web sites and other RIAs.

  • A "meta web site" supporting other sites via web services.

  • A handy personal or company database which can be accessed from anywhere on the web.

  • A (sort of) competitor for the Facebook Data Store API.

We're already running an instance of the OpenResty server on our Yahoo! China's production machines:

http://api.openresty.org/=/version

And there're several (pure-client-side) web sites alreadying taking advantage of the services:

OpenResty's admin site

http://openresty.org/admin/

agentzh's blog and EEEE Works' blog

http://blog.agentzh.org

http://eeeeworks.org

Yisou BBS

http://www.yisou.com/opi/post.html

See OpenResty::Spec::Overview for more detailed information.

OpenResty::CheatSheet also provides a good enough summary for the REST interface.

You'll find my slides for the D2 conference interesting as well:

http://agentzh.org/misc/openresty-d2.pdf

or the original XUL version:

http://agentzh.org/misc/openresty-d2/openresty-d2.xul (Firefox required)

Another good introduction to OpenResty's REST API is summerized in the slides for my Y!ES talk and my Beijing Perl Workshop 2008 talk:

http://agentzh.org/misc/openresty-yes.pdf

and a more pretty (XUL) version can be got from here:

http://agentzh.org/misc/openresty-yes/openresty-yes.xul (Firefox required)

There're also a few interesting discussions about OpenResty on my blog site:

"OpenResty versus Google App Engine"

http://blog.agentzh.org/#post-75

"Google's crawlers captured OpenResty's API!"

http://blog.agentzh.org/#post-79

"Video for my D2 talk about OpenResty and its nifty apps"

http://blog.agentzh.org/#post-81

"The first yahoo.cn feature that is powered by OpenResty"

http://blog.agentzh.org/#post-86

"Client-side web site DIY" (Chinese)

http://blog.agentzh.org/#post-80

"OpenResty 平台相关资料" (Chinese)

http://www.eeeeworks.org/#post-6

CAVEATS

This library is still in the beta phase and the API is still in flux. We're just following the "release early, releaes often" guideline. So please check back often ;)

INSTALLATION

Please see OpenResty::Spec::Install for details :)

SOURCE TREE STRUCTURE

bin/

contains some command-line utilities, among which the openresty is the most important one.

lib/

contains all the server code, mostly Perl.

haskell/

contains the RestyScript compiler for OpenResty written in Haskell. Support for both OpenResty Views and Actions is provided.

See haskell/README for more details.

font/

contains the font file (*.ttf) for captcha generation.

etc/

contains the config files, openresty.conf and site_openresty.conf. The latter one takes precedence over the former.

grammar/

contains Parse::Yapp grammar files for the old OpenResty View (or minisql) compiler.

t/

contains the test suite.

demo/

contains a bunch of OpenResty demo apps.

inc/

generated by Module::Install for CPAN building system.

SOURCE CONTROL

For the very latest version of this module, check out the source from the SVN repos below:

http://svn.openfoundry.org/openapi/trunk

There is anonymous access to all. If you'd like a commit bit, please let us know. :)

TODO

For the project's TODO list, please check out http://svn.openfoundry.org/openapi/trunk/TODO

BUGS

There must be some serious bugs lurking somewhere given the current status of the implementation and test suite.

Please report bugs or send wish-list to http://rt.cpan.org/NoAuth/Bugs.html?Dist=OpenResty.

AUTHORS

Agent Zhang (agentzh) <agentzh at yahoo dot cn>
chaoslawful (王晓哲) <chaoslawful at gmail dot com>
Lei Yonghua (leiyh)
Laser Henry (laser) <laserhenry at gmail dot com>
Yu Ting (yuting) <yuting at yahoo dot cn>

For a complete list of the contributors, please see http://svn.openfoundry.org/openapi/trunk/AUTHORS.

License and Copyright

Copyright (C) 2007-2008 Yahoo! China EEEE Works, Alibaba Inc

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

SEE ALSO

OpenResty::Spec::Overview, openresty, OpenResty::Spec::REST_cn, OpenResty::CheatSheet, WWW::OpenResty, WWW::OpenResty::Simple.