Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Interfacing dispatch

#2

The bindings for Ubiquity and the TapServer must be very simple.

  • Determine what inputs are natural for Ubiquity
  • Dispatch natural inputs to the Server
  • Server returns a JSON with instructions for how to handle results

Results should only be handled in a small variety of ways. Currently:

  • Inject a script into the DOM
  • Run a script in Ubiquity (default if not JSON... the script will simply evaluate?)

Examples:


  {inject: true, script: blah}
  {inject: false, script: blah}
  {script: blah}
  "blah"   // may be a bad idea...

This provides maximum flexibility, without an explosion in possibilities. Server-side a script can be made to inject HTML, redirect, etc.

A server-side issue remains regarding how to dispatch requests and generate the response JSON. Middleware may be the answer for the default server.

  • Default server gets wrapped in middleware that adds a flag: env[tap.ubiquity] = true
  • If response has header indicating JSON, then return
  • If not, cache and send JSON asking for a redirect to pickup cache (ie the request is made and a new tab is opened or the page simply redirects)

Reported by bahuvrihi · March 9th, 2009 @ 10:57 AM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. bahuvrihi
    bahuvrihi
    • State changed from new to invalid

    March 15th, 2009 @ 11:13 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.