Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri...

26
I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet of Things USC Viterbi School of Engineering

Transcript of Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri...

Page 1: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

I3 v0 prototypeDemonstration

Crew TaylorGowri Ramachandran

Bhaskar Krishnamachari

Center for Cyber-Physical Systems and the Internet of ThingsUSC Viterbi School of Engineering

Page 2: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

I3 Domain Controller - v0 architecture

Sensors and Actuators (Devices or Things)

Buyer UI/API

Seller UI/API

Broker UI/API

Registry Authorization

Real-Time Data Routing

Middleware

Application API

Metering

Billing & Payments

Recommendation Engine

Administrative InterfaceDevice Data and Control

API

Analytics and Applications

Data Formats

Privacy MechanismsRatings and Trust

Peering API

We envision one I3 domain controller for each community: campus, city, a downtown area, hospital, potentially a range of scales, and potentially with some overlaps in data sources or applications relevant to the community

Page 3: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Sensors and Actuators (Devices or Things)

Buyer UI/API

Seller UI/API

Broker UI/API

Registry Authorization

Real-Time Data Routing

Middleware

Application API

Metering

Billing & Payments

Recommendation Engine

Administrative InterfaceDevice Data and Control

API

Analytics and Applications

Data Formats

Privacy MechanismsRatings and Trust

Peering API

✔✔

✔ ✔

XXX

XX X

I3 Domain Controller - v0 Prototype

Page 4: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

I3 Demonstration | 3

SellerI3 Platform

Buyer

BACnet client

MarketplaceWebsite Frontend

BackendPub-Sub Broker

AuthenticationPlugin

Parser

Website Database

AccessDatabase

Broker Log

Subscriber Client

Sell data

Send data

Buy data

Receive data

VisualizationPublisher Client

Adminmanages I3

I3 Proof of Concept Prototype Demo Video I3 v0

Prototype

Page 5: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

I3 Domain Controller - v0 Prototype details

● Publish-Subscribe: MQTT (Mosquitto) Broker with mosquitto-auth-plugin

● Metering via custom script ● Web Front-End: Custom-adapted Django site in

Python 2.7 ● REST API-based access for buyer, seller and admin● MySQL database for data registry and authentication

info● Publish and Subscribe Clients via Eclipse MQTT

paho (for any language) with HTTP wrapper

Page 6: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Frontend Demonstration

Page 7: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Login

Page 8: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Signup

Page 9: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Dashboard

Page 10: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Description

Page 11: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Cart

Page 12: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Transactions

Page 13: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Updated Dashboard and Notifications

Page 14: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Seller View of Dashboard

Page 15: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Create a Product

Page 16: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

REST API

Page 17: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

REST API Routes

● Seller○ Product

■ List■ Read■ Create■ Update■ Delete

○ Sale■ List■ Read

● Buyer○ Product

■ List■ Read

○ Purchase■ List■ Read■ Create

Page 18: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Example List Product Query

/api/buyer/product

Page 19: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Example Create Product Query

user$ curl --header "Content-Type:

application/json" --header

"Authorization: Token

727cff9f71ad15267aadbcd9d8b9fa9ba881c1

ad" --request POST --data

'{"media":"myimg.jpg

","title":"anrg-temp-sensor",

"sensor_type":"sensor",

"description":"Temperature sensor at

the ANRG lab", "price": "9.99",

"sale_price": "6.99", "sale_active",

false}'

http://localhost:8000/api/seller/produ

ct

Page 20: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

I3 Backend Demonstration

Page 21: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Seller script

● Account name● Topic to publish to● Password

Page 22: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Buyer script

● Account name● Topic to publish to● Password

Page 24: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

Webservices Demonstration

Page 25: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

HTTP Subscribe

user$ curl -ivs --raw

"http://localhost:5000/subscribe?topic

=anrg-temp-sensor&username=trojan&pass

word=hgibtr”

Page 26: Bhaskar Krishnamachari Gowri Ramachandran …...I3 v0 prototype Demonstration Crew Taylor Gowri Ramachandran Bhaskar Krishnamachari Center for Cyber-Physical Systems and the Internet

HTTP Publish

user$ curl -H "Content-Type:

application/json"

"http://localhost:5000/post" -d

'{"topic" : "anrg-temp-sensor",

"message" : "Hello World", "username"

: "trojan", "password" : "hgibtr" }'