• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Thesis Presentation: Web-Integrated Smart City Infrastructure
 

Thesis Presentation: Web-Integrated Smart City Infrastructure

on

  • 1,494 views

Thesis Presentation - Politecnico di Torino

Thesis Presentation - Politecnico di Torino
26/11/2012

A caching proxy for hybrid CoAP-HTTP networks.

Statistics

Views

Total Views
1,494
Views on SlideShare
1,483
Embed Views
11

Actions

Likes
1
Downloads
68
Comments
0

4 Embeds 11

http://www.linkedin.com 8
http://www.docseek.net 1
http://www.slashdocs.com 1
http://www.docshut.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Thesis Presentation: Web-Integrated Smart City Infrastructure Thesis Presentation: Web-Integrated Smart City Infrastructure Presentation Transcript

    • Web-IntegratedSmart City InfrastructureA caching proxy for hybrid CoAP-HTTP networks.Supervisor: Candidate:Prof. Dr. Giovanni Malnati Francesco CorazzaCo-supervisors:Prof. Dr. Stefano Ceri (Politecnico di Milano)Prof. Dr. Friedemann Mattern (ETH Zürich)Tutor:Dipl.-Ing. Matthias Kovatch (ETH Zürich) 26 November 2012
    • Web-Integrated Smart City Infrastructure Francesco CorazzaSmart Cities? Ningbo City, China Taipei , Taiwan 2
    • Web-Integrated Smart City Infrastructure Francesco Corazza •1. Smart Cities and Internet: • • interconnected worlds • •• Wireless Sensor Network (WSN) The Internet of Things vision • Spatially distributed autonomous sensors Internet of Things • Low bandwidth, lossy, unstable medium (Trillions of nodes) • Low energy, power, processing, faults • IEEEE 802.15.4 – Low Rate WPAN Fringe Internet• Internet of Things (Billions of nodes) • Proprietary solutions Core Internet • IPv6 over Low-power WPAN (6LoWPAN) (Millions of nodes)• IP as common language • “Things” can access standard web services • “Things“ can be addressed from Internet • Application-layer interconnection (Web) 5
    • Web-Integrated Smart City Infrastructure Francesco Corazza •1. Smart Cities and Internet: • • RESTfy real world • •• Web of Things • Web tools in real world (browser, search) Intersection originating the WoT • Physical/virtual mashups• REST • Everything is a resource • Architectural constraints • Scalability, usability, and accessibility • HTTP• Constrained Application Protocol • Designed from a subset of HTTP • Low overhead (UDP fragmentation) • Machine to Machine (M2M) applications 7
    • Web-Integrated Smart City Infrastructure Francesco Corazza •1. Smart Cities and Internet: • • CoAP (Constrained Application Protocol) • •• Features • Async communication (request/response) HTTP vs. CoAP protocol stack • Stateless reliability (confirmable/ack) 7 HTTP CoAP • Security (CoAPS) • Observation (native publish/subscribe) 4 TCP UDP • Blockwise transfers (stateless large transfers) IPv6• Options 3 IP 6LoWPAN • Minimum parsing complexity • Finite number of identifiers 2 Ethernet MAC 802.15.4.5 MAC• Caching 1 Ethernet PHY 802.15.4.5 PHY • Freshness model • Validation model• Proxying 9
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • proxy deployment • • Forward proxy• Positioning • Server-side • Client-side • External Reverse proxy• Server-side proxy ✓ Effective TCP/UDP mapping ✓ Caching ✓ Multicast ✓ Traffic queuing and limiting ✗ Scalability ✗ Availability Intercepting proxy• Uri-mapping • Homogeneous (intercepting proxy) • Embedded (reverse proxy) 11
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • cross-protocol mappings (HTTP to CoAP)• Reverse proxy HTTP Request GET http://proxy.mywsn.com/coap/cnb.mywsn.com/b/temp Accept: application/json• Embedded uri-mapping Constrained Network Proxy coap://proxy.mywsn.com Building CNB HTTP Client http://proxy.mywsn.com http://httpnode.example.com 2001:620:8:35db::1f Room A 170.1.52.200 2001:620:8:35C1::xxx 5683 Room B 80 Border Router CoAP Server Internet 2001:620:8:101f::1 coap://cnb.mywsn.com/b/temp 2001:620:8:101f::64 13
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • cross-protocol mappings (HTTP to CoAP) CoAP Request• HTTP-CoAP mapping Type: CONFIRMABLE - Uri-host: cnb.myswn.com • Split HTTP request uri Code: GET - Uri-port: 5683 Options: - Uri-path: b • Map Accept header - Accept: 50 - Uri-path: temp Constrained Network Proxy coap://proxy.mywsn.com Building CNB HTTP Client http://proxy.mywsn.com http://httpnode.example.com 2001:620:8:35db::1f Room A 170.1.52.200 2001:620:8:35C1::xxx 5683 Room B 80 Border Router CoAP Server Internet 2001:620:8:101f::1 coap://cnb.mywsn.com/b/temp 2001:620:8:101f::64 14
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • cross-protocol mappings (HTTP to CoAP) CoAP Response• Piggybacked response Type: ACKNOWLEDGE Options: Code: 2.05 - Content-Type: 50• Mag-Age Payload: {temp: 21.5} - Mag-Age: 60 Constrained Network Proxy coap://proxy.mywsn.com Building CNB HTTP Client http://proxy.mywsn.com http://httpnode.example.com 2001:620:8:35db::1f Room A 170.1.52.200 2001:620:8:35C1::xxx 5683 Room B 80 Border Router CoAP Server Internet 2001:620:8:101f::1 coap://cnb.mywsn.com/b/temp 2001:620:8:101f::64 15
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • cross-protocol mappings (HTTP to CoAP) Http Response• CoAP-HTTP mapping Status-Code: 200 OK • Cache-Control Cache-Control: max-age=60 Content-Type: application/json; charset=utf-8 • Content-Type Body: {temp: 21.5} Constrained Network Proxy coap://proxy.mywsn.com Building CNB HTTP Client http://proxy.mywsn.com http://httpnode.example.com 2001:620:8:35db::1f Room A 170.1.52.200 2001:620:8:35C1::xxx 5683 Room B 80 Border Router CoAP Server Internet 2001:620:8:101f::1 coap://cnb.mywsn.com/b/temp 2001:620:8:101f::64 16
    • Web-Integrated Smart City Infrastructure Francesco Corazza •2. Web-Integration: • • caching • •• Response code (≠ HTTP) • 2.05, cache • 2.03, update • 2.0x, invalidate• Update max-age • Time passed in cache • max_age = original_max_age - cache_age 19
    • Web-Integrated Smart City Infrastructure Francesco Corazza •3. Design the proxy: • • components • •• Californium • Rapid prototyping in backend • Layered architecture• Apache HttpCore • Minimal memory footprint • Non-blocking I/O• Apache HttpClient • Uses HttpCore internally • 1xx & 3xx codes managed • Built-in security• Google Guava Cache • Used in production by Google • 286.000 tests 22
    • Web-Integrated Smart City Infrastructure Francesco Corazza •3. Design the proxy: • • integration (Californium architecture) • •• Layered architecture Resources • Chain of Responsibility Resource • Single thread model • Limited to clients and servers Endpoint• Pitfalls • Synchronized responses Abstractions • Blocking UDP thread Communicator • Missing client abstraction • Missing server abstraction TransferLayer Variable Layers Layers ⟳ UDPLayer 23
    • Web-Integrated Smart City Infrastructure Francesco Corazza •3. Design the proxy: • • integration (proxying) • •• Encapsulations Resources • Forwarding resources (client) Resource • Stacks (servers)• Multi-thread model CoAP Resource HTTP Resource • Concurrent responses • Resource thread-safeness ⟳⟳⟳ Proxy Endpoint • Non-blocking UDP thread• Communicator Abstractions • Two message flows • Thread-safeness Proxy Communicator• Endpoint • Avoid HTTP in CoAP servers ⟳⟳⟳ HTTP Stack CoAP Stack ⟳ • Encapsulate cache Servers 25
    • Web-Integrated Smart City Infrastructure Francesco Corazza • 3. Design the proxy: • • final architectureResources HTTP Client HTTP Translator CoAP Client Resource CacheAbstractions Proxy Endpoint Proxy Communicator HTTP Translator CoAP Stack HTTP StackServers 26
    • Web-Integrated Smart City Infrastructure Francesco Corazza •4. Evaluation: • • performance assessment • • 400 100 requests/s Average Round Trip Time (ms)• Emulation 350 200 requests/s • Proxy JVM limitation 400 requests/s • CoAP Server Virtualization 300 600 requests/s• Test client 250 • Pre-compiled requests • Random distribution of requests 200 • Normal distribution of resources 150 • Average of several “runs”• Produced data 100 • Raw RTT distributions 50 • RTT/throughput trends • CDF for RTT 0 0 200 400 600 800 1000 Request number 27
    • Web-Integrated Smart City Infrastructure Francesco Corazza • 4. Evaluation: • • performance assessment (CoAP-to-HTTP proxying) 350 Tests w/o cachingAverage RTT (ms) 300 250 Tests w/ caching 200 150 100 50 0 0 50 100 150 200 250 300 350 400 450 Produced throughput (Kbit/s) 1Cumulative Density F. 0.8 0.6 0.4 100 Kbit/s w/ cache 400 Kbit/s w/ cache 0.2 100 Kbit/s w/o cache 400 Kbit/s w/o cache 0 0 100 200 300 400 500 600 Average Round Trip Time (ms) 28
    • Web-Integrated Smart City Infrastructure Francesco Corazza •4. Evaluation: • • hybrid mashup • • Paraimpu control Panel HTTP to CoAP Twits containing temperatures 33
    • Web-Integrated Smart City Infrastructure Francesco Corazza • •Conclusions • • • CoAP draft evolution• Smart city 7 • Mashup as leading paradigm in the WoT K Lines added • Scalability through physical locality 6 K Unchanged Lines • Chains of proxies• Lesson learnt 5 • Design for extensibility • Interoperability through standards 4 • Cheat sheet for overlapping specifications 3• Future work • Standardization process 2 • Intercepting proxy • Secure proxy (HTTPS-CoAPS mapping) 1 0 35
    • Web-Integrated Smart City Infrastructure Francesco CorazzaThank you for the attention 36