[html]

A Web Service for My Dog

R. Alexander Milowski

milowski at sims.berkeley.edu

#1

Hudson and the Beach

This is Hudson:

He likes to go to the beach because:

#2

The Problem

#3

The Problem - Complications

#4

Remember Hudson

How could you deny him the beach?

#5

Google is your Friend

#6

The Raw Data

#7

Can We Reliably Request the Data?

#8

A Solution

Create a web application that will access the NOAA website to get tide information and display it in an XHTML format that can be displayed on a cell phone.

#9

Application Strategy

#10

Technology Choices - Web Service

#11

Because these are my slides...

#12

The Request and Response

  1. We'll make up a request document:

    <t:tideinfo location="9414290" xmlns:t="http://www.smallx.com/services/tideinfo/2005"/>
  2. And the response will be added as children:

    <t:tideinfo location="9414290" xmlns:t="http://www.smallx.com/services/tideinfo/2005">
    <t:tide-data>
    <t:tide-level date="04/02/2005" time="12:00:00-7:00" level="-0.l1"/>
    <t:tide-level date="04/02/2005" time="12:06:00-7:00" level="-0.l6"/>
    ...
    </t:tide-data>
    </t:tideinfo>

    where the date, time, and level are take from the first four columns of the data. We'll use the predicted level since we might want future tide information (see the data for more on this).

#13

Setting Up the Pipeline

#14

Making the Request

#15

Processing the XHTML: Getting the 'pre' Elements

#16

Processing the XHTML: Select the Correct 'pre' Element

#17

Processing the XHTML: Removing the 'font' Element

#18

Processing the XHTML: Converting the Data

#19

Processing the XHTML: Last Step

#20

Limiting to tideinfo Elements

#21

Setting Up the Web Service

#22

A Streaming Service

#23

Oh, but there is a problem...

#24

Using the gettides.pd Pipeline

#25

Restricting to Today's Date

#26

Finding Low and Hige Tides

#27

The Service is Complete!

#28

Your Dog Knows XML?

He's still pouting.

We'll solve that next time by putting this service on my phone.