Implementing Queries with HTTP - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Implementing Queries with HTTP

Description:

gopher (really telnet) WAIS (Z39.50-1988) http CGI. Z39.50 v2, v3. A/WWW Enterprises ... The parameter list is unspecified - it can be anything the form ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 13
Provided by: archibaldw
Category:

less

Transcript and Presenter's Notes

Title: Implementing Queries with HTTP


1
Implementing Queries with HTTP
  • A. Warnock
  • A/WWW Enterprises
  • warnock_at_clark.net

2
Why Use Open Protocols?
  • Anyone can write servers
  • Anyone can write clients
  • Leverages off of existing development
  • Uses formalized standards
  • In short
  • Interoperability

3
What Protocols Are Available?
  • ftp
  • telnet
  • gopher (really telnet)
  • WAIS (Z39.50-1988)
  • http CGI
  • Z39.50 v2, v3

4
http Capabilities
  • http does only a few things
  • get files (w/ MIME type)
  • put parameters (from forms)
  • execute scripts (CGI)
  • http defines only syntax, not content
  • Queries depend on content

5
CGI Scripting
  • CGI runs scripts on server
  • accepts parameters from client
  • parameter input via command line or stdin
  • pipes output to stdout
  • Sample CGI Input Stream
  • cgi-bin/ltscriptnamegt?ltparameter-listgt
  • The parameter list is unspecified - it can be
    anything the form implementor desires

6
Search Requirements
  • Search Bookkeeping Query
  • Bookkeeping consists of
  • User ID inf.
  • What database to query?
  • What elements to return?
  • What format is requested?
  • How many records to return?

7
What Goes Into A Query?
  • A query is constructed by specifying
  • Search Term(s)
  • Field Names
  • Words, phrases, etc.
  • Word stems, wildcards
  • Stems, substrings, area relations
  • None of these is prescribed in http!

8
http Query Summary
  • http can transmit arbitrary queries, but contains
    nothing to help in interpreting them
  • We must make up and agree upon a query syntax
    from scratch
  • This is called a Search Profile

9
Example Scenario
  • User completes an HTML form and submits it
  • Server receives a POST request - a bunch of
    information
  • Where the message came from
  • How long the message is
  • The message text

10
Sample Query
  • Step 1
  • http//ltservergt/cgi-bin/query?dbInventory
  • userwarnocknrecsallelementB
  • formatHTMLplatformLandsat7TM
  • rect42N112.5Wcenter512kmNS
  • 512kmEWoperatorspatialIntersect
  • resolutionMaximum
  • Must also include all state information

11
Critique
  • Whats so hard about this?
  • Is the query case sensitive?
  • What if the user is French? Russian? Chinese?
  • Do I specify platform or Platform or Source
    or source?
  • Is the order of parameters important?
  • How do I specify other resolutions? Can you
    generalize this to the query in Step 9? Whats
    your confidence that it would be correct?

12
Summary
  • http can be used to transmit queries and
    responses, but theres nothing in the protocol
    itself to make the process unambiguous
  • We have to do all the work outside the protocol -
    that is, we have to write a profile!
Write a Comment
User Comments (0)
About PowerShow.com