Location-to-Service Translation (LoST) Protocol JavaScript API


In this project, I worked with Dr. Henning Schulzrinne and research scientist Dr. Andrea Forte to implement a client for a draft protocol. The protocol standardizes the messages exchanged when users query for services near a geographic location and receive, in response, a list of service providers and their properties. The protocol seeks to resolve queries locally by using a Domain Name System-like organization of search resolvers. My API obtains the current location via geocoding, or via the HTML5 Geolocation standard, which in turn gathers coordinates using the device’s IP address or its GPS unit. If the proposed standard were accepted, my API, along with the team’s package of first implementations for the standard, would enable applications to use a single API to query data from many commercial data providers at once, yielding a cohesive search experience for users.

Overview of location-based services

Location-based services refer to web-based services that utilize the user’s geographic location or some other location that the user specifies. Using this location information, the service dynamically generates information regarding the location of interest. Examples of location-based services include mapping services, search engines that narrow results based on user location, entertainment review sites that list points of interest near the user, and social media applications that allow users to share their current location with friends.

The data used by location-based services, including directories of service locations, reviews, contact information, are largely proprietary to the companies that host the service. This has resulted in the creation of location-based service databases that contain only specialized data, which are not easy to integrate with data from other location-based services. As an example, one location-based service website might have a wealth of information about the contact information, hours, and service items of venues in a given neighborhood, but another location-based service contains more extensive data from user reviews. As a result, a location-based service that provides rich location-based information may have to search across multiple databases, which requires developers to interface with multiple interfaces to the various databases.

Overview of the LoST protocol

The LoST protocol, as defined in RFC 5222 and in the LoST Extensions Draft, provides an XML- based protocol for querying for services URIs using a service type identifier and a geographic location identifier. A client using the protocol prepares a query and issues the query to a known LoST server, which then performs the query, drawing upon data contained in other servers in cases where the first server does not have enough information to give a response. The server then returns a response that has service listings for the requested type of service near the requested location. Service listings may include information about services such as name, civic address, URL, phone number, and service boundary.

The LoST protocol originated as a protocol for determining the emergency service provider for a given geographic location. Extensions to the query and response formats allow the LoST protocol to handle more service types so that it is suitable for use as a general-purpose location-based service protocol.

Overview of the LoST Javascript API

The LoST Javascript API facilitates issuing LoST queries and interpreting LoST responses, and is suitable for use in Javascript web-based location-aware applications. An application based on the LoST Javascript API can query a LoST server for instances of a specified service type at a specified location, which can be in the format of an address or as a geographic shape—alternatively, if neither an address nor a geographic shape is specified, the API uses the user’s current location determined through the geolocation capabilities of the browser. The API assists the developer in creating valid queries by concealing details of the LoST protocol and by minimizing the amount of XML processing required of the developer. Furthermore, the API assists the developer in parsing the response listing from the LoST server, and in cases where querying for a service fails, provides meaningful error messages to the application

Source Code Excerpt


API Documentation

LoST JavaScript API