BMS-Repo Design Choices Wentao Shang (UCLA) Why another repo? - - PowerPoint PPT Presentation

bms repo design choices
SMART_READER_LITE
LIVE PREVIEW

BMS-Repo Design Choices Wentao Shang (UCLA) Why another repo? - - PowerPoint PPT Presentation

BMS-Repo Design Choices Wentao Shang (UCLA) Why another repo? UCLA Facility Department stores BMS data in relational databases and queries data with SQL SQL is very useful for data analysis Therefore we want to add SQL support into


slide-1
SLIDE 1

BMS-Repo Design Choices

Wentao Shang (UCLA)

slide-2
SLIDE 2

Why another repo?

  • UCLA Facility Department stores BMS data in

relational databases and queries data with SQL

  • SQL is very useful for data analysis
  • Therefore we want to add SQL support into our

NDN-BMS system

slide-3
SLIDE 3
  • We can run NDN repo and RDBMS in parallel
  • Cons: data duplication, which leads to

maintenance and synchronization cost

A trivial solution…

RDBMS NDN Repo Data Sync

slide-4
SLIDE 4

Second design: RDBMS over NDN

  • Option 1: use NDN repo as underlying

data store (like a file system)

  • Similar to “Hive/Spark over HDFS”
  • Cons: lose the power of encoding

application semantics into NDN naming

NDN Repo RDBMS Read/Write

slide-5
SLIDE 5

Second design: RDBMS over NDN

  • Option 2: decompose SQL queries into NDN

Interests

  • “Ideal” solution, but hard to achieve
  • Still looking into it…
  • Fundamental challenge is the difference in the

querying power

slide-6
SLIDE 6

Implicit schema in NDN- BMS data naming

BMS_ROOT melnitz boelter strathmore studio1 4805 4806 DMR AH8 AA K J demand volts amps bms( building, room, dev-id, data-type, 1122334455 timestamp) electrical dev-type, NDN-BMS naming scheme Relational schema

slide-7
SLIDE 7

NDN Interest vs. SQL query

  • Observation: if we map NDN naming to relational

schema, NDN Interest is equivalent to the σ

  • perator in Relational Algebra (i.e., the WHERE

clause in SQL)

  • SQL is way more powerful (RA-complete)…
  • … which means it is possible to express NDN

Interest using SQL query

slide-8
SLIDE 8

Example

  • Interest: /<prefix>/melnitz/studio1/electrical/AA/

voltage, Exclude=(ANY, T1), ChildSelector=0

  • SQL query: SELECT * FROM bms WHERE building

= ‘melnitz’ AND room = ‘studio1’ AND devtype = ‘electrical’ AND devid = ‘AA’ AND devtype = ‘voltage’ AND (NOT timestamp <= ‘T1’) ORDER BY timestamp ASC LIMIT 1;

slide-9
SLIDE 9

Third design: NDN-over-RDBMS

BMS-repo server BMS data source SQL query interface RDBMS

slide-10
SLIDE 10

Challenges

  • Efficiency: can be improved by pre-packaging (and

pre-signing) each single data point

  • Scalability:
  • Use application-level data sharding
  • Or use better database…
slide-11
SLIDE 11

Thanks!

  • Suggestions on the SQL query decomposition

algorithm are highly welcome! :-D