Re: Integrating XP Into Web Infrastructure

"Larry Masinter" <LMM@acm.org> writes:

> All of the discussion about how simple it is to make a SOAP or
> XMLRPC call is interesting, but of course, all of the examples leave
> out the crucial and difficult part of any real program: switching on
> all of the possible resulting states and dealing with them
> appropriately.
> 
> For example, if you use HTTP, you need to decide what to do if you
> get a 404 Not Found or a 500 Server Error or (more disturbingly) a
> "301 Moved Permanently". How long do you wait if you do or do not
> get a "100 Continue"?
> 
> 
> > >     import xmlrpclib
> > >     betty = xmlrpclib.Server("http://betty.userland.com")
> > >     print betty.examples.getStateName(41)
> 
> But then what happens? How do the various libraries either support
> or hide all of the possible returns & conditions?

Short answer: exceptions.

Long answer:

Most implementations I'm familiar with raise new exceptions on
connection initiation or connection failures, or re-raise remote
exceptions from the remote implementation or application.

For most simple clients, none of these are caught and will simply be
reported to the user as a stack trace.  For slightly smarter clients,
they may treat all exceptions for "should usually work" calls as
intermittents and try again later (ie. on the next scheduled
interval).

For robust clients, and depending on the implementation, the
exceptions will be divided into classes (local, remote, call
format/serialization, transport, permanent failures) and detailed
exception information can be used for disposition.

re. "100 Continue" and how long to wait, if an implementation
supported it I'd suspect it would be a configurable property of the
connection.  I'm not aware of any that specifically support that, so I
suspect a standard timeout would apply.

  -- Ken

Received on Saturday, 13 January 2001 11:09:19 UTC