Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded...
Transcript of Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded...
![Page 1: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/1.jpg)
Enabling Embedded Systems to access Internet Resources
![Page 2: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/2.jpg)
2
Enabling Embedded Systems to access Internet ResourcesEmbedded Internet Book
www.EmbeddedInternet.org
![Page 3: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/3.jpg)
3
Agenda
Enabling Embedded Systems to access Internet Resources: RATIONALE
Web Services: INTRODUCTION
HTTP Protocol: REVIEW
HTTP Protocol Bindings
Testing a Web Service
Application Case: Using Web Services for DNS Resolution
Implementing and Testing the Web Service
Implementing and Testing the Embedded Application
![Page 4: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/4.jpg)
4
Enabling Embedded Systems to access Internet ResourcesRATIONALE
Embedded Systems have limited resources compared with PCs.
Some applications may require large memory space and high processing power.
ComplexAlgorithms
CPU-IntensiveProcesses
EmbeddedDatabase
ApplicationsCPU
MemoryCPUMemory
![Page 5: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/5.jpg)
5
Enabling Embedded Systems to access Internet ResourcesALTERNATIVE SOLUTION
Adding a TCP/IP Stack, Embedded Systems will have internet-connectivity which allows them access Internet Resources.
![Page 6: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/6.jpg)
6
Enabling Embedded Systems to access Internet ResourcesALTERNATIVE SOLUTION
In this scenario, complex tasks could be resolved remotely in external servers.
ComplexTasks
ComplexTasks
![Page 7: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/7.jpg)
7
Enabling Embedded Systems to access Internet ResourcesALTERNATIVE SOLUTION
In other words, Embedded Systems could greatly benefit from the “external intelligence” provided by Desktop servers connected to the Internet, without the need of additional resources.
INTERNET
![Page 8: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/8.jpg)
8
Enabling Embedded Systems to access Internet ResourcesIMPLEMENTATION
A Remote Procedure could be called in order to resolve complex tasks, such as complex algorithms, CPU-intensive calculations, or retrieve records from a DataBase.
Ok. But how to implement this?
Using Web Services !
![Page 9: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/9.jpg)
9
Web ServicesIntroduction
![Page 10: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/10.jpg)
10
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES - Introduction
What are Web Services?
They are a Standardized way to call a remote procedure over the Internet.
They allow a distributing computing schema to work independently from the technology, language, and device.
Servers expose a piece of functionality through a Web Interface.
Clients consume this functionality from its application, using standard Internet protocols (HTTP, SOAP, XML).
HTTP is used as the transport protocol, to move messages between Clients and Servers - for secure transmissions, HTTPS can be used - (Advantage: most firewalls allow HTTP traffic).
These messages formats are defined according to the SOAP protocol. The SOAP messages are encoded using XML.
![Page 11: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/11.jpg)
11
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Typical Scenario
![Page 12: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/12.jpg)
12
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Standards
![Page 13: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/13.jpg)
13
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Standards (Cont.)
![Page 14: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/14.jpg)
14
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Transport Protocol: HTTP
![Page 15: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/15.jpg)
15
HTTP Protocol:Review
![Page 16: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/16.jpg)
16
Enabling Embedded Systems to access Internet ResourcesHTTP session example
![Page 17: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/17.jpg)
17
Enabling Embedded Systems to access Internet ResourcesHTTP Messages Format
![Page 18: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/18.jpg)
18
Enabling Embedded Systems to access Internet ResourcesHTTP Messages Examples
Request:
Response:
![Page 19: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/19.jpg)
19
HTTP Protocol Bindings
![Page 20: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/20.jpg)
20
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Protocol Bindings
SOAP (versions 1.1 and 1.2)
HTTP POST
HTTP GET (simplest - recommended for Embedded systems)
![Page 21: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/21.jpg)
21
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – SOAP 1.1 Binding
![Page 22: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/22.jpg)
22
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – SOAP 1.2 Binding
![Page 23: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/23.jpg)
23
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – POST Binding
![Page 24: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/24.jpg)
24
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – GET Binding
![Page 25: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/25.jpg)
25
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Binding Configurations ( web.config )
![Page 26: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/26.jpg)
26
Testing a Web Service
![Page 27: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/27.jpg)
27
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Testing the Web Service (1/3)
![Page 28: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/28.jpg)
28
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Testing the Web Service (2/3)
![Page 29: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/29.jpg)
29
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Testing the Web Service (3/3)
![Page 30: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/30.jpg)
30
Enabling Embedded Systems to access Internet ResourcesWEB SERVICES – Consuming a Web Service from the Browser
Using the Web Service throughthe HTTP URL syntax
http://www.embeddedinternet.org/Book/WebServices/MathService.asmx/Add?a=1&b=2
![Page 31: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/31.jpg)
31
Application Case:Using Web Services for DNS Resolution
![Page 32: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/32.jpg)
32
Enabling Embedded Systems to access Internet ResourcesImplementing the “DnsService” Web Service
![Page 33: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/33.jpg)
33
Enabling Embedded Systems to access Internet ResourcesTesting the “DnsService” Web Service
www.embeddedinternet.org/Book/WebServices/DnsService.asmx/DnsResolve?dn=www.intramarket.com.ar
![Page 34: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/34.jpg)
34
Enabling Embedded Systems to access Internet ResourcesConsuming the “DnsService” Web Service from anEmbedded System
Create a TCP socket and open a connection to Port 80 ( IP address of the server where the Web Service is published)
Once the connection is established, create and send the Web Service Request
When the Response is received, process the XML and extract the result
Close the connection and the TCPsocket
![Page 35: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/35.jpg)
35
Enabling Embedded Systems to access Internet ResourcesTesting the Embedded Application - Web Service Request
![Page 36: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/36.jpg)
36
Enabling Embedded Systems to access Internet ResourcesTesting the Embedded Application - Web Service Response
![Page 37: Enabling Embedded Systems to access Internet Resources · 2016-02-21 · 4 Enabling Embedded Systems to access Internet Resources RATIONALE Embedded Systems have limited resources](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3cece5a568436d6365ab66/html5/thumbnails/37.jpg)
37