WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999 A Runtime System for...

45
WWW8 - Toronto "A Runtime System for Interactive Web Servic es" May 12, 1999 A Runtime System for Interactive Web Services Claus Brabrand , Anders Møller, Anders Sandholm, Michael I. Schwartzbach BRICS, University of Aarhus, Denmark

Transcript of WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999 A Runtime System for...

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

A Runtime System for

Interactive Web Services

Claus Brabrand, Anders Møller,

Anders Sandholm, Michael I. Schwartzbach

BRICS, University of Aarhus, Denmark

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Plan

• Illustrate problems with CGI– example interactive web service.

• Solve problems one by one– building on top of CGI.

• Additional problems and solutions.

• Package solutions into runtime system.

• Conclusion.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

An Interactive Web Service

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Save, Restore State

<INPUT TYPE=“hidden” NAME=confirmed VALUE=“1”> <INPUT TYPE=“hidden” NAME=fname VALUE=“Claus”> <INPUT TYPE=“hidden” NAME=fee VALUE=“495”>

:

<INPUT TYPE=“hidden” NAME=confirmed VALUE=“1”> <INPUT TYPE=“hidden” NAME=fname VALUE=“Claus”> <INPUT TYPE=“hidden” NAME=fee VALUE=“495”>

:

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Bookmarks

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Bookmarks

Bookmark What?

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Back Button

Pay twice ?!Pay twice ?!

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI HTML

HTMLCGI

restore ;compute ;save

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Adding a ”Connector”

Internet

client

HTTP server

program

database

CGI

HTML

CGI

connector

HTML

CGI

HTML

restore ;compute ;save

redirect

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore StateConnector

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Bookmarks• Problem:

– CGI URL bookmarked (not HTML response).

• Consequence: – Must complete entire service right away.

• Would like:– Pause service (bookmark), resume later.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI

HTML

CGI

connector

HTML

CGI

HTML

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Adding an HTML “Reply File”

Internet

client

HTTP server

program

database

CGI

done!

CGI

connector

jump

CGI

jump

HTMLreplyfile

HTML

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: Back Button

• Problem: History of old requests:– Annoying.– No longer make sense.– Dangerous! (for client and server)

• Would like:– Back should take us “back”.– Never see old CGI requests.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI

done!

CGI

connector

jump

CGI

jump

HTMLreplyfile

HTML

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI

done!

CGI

connector

jump

CGI

jump

HTMLreplyfile

HTML

same URL

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button Reply File

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Additional Problems

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Additional Problems

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

What is going on?• Error? Abort...

– Package Lost?– Service Crash?– Connection?

• Ok? …or Wait !?– Searching Database?– Long Computation?– Waiting for a Resource?

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Problem: User Impatience

• Consequence:– Users leave service.

• Would like:– Explain delays.

• “Searching database … Please wait.”.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI

done!

CGI

connector

jump

CGI

jump

HTMLreplyfile

HTML

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Adding a Connector Timeout

Internet

client

HTTP server

program

database

CGI

done

CGI

connector

jump

CGI

jump

HTMLreplyfile

update

Timeout

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button Reply File

• User Impatience

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector

• Bookmark Reply File

• Back Button Reply File

• User Impatience + Timeout

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector• Bookmark Reply File• Back Button Reply File• User Impatience + Timeout• Concurrency Control

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Concurrency Control

• Problem: Parallel service processes.– Access shared resources.– Require synchronization.

• Solution:– Allow separate specification of constraints.– Use safety controller process

• Ensures that service obeys constraints.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Components

Internet

client

HTTP server

program

database

CGI

done

CGI

connector

jump

CGI

jump

HTMLreplyfile

update

Timeout

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Adding a Safety Controller

Internet

client

HTTP server

program

database

CGI

done

CGI

connector

jump

CGI

jump

HTMLreplyfile

updatecontrollerwait

pass

Timeout

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector• Bookmark Reply File• Back Button Reply File• User Impatience + Timeout• Concurrency Control

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

CGI Problems

• Save, Restore State Connector• Bookmark Reply File• Back Button Reply File• User Impatience + Timeout• Concurrency Control Controller

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Runtime System• Everything implemented!

– in C for Unix / Linux.

• Available: http://www.brics.dk/bigwig/runwig/– Source– Documentation.– Examples.

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

<bigwig>

• Research project at BRICS.

• Domain specific high-level language:– Rapid construction of interactive web

services.– Compiles into:

• HTML, CGI, Java, JavaScript, …

– Uses our runtime system extensively.

http://www.brics.dk/bigwig/

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

<bigwig>

• Research project at BRICS.

• Domain specific high-level language:– Rapid construction of interactive web

services.– Compiles into:

• HTML, CGI, Java, JavaScript, …

– Uses our runtime system extensively.

http://www.brics.dk/bigwig/

WWW8 - Toronto "A Runtime System for Interactive Web Services" May 12, 1999

Conclusion• CGI: widely used, but inherently low-

level.

• Our Runtime System:– Higher level.– Built on top of CGI.– Compact and efficient.– Solves the problems discussed.