Institute of Transportation: Workzone Congestion Alerts Module
- Download and install Maven
- Download and install MongoDB
- Configure application.properties file in resources.
- Update mongodb settings
- Provide Twilio account credentials
- Modify recipients.json file to provide the recipients mobile numbers.
- Update workzonesensors.csv file to provide the work zone sensor locations and the work zone projects. Also update the sensor_camera_2017.csv to provide the work zone sensors and the camera mappings.
-
Navigate to project root folder and run the following command
mvn clean install
-
Go to the target folder and extract the ROOT.war file.
-
Either deploy the ROOT.war file in a Java Servlet Container or manually run the application using the following command.
java -jar ROOT.war
-
Once the application successfully started, post the work zone status information to this application. Below explains the REST call structure for posting the work zone statuses.
Type Value HTTP Method: POST Request URL: http://<context-url>/workzone/feeds/consume Form Data: {
"workzone": "$workzoneName",
"device": "$deviceName",
"avgSpeed": "$avgSpeed",
"alert": "Must be one of {SLOW,STOP,BLANK}"
}
5. To access the current bottlenecks (Slow or Stop conditions) in the work zones, use the follwoing feed.
http://<context-url>/feeds/alertfeed
Package/File | Usage |
---|---|
src/main/resources | Folder that contains the all configuration files |
WorkzoneAlertsApp.java | Entry class that will be invoked by the Spring Boot. |
com.intrans.reactor.handlers | This Package has the handler classes for asynchronous processing. |
com.intrans.reactor.workzone.constants | Contains the configurations from the resource folder. |
com.intrans.reactor.workzone.controller | Controller classes for providing the REST APIs. |
com.intrans.reactor.workzone.dto | DTO classes that stores the SMS Requests and Work zone alert requests. |
com.intrans.reactor.workzone.entities | MongoDB database document classes. |
com.intrans.reactor.workzone.handlers | Service handler for preparing the work zone DTOs. |
com.intrans.reactor.workzone.repository | Sping data repository classes for executing the queries. |
com.intrans.reactor.workzone.sms | Classes for managing the SMS configurations and handling the SMS requests. |
com.intrans.reactor.workzone.sms.process | Service class for generating and processing the SMS request objects. |
com.intrans.reactor.workzone.sms.providers | SMS provider classes. |
com.intrans.reactor.workzone.utils | Common helper classes. |
- Vamsi Krishna J ([email protected])
This project is licensed under the MIT License - see the LICENSE file for details.