RPC — Remote Procedure Call
- The source — /usr/include/rpc/rpc_msg.h
- Pairs of distinguishing terms
- stateless vs stateful
- Synchronous vs asynchronous
- Examples from the 2000’s
Common Gateway Interface
CGI is documented in RFC 3875.
Try out Professor Poopypants’ unauthorized name changer to test a classy CGI script. You should also take a look at the Perl CGI script.
Actions
- Caller loads a web page using
GET
orPOST
- HTTP server invokes the CGI script
- CGI script writes a response (return value)
- HTTP server returns response
- Cookies can encode state information, for example, a shopping cart
API’s
CGI API’s are defined for more programming languages.
AJAX
Ajax,
for asynchronous JavaScript and XML is another RPC-like
communication mechanism. Though originally designed with XML as the
object encoding, JSON is more popular today.
In CSCI 344, Ajax will be used with
jQuery. We’ll leave that
to CSCI 344, and just look at the look at the
XMLHttpRequest
Living Standard.
Perhaps someone who took CSCI 344 a couple of years ago will be
able to say more and give the instructor a little
REST.
Many useful API’s, such as those of Twitter, are based on REST.