Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.
/ parkinG Public archive

Provide realtime reporting on parking garage occupancy

Notifications You must be signed in to change notification settings

123joshuawu/parkinG

Repository files navigation

parkinG

GOAL: Provide realtime reporting on parking garage occupancy and be able to make informed decisions with the information
Current - Using sfpark data for a specified part of San Francisco, CA
TO KEEP IN MIND (just for my poor memory sake)

  • Incorporate Google Maps (both UI and API)
  • Figure out the rest of the Processor Layer
    • Need higher object to consolidate data? (e.g. ParkingObject)
    • Two Siddhi Threads or one?
    • Database w/ Siddhi? or just an object
  • Fuzz out details of inter-layer communication (push/pull)
  • Figure out Distribution Layer
  • Figure out way to generalize Processor layer

OVERVIEW

The program is logically divided into three layers: Retriever, Processor, and Distributor
SFPARK SERVERS ------- Retriever -> Processor -> Distributor -------- CLIENTS

In each layer there is a [layer]Manager class (e.g in RETRIEVER layer there is a RetrieverManager)

  • The Manager class is effectively in charge of all the other classes in its layer. It will coordinate intra and inter layer communication, in fact, inter-layer communication should ONLY happen through the Manager classes.
  • The goal is to make all the other classes as generic as possible, so if an implementation for a new data source or new queries/streams, only the Manager class will have to be changed

RETRIEVER

In charge of retrieving data from sfpark servers and provide to processor layer when required.

HttpRetriever - Retrieves data from sfpark servers every minute -> updates RetrieverManager's SfpAvailability object. Even if SocketTimeOutException occurs continue trying to connect every minute
RetrieverManager - Manages HttpRetriever and holds latest copy of SfpAvailability object. Pushes data to PROCESSOR layer when sfp is updated

Sfpark Data
Complete documentation for sfpark api can be found here:
http://sfpark.org/wp-content/uploads/2013/12/SFpark_API_Dec2013.pdf

Basic Overview:
Template classes used for JAXB unmarshalling - All must implement DataTemplate

  • SfpAvailability - First level - Contains multiple Avl, each represents an unique parking garage
    • Avl - Second level - Contains information about parking garage including occupancy
      • Ophrs - Third level - Contains multiple Ops
        • Ops - Fourth level - Represents a time period in which the parking garage is open - can be hours/days

PROCESSOR

-- in progress --
Complex Event Processing done using Siddhi Engine
Siddhi Language Documentation: https://docs.wso2.com/display/CEP410/SiddhiQL+Guide+3.0
Will have two main functions:
1. Perform aggregate functions on data received from RETRIEVER layer and do other computations (tbd) - store results (in database? tbd)
2. Respond to client requests from DISTRIBUTOR layer - retrieve correct data and if necessary, compute new values, according to user request variables

Folder SiddhiExecutionPlans will contain text files for each individual Siddhi Execution Plan user wishes to add.
SiddhiThread - Class representing a single Siddhi execution plan with methods to add queries and streams
SiddhiDefinitionsReader - Tool to read query and stream definitions from SiddhiExecutionPlans and adds them to inputted SiddhiThread
DataTemplate - Contains generic methods to try to fuzz specific details when PROCESSOR layer is interacting with different data formats

DISTRIBUTOR

-- to be determined --

About

Provide realtime reporting on parking garage occupancy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages