![]() |
Smart Trek
|
|
2. Introduction 3. Installing SDD2.0.0b6 4. Running the Examples 5. Recompiling the Source Code 6. Release Notes The wide variety of remote sensors used in Intelligent Transportation Systems (ITS) applications (loops, probe vehicles, radar, cameras, etc.) has created a need for general methods by which data can be shared among agencies and users who own disparate computer systems. The content and makeup of this data can change over time without the data provider notifying the users. For example, a traffic management center may have a set of inductance loops that provide data for Independent Service Providers (ISP) and other centers. The operators of this center may arbitrarily change the number, order, and/or type of sensors (e.g. substitute radar for loops) in the data they are transmitting. To be able to continuously use such data, changes need to propagate automatically to any downstream users. To share data with time-varying features requires that both the sender and the recipient of the data agree on a protocol to define the contents and meaning of the data. This protocol must allow the source of the data to communicate changes to the downstream users while preserving the meaning of the data. The software components of the package distributed here provide such a protocol in the form of a general transfer mechanism called self-describing data (SDD). An SDD transfer consists of a Data Dictionary followed by a continuous stream of raw sensor data (see Figure 1). The Data Dictionary leverages the power of conventional data description languages, specifically a subset of SQL92, to describe the meta-data properties of the subsequent sensor data stream. An SDD transfer ends either when a new data dictionary is received or when the transport protocol used to deliver the SDD is interrupted. The software in this package has been used to provide data feeds for a wide variety of ITS products and is applicable to a variety of data types and sensors.
Figure 1: Self-Describing Data Transfer data stream.
The Self-Describing Data (SDD) applications programming interface (API) of the ITS Backbone is depicted in Figure 2. The overall backbone design includes transmitters, operators, and receivers, stacked into three functional layers: Domain, SDD, and Frame, as shown in Figure 2. The software in this current release implements only the receiver portion of the API. The receiver software included is represented schematically by the SDD 2.0.0 column to the right of the Receivers in Figure 2. The software included is based in an object oriented paradigm, wherein the data types indicated in Table 1 are accessed using the associated callbacks, also identified in Table 1. In the callback model, classes register to be notified of events from event sources. When the event source produces an event, the callback methods in the registered classes are executed with the event as a parameter. The mapping of the various data types into the layered API model in Figure 2 is represented in Table 1.
Table 1. The API callbacks and data types. The ItsFrame data type is a transport delivery construct used to pass serialized data between the transmitter and the receivers. These frames contain data encoded using the ASN.1 basic encoding rules (BER) and represent the various entities depicted in Figure 1. (For more information see both the SDD article and report) The ItsFrameReceiver (see Figure 2) is a class that receives data from a network socket connection and produces ItsFrame events. It is initialized and connected to an SDD data source using a host name and data port number. Once the connection has been established, a number of ItsFrame objects are transmitted to the receiver. These are validated, serialized, and made available to registered classes via the itsFrameReceived callback method (see Figure 2), which takes an ItsFrame as input. The SDD layer produces four individual types of data:
The SddReceiver receives ItsFrames via the itsFrameReceived callback from its internal ItsFrameReceiver. The receiver parses the ITS frame using the frame parser and expands the two BER packets contained in the frame. The first packet in an ITS frame contains a serial number - a 17-character timestamp with the format 'yyyymmddhhmmssmmm' (a four-digit year designation, followed by a two-digit month, a two-digit date, a two-digit hour, a two-digit minute, a two-digit second, and a three-digit millisecond). The serial number is used in the receiver to maintain state and relate meta-data to data. The second BER packet in the ItsFrame contains the SDD data type packet, which contains either meta-data (Schema, Contents, and Extractor) or binary data.
![]()
The serial number and the Sdd packet are packaged into an SDD event and passed back via one of the four SDD callbacks specified in Figure 2. The SDD Receiver monitors the SDD events and their associated serial numbers to maintain state. There are specific relationships between the serial numbers and the individual data types: (1) Schemas and Extractors must have the same serial number, (2) Contents and Data must have the same serial numbers, and (3) the Contents/Data serial numbers must be greater-than-or-equal-to the Schema/Extractor serial numbers. To obtain the data, the user must register listeners for the various callbacks. Registered listeners will produce output in the sequence: Schema, Contents, Extractor events, followed by a stream of Data events, where every event in the data stream will have the same serial number as the current Contents until a new Contents arrives as part of a new Data Dictionary. See Table 1 for the Sdd event callbacks. The domain level of the API allows users to access Extracted Data. Extracted Data is the result of expanding the raw binaries into tabular objects corresponding to the data tables defined in the Schema. These events are produced in the SddReceiver by taking the latest Extractor and applying it to each of the Data events in the incoming stream. The domain level callback, in Figure 2, for Extracted Data is extractedDataReceived.
First, make sure you've installed the 1.1.6 release of the Java Development Kit. To test this, type "java -version". If this command does not return the string "java version 1.1.6," go here to download the JDK. The Zip file for the beta release of the SDD Receiver can be found at: http://www.its.washington.edu/bbone/SDD/v2.0.0/sdd2.0.0b6.zip
Windows users may wish to create batch files to set the classpath and run the example programs all at once. This helps prevent problems caused by editing your global classpath. A batch file to run the basic receiver would look like this: REM Run the SDD Receiver The other example program, SddDatabaseReceiver, requires a JDBC driver from your database vendor. Whatever package the vendor distributes must be on your classpath. So a batch file to run SddDatabaseReceiver would look like: REM Run the SDD Database Receiver where "c:\oracle\lib\classes111.zip" is the name of the JDBC driver distributed by Oracle to access an Oracle database. If you are using a different type of database, contact the vendor for information about access through JDBC.
1. Overview 2. Introduction 3. Installing SDD2.0.0b6 5. Recompiling the Source Code 6. Release Notes Two example applications have been provided for the user's benefit. The first, SddAutoExtractReceiver, allows the user to connect and get data from any Sdd data source. To run this application, first make sure your classpath contains its.zip, as described in Section 3. Next, issue the command: java its.app.SddAutoExtractReceiver The following control panel will appear. At this time TMS Loop data is available at port 8411, and Automatic Vehicle Location (AVL) data is available at 8412. ![]()
The user is required to set the host and port for the SDD data source (8411=TMS, 8412=AVL). This application produces output files containing the Schema, Contents, Extractor, Data, and ExtractedData. The user can specify which of these files to produce. In all cases, new files will be created every time a new serial number instance arrives. Data and ExtractedData files can be appended or overwritten. If append is specified for the binary Data, a log file is created, indicating the date, Binary Large Object (BLOB) size, and offset into the file, to allow the user to reconstruct the data parcels. The second application, SddDatabaseReceiver, loads Schema, Contents, and ExtractedData directly into a database, leveraging Java's JDBC capabilities. To run this application, a database engine with remote access capability and its corresponding jdbc driver is required. The driver must be installed on the client machine. Consult the driver's documentation to obtain the necessary class name and URL. To run this application, verify that your classpath includes its.zip, as described in Section 3, and the jdbc driver's classes as well. Type: java its.app.SddDatabaseReceiver The panel below should appear. ![]()
Specify the SDD data source host and port, as well as the jdbc class and URL descriptions. Then specify the user name and password. The application contains several examples of class name and URL templates from Oracle and Sybase. If your database/driver is from a different vendor, please consult your documentation to obtain the appropriate class and URL formats. A meta-data toggle informs the application whether to try and load the Schema and Contents into the database. When this toggle is set to off, only extracted data is loaded (the meta-data is ignored). The time it takes to load extracted data will vary with the number of required inserts, the speed of the database host, and the speed of the connection from the client running the application to that host. If the ExtractedData events arrive faster than the host can insert them, "overflowing" events will be dropped. Note also that the transmitted Schema does not contain state information. This will be critical against a time-varying data stream like TMS, where the BLOB contains readings from a variety of sensors, whose type and position within the BLOB is determined by the contents of the "LOOPS" table. Since the TMS schema cannot accommodate differing contents, the arrival of new sensor type and offset information will corrupt the existing instantiation. This makes SddDatabaseReceiver more of an example than a general application. It is currently the responsibility of the parties receiving the data to handle these state transitions in their own data models! Both demo applications produce SddReceiverLog.txt files that document reception of various SDD events by the underlying SddReceiver.
Java programmers interested in recompiling the provided source code will need to unzip its.zip. The top-level "its" package contains the "SQL," "backbone," "element," "io," and "util" packages. All of these packages contain classes used by the receiver demos. To recompile the classes, delete all the class files and regenerate them with the java tools of your choice. 1. Overview 2. Introduction 3. Installing Sdd2.0.0b6 4. Running the Examples 5. Recompiling the Source Code SDD Java API Release 2.0.0 beta 609/02/98 OverviewIn this release, SDD parsing functionality is enabled in the receivers. The receiver will exit if it detects a poorly-formed schema or contents frame. This is an important step towards enabling creation of SDD transmitters for new data sources. Bugs fixed
Other changes
SDD Java API Release 2.0.0 beta 503/1/98
|
![]()
webmaster@its.washington.edu sdd@its.washington.edu
(for questions regarding the software)(September 2, 1998)
SmartTrek ATIS Backbone | What's New | Current Software Downloads | Software Archive | Supporting Documents | ITS UW Home Page | SmartTrek Home Page