Essentials:
   Home
   Definition
   Requirements
   Company

Background:
   History
     1981 - NewsPeek
     1983 - GIN
     1989 - SmarTV
     1992 - GenMagic
     1994 - CDML
     1994 - Social Ads
     1996 - Venue OS
     1999 - Lumeria

Venue OS:
   DBMS
   Communications
   Message Types
   Verbs
   Events
   Examples
   Venue Cash Card
   Broadcatch

* The History Behind Broadcatch - VOS

Prototypes and Pseudocode

rev 5.0, 10/30/96

Some Pseudocode

[Construction]

Prototypes for sending info to the VOS

  -- writelog appends writestring to an internal log.
  --
  -- writeflag values:
  --    0 = write to cache
  --    1 = write to cache and flush to server
  --
  -- writestring is a tab separated list of tokens
  --
  -- the first item in the list may be cause special interpretation
  -- of the rest of the tokens, possibly affecting the interpretation of
  -- following lines (as is the case when sending a food order)
  --
  -- see Verbs for a description of defined actions.

  writelog writeflag , writestring


  -- flushlog sends the information written by writelog to the VOS.
  -- The machineID is automatically added so the VOS knows from where the
  -- request is coming from (and, via a lookup to the profiles table,
  -- what customer(s) the message may have originated from.

  flushlog

Example usages of writelog

Note: For space (line width) considerations in the following examples, TAB characters have been replaced with a vertical bar ("|")
  -- called by login procedure v0.1 (until we have a card swiper)
  -- looks up name & passwd in customers table
  --   if found, assigns MachineIPAddr to record, indicating customer is active
  --   else, assigns a new CustomerID & creates a new record with a
  --         DefaultProfileID of 0
  --
  -- after this writelog,
  --   a call to getDatabase( "cppUser" ) will return the profiles(s)
  --   of the currently logged in customers

  writelog 1 , 'login|login_name|password_or_last_name'


  -- called to create or initialize a profile.
  -- Notes:
  --   The arguments correspond to the columns in the profiles table.
  --   The ProfileID set to zero implies that this is a default profile.
  --     Set the ProfileID to NULL to add a profile to a customer.
  --     To modify a profile, use the ProfileID returned by getData("cpp*");
  --   The CustomerID set to zero implies this is unassigned
  --     (for use by the administration program only)
  --     Set this to a known CustomerID to create or modify a profile.
  --   NULLs indicate "keep old value"; trailing NULLs may be truncated.

  writeLog 1 , 'profiles|0|0|10/5/96|10/5/96|Me|NULL|Me|GIF'


  -- to change a Customer's avatar, one might do something like this:

  set cpp = value(getDatabaseList( "cppUser" ))
  set profileID value(extractProfileID( cpp ))
  set customerID value(extractCustomedID( cpp ))
  sprintf( columns,
           "profiles|%s|%s|NULL|10/7/96|You|NULL|XinetFiles5/images/avaters/You|GIF",
           profileID, customerID );
  writelog 0 , columns
  flushlog

Lingo for initialization and retreiving data

(Updated 10/25/96 - rev 5.0)
  /* initialize all the locally cached tables
   * called at station (re-)boot time
   * this could take a while...
   * below is the lingo initialization of the illuxtra Xtra
   */
   
  long setUp(illuxtraName, stationTable_path, machineIPAddr, schemaName)
  {
    long errno;
    xtra_globs xg;
    
    /* Initialize the illuxtra globals in structure xg
     */
    initIlluxtraGlobals(&xg);
    
    /* set the schema used by the illuxtra xtra
     */
    if ((errno = setSchemaName(schemaName)) < 0)
    	return(errno);
    	
    /* call illuxtra function initCache 
     * initCache does the following:
     *   1) creates a local copy of the station table, 
     *      based on the server's station table
     *   2) creates a local cache of the queries found in the servers
     *      station table (uses getTabListData(queryName, 
     *      &dataToBeParsed, NULL)), where queryName is each query
     *      found in the station table, and dataToBeParsed is the string
     *      where the tab list data is stored.
     *   3) calls initRelationalStationTable(xg) - this function adds to
     *      the local cache predefined relational queries, by calling internal
     *      defineRelationalQuery(query, tablesAffected, SQLString, xg) for
     *      the following queries:  cppUser, cppAll, cppUserAllPrefs
     */
    if ((errno = initCache(&xg) < 0)
    	return(errno);
    }


  /***********************************************************************\
  * Below are some lingo calls to set certain values in the illuxtra Xtra *
  \***********************************************************************/

  /* setSchemaName() set the schema name used by the illuxtra when it
   * queries the database
   */
  long setSchemaName(schemaName)
  {
     // sets xg->schemaName to a copy of schemaName,
     // returns an error if there was a memory allocation error
  }


  /* setStationTableString() copies a string inside the illuxtra which
   * represents the station table.   This is only a temporary routine,
   * and will no longer be needed when we are reading the station
   * table off the server through a stream 
   */
  long setStationTableString(stationTableStr)
  {
     // sets xg->stationTableStr to a copy of stationTableStr,
     // return an error if there was a memory allocation error.
  }


  /* defineRelationalQuery() defines a new named query where the user
   * can pass in parameterized relational information when they call
   * one of the getData routines.  This routines adds another entry into
   * the local station table.  The SQLQuery can have parameters specified
   * as $n where n represents the nth parameter starting at 1.
   * Currently we only support one paramter  
   */
  long defineRelationalQuery(queryName, tableNameList, SQLQuery)
  {
     // Add to the localRelStationTable another entry where:
     // 	localRelStationTable[i].queryName = queryName;
     // 	localRelStationTable[i].tableName = tableNameList;
     // 	localRelStationTable[i].SQLQuery = SQLQuery;
     // Currently set the refresh Delay to 0, later this will depend on
     // the tableNameList
     //		localRelStationTable[i].refreshDelay = 0;
     // The timestamp has no relevence in this table, so it is set to 0
     //		localRelStationTable[i].timestamp = 0;
   }


  /* In lingo there are two calls to get data from the database they are the
   * following: getPropertyListData() and getTabListData(), they in turn
   * call getData inside the illuxtra with a dataFormat passed in, depending
   * on the format.  This allows for more format to easily be supported within
   * getData().  These routines return 0 if the data has changed (i.e. the
   * a query was made to the database, 1 if the data hasn't changed (i.e. the
   * data returned was the data in the cache, or an error which is a value
   * less than 0.
   *
   * getData() does the following:
   * first determine which station table the query resides in.
   * Next check to see if we need to update the station table from the server.
   * if so read the station table from the server.
   * then determine whether we need to make a database query based on
   * the server station table (i.e. has any of the tables changed since
   * the last query was made, or has the relation changed from what has
   * been stored in the cache).
   * if so call queryDatabase() which will fill in any relational parameters
   * into the SQL query, or use the query provided, or if null will create
   * a full table query (i.e. select * from tableName;).  Update the cache
   * with the results of the new query.
   * From the cache process query results into a tab-separated string,
   * or property list
   */
  long getPropertyListData(queryName, *data, relationalInfo)
  {
    return(getData(queryName, data, relationalInfo, PROPLIST_TYPE, xg));
  }
  
  long getTabListData(queryName, *data, relationalInfo)
  {
     return(getData(queryName, data, relationalInfo, TABLIST_TYPE, xg));
  }

  /* this would be written in Lingo */

  /* first initialize the illuxtra xtra
   */
  set myllluxtra = new(Xtra, "illuxtra")
  setUp(myIlluxtra, the pathname& "station_table", "207.88.117.138", 
       "public")"
  defineRelationQuery("songListGenre", "music", "select SongID from music $1;")
  set error = getPropertyListData("songListGenre", songListPropertyList,
  			"where PrimaryGenre = 'Rock'")
  if (error >= 0) {
  	if (error == 0) processPropertyList(songListPropertyList)
  	else return;  /* do nothing */ 
  }
  else return(error);
   Copyright © 1994-2007, Fen Labalme and CoMedia Consulting. All Rights Reserved.
Broadcatch is built on the OpenPrivacy Platform
I wish this
site were
Drupal Strategy and Consulting
This Site Supports Free Speech