Tom Tan@2019
Design a smart parking solution that helps motorists find parking in downtown areas.
Requirements | |
---|---|
1. | Hardware/Sensor technology to identify if a parking spot is occupied |
2. | Connectivity technology to transmit current state of the parking spot |
3. | A scalable data processing architecture in AWS to maintain parking data |
4. | Parking data is made available to 3rd party app developers to build interesting parking applications |
5. | Platform security and data protection |
Constraints
Technologies
Arduino & Sensor IC
A battery-powered sensor module, one for each parking spot, sends WIFI signals to a router nearby, which, in turn, relays it to the AWS IoT Core endpoint over internet.
The sensor module is an Arduino Yun embbeded controller, with AWS IoT device SDK.
It publishes to MQTT topic /roundabout/parkingspot/status/available
when the spot is empty
/roundabout/parkingspot/status/occupied
when occupied.
It also publishes a heartbeats to /roundabout/parkingspot/heartbeat
periodically, e.g. 20min.
Each sensor should have a corresponding IoT shadow
in IoT Core service for device health management, e.g. firmware versions, but not implemented in the demo for simplicity.
It's also possible to have a nearby greengrass
device in production, but not implemented in the demo for simplicity.
Greengrass | optionally for upgrade. Not in the demo due to lack of hardware. | scalable acquisition & dispatching |
IoT Core | for device registration, management, communication, MQTT message relay/dispatch, device s/w update etc. | scalable acquisition & dispatching |
DynamoDB | for historic lookup, analysis etc. | scalable persistence |
API Gateway | REST interface of lookup the state of a parking meter at a given point in time | scalable provisioning |
S3 | static website hosting | application demo |
EC2 | simulating IoT sensor devices publishing messages | application demo |
SNS | notification of device damages | scalable provisioning |
Cognito | enabling anonymous pub/sub IoT messages from static website | security&protection |
IAM | Roles, policy management | security&protection |
Lambda | process iot messages(e.g. add uuid message id, filter&dispatch messages per subtopic) and persists to DynamoDB | glue |
A static website hosted on S3, driven by data from EC2
Design a smart parking solution that helps motorists find parking in downtown areas.
Requirements | Solution | |
---|---|---|
1. | Hardware/Sensor technology | Arduino Yun / simulated with EC2 |
2. | Connectivity technology | MQTT, websocket |
3. | scalable data processing architecture | AWS IoT, Lambda, DynamoDB |
4. | Parking data is made available | API Gateway, SNS, S3 |
5. | security and protection | IAM, Cognito, x.509 certificate authentication |
Sensor | ~65$/device |
AWS IoT Core | $19 per device per year |
S3 & DynamoDB | $6.8x12= 81.6 per device per year |
Grand Total: $165 per device per year
Thank you
Bonus Slides
events:
/roundabout/parkingspot/status/available
/roundabout/parkingspot/status/occupied
periodical(every x minutes, defaults 1m for demo purpose)
/roundabout/parkingspot/heartbeat
Method 1, (only for realtime events)
/roundabout/parkingspot/status/available
/roundabout/parkingspot/status/occupied
/roundabout/parkingspot/heartbeat
Method 2: read DynamoDB directly through AWS API
Method 3: API through AWS Gateway
http://<host>/prkingspot_lookup?deviceId=<deviceId>×tamp=<timestamp>