ehlo.


> http://www.xml.com/lpt/a/2002/02/20/rest.html


   Wow. As a CORBA programmer, I would say the articles are very
   precise in showing CORBA (DCOM,RPC,...) problems in case of
   huge (and even large) number of clients. API is wrong for the
   case, I always feeling this, but was unable to formulate it.

   Well, I guess it's quite a simple task for Ruby to create an
   simple Application Server based on REST ideas. As first approach,
   it would look as following: Ruby application has a set of objects;
   when client calls GET http://host/app/obj, it gets XML containing
   URIs to obj properties and methods. Client can then call on of the
   methods (which will look as just sub-URI of current URI), or get
   current value of a property.

   I.e:

   class HumanResources
     ...
     def list_hired
       ...
     end

     attr_accessor :count
   end

   hr = HumanResources.new
   ...

   will be visible as

   http://host/app/HumanResources
   http://host/app/HumanResources/list_hired
   http://host/app/HumanResources/count
   http://host/app/HumanResources/count?100  // ACL-protected

   and so on.

   HTTP-to-REST-to-Ruby convertor will just find proper object by
   traversing URI, and generate an XML based on object's methods and
   properties. Add ACLs by taste...

dozen