XML Web Services for Invisible Computing

33

description

XML Web Services for Invisible Computing. Johannes Helander Researcher Microsoft Research. Outline. The goals of Invisible Computing Why Web Services? Our approach Table driven serialization Distributed real-time Trust and secure discovery Componentized RTOS Real-time C# - PowerPoint PPT Presentation

Transcript of XML Web Services for Invisible Computing

Page 1: XML Web Services for Invisible Computing
Page 2: XML Web Services for Invisible Computing

XML Web Services for XML Web Services for Invisible ComputingInvisible Computing

Johannes HelanderJohannes HelanderResearcherResearcherMicrosoft ResearchMicrosoft Research

Page 3: XML Web Services for Invisible Computing

OutlineOutline

The goals of Invisible ComputingThe goals of Invisible ComputingWhy Web Services?Why Web Services?Our approachOur approach

Table driven serializationTable driven serializationDistributed real-timeDistributed real-timeTrust and secure discoveryTrust and secure discoveryComponentized RTOSComponentized RTOSReal-time C#Real-time C#

Developing code for small devicesDeveloping code for small devicesEducational & research opportunitiesEducational & research opportunitiesAvailabilityAvailability

Page 4: XML Web Services for Invisible Computing

Why Invisible Computing?Why Invisible Computing?The computers stay out of sight and do their The computers stay out of sight and do their job.job.No setup hasslesNo setup hasslesMake everyday objects better by adding Make everyday objects better by adding computation and communicationcomputation and communicationNatural user interface – not screen and mouseNatural user interface – not screen and mouse

Rudimentary autonomous operation – added Rudimentary autonomous operation – added value from servicesvalue from servicesIncremental deploymentIncremental deploymentDevices communicate with each otherDevices communicate with each otherDevices communicate with big computers as Devices communicate with big computers as neededneeded

Page 5: XML Web Services for Invisible Computing

Sample ApplicationsSample Applications

Home appliances, security, lightingHome appliances, security, lighting

Medical electronic devicesMedical electronic devices

Wearable ComputersWearable Computers

Robotics, Industrial Control, National Robotics, Industrial Control, National InfrastructureInfrastructure

Sensor networksSensor networks

Wireless communication gadgetsWireless communication gadgets

Audio NetAudio Net

Disaggregated PC, smart I/O cardsDisaggregated PC, smart I/O cards

ToysToys

Page 6: XML Web Services for Invisible Computing

Hardware trendsHardware trends

32 bit microcontrollers are as cheap and 32 bit microcontrollers are as cheap and power efficient as 8 bit MCUspower efficient as 8 bit MCUs

Single chip computer is a realitySingle chip computer is a reality

Cost close to $5 (“Home depot” price point)Cost close to $5 (“Home depot” price point)

No need to aim at lowest point No need to aim at lowest point sweet spot sweet spot

Aggregate of medium volume market is hugeAggregate of medium volume market is huge

Partially reconfigurable hardwarePartially reconfigurable hardware

Make hardware easy for software peopleMake hardware easy for software people

Page 7: XML Web Services for Invisible Computing

An Invisible Computing Scenario

• Interoperability• Security• Data analysis

• Power• Bandwidth• Processing

• Routing• Security• Real-Time• Non-graphical UI• Zero-configuration

[VCR]

[Pacemaker]

XP EmbeddedXP Embedded

[watch]

Page 8: XML Web Services for Invisible Computing

What are Web Services?What are Web Services?The general-purpose solution to The general-purpose solution to communication, in XMLcommunication, in XML

Convergence of EDI, RPC, MSMQ, app Convergence of EDI, RPC, MSMQ, app specific protocols and formats specific protocols and formats Agnostic to underlying transportAgnostic to underlying transport

All about interoperation. Allows partial All about interoperation. Allows partial understandingunderstanding

Across-the-board presentation layerAcross-the-board presentation layer

Common protocols obviate need for Common protocols obviate need for proxies proxies

Builds on critical mass and momentumBuilds on critical mass and momentum

Page 9: XML Web Services for Invisible Computing

Do they Scale?Do they Scale?XML Web Services conceived to solveXML Web Services conceived to solvee-business interop probleme-business interop problem

Implementations geared towards high-end Implementations geared towards high-end computerscomputers

The same interop problem is the crux of The same interop problem is the crux of Ubiquitous computingUbiquitous computing

Critical mass required in any businessCritical mass required in any business

Resource constraints:Resource constraints:Silicon Silicon – footprint– footprint

Energy –Energy – parsing overhead parsing overhead

Bandwidth – Bandwidth – size of messagessize of messages

Efficient implementation and compressionEfficient implementation and compression

Page 10: XML Web Services for Invisible Computing

SOAP exampleSOAP example"Add" request, from PC to NTU simulator, via HTTPthen forward to EB63 via encrypted UDP

<soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ > <soap:Header soap:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ > <rp:path xmlns:rp=http://schemas.xmlsoap.org/ws/2002/05/routing > <rp:fwd> <rp:via >http://172.31.46.26/COB/calc.cob </rp:via> <rp:via reservation=“sensor/button">

x-udp-aes-soap://172.31.41.244/COB/calc.cob</rp:Via> </rp:fwd>

<rp:rev><m:via vid="1"/></rp:rev> </rp:path>

</soap:Header> <soap:Body soap:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ > <m:Add xmlns:m=http://tempuri.org/Calc/message/ > <A>14</A> <B>28</B> </m:Add> </soap:Body></soap:Envelope> 

The calculator is a popular interop testThe calculator is a popular interop test

Page 11: XML Web Services for Invisible Computing

Yes, it Works!Yes, it Works!Implementation shows you can successfully:Implementation shows you can successfully:

Realize web services on small low-cost Realize web services on small low-cost devices, providing good interoperability with devices, providing good interoperability with PCs and other devicesPCs and other devicesAchieve a high level of security and privacy Achieve a high level of security and privacy on those deviceson those devicesIntegrate security, discovery, and functional Integrate security, discovery, and functional assignment into a hassle-free user assignment into a hassle-free user experienceexperienceSetup your home completely independently, Setup your home completely independently, yet securely federate with external entities yet securely federate with external entities such as e-businesssuch as e-businessUse web services for real-time tasksUse web services for real-time tasks

Demoed at booth #31Demoed at booth #31

Page 12: XML Web Services for Invisible Computing

Microsoft Invisible ComputingMicrosoft Invisible ComputingA software platform for low cost embedded systemsA software platform for low cost embedded systemsthat communicate with each other and with big computersthat communicate with each other and with big computers

Flexible development for multiple platformsFlexible development for multiple platformsInteroperation with small and big computersInteroperation with small and big computersWeb services and .NETWeb services and .NETSecurity and privacySecurity and privacyReal-TimeReal-TimeEnergy awareEnergy awareLow parts cost (targeted for <= $5 computer)Low parts cost (targeted for <= $5 computer)Sweet spot: enough for real use and critical mass but no frillsSweet spot: enough for real use and critical mass but no frills

XML Web Services: interoperability, tuned for performanceXML Web Services: interoperability, tuned for performanceComponent Based RTOSComponent Based RTOSStandard protocols: TCP/IP, SOAP, PKCS#1, etc.Standard protocols: TCP/IP, SOAP, PKCS#1, etc..NET virtual machine for C# games or other extensions.NET virtual machine for C# games or other extensions

Page 13: XML Web Services for Invisible Computing

Invisible Invisible continuedcontinuedInteroperates with ASP+ and SOAP Toolkit on Windows XPClient and server, P2P

Complete TCP/IP, HTTP, SOAP, Automation, discovery, trust & security, RTOS (dynamic memory, threads, etc), drivers, application with complex data.

Runs in computer with 32KB of RAM, 256KB of ROM.Fewer components smaller footprint. TCP/IP is biggest hog. Crypto not optimized for size.

Page 14: XML Web Services for Invisible Computing

OutlineOutline

The goals of Invisible ComputingThe goals of Invisible ComputingWhy Web Services?Why Web Services?Our approachOur approach

Table driven serializationTable driven serializationDistributed real-timeDistributed real-timeTrust and secure discoveryTrust and secure discoveryComponentized RTOSComponentized RTOSReal-time C#Real-time C#

Developing code for small devicesDeveloping code for small devicesEducational & research opportunitiesEducational & research opportunitiesAvailabilityAvailability

Page 15: XML Web Services for Invisible Computing

Table Driven SerializationTable Driven SerializationProcesses messages automatically Processes messages automatically according to descriptionaccording to descriptionXML metadata descriptionXML metadata description

Compiled offline into compact descriptionCompiled offline into compact descriptionExtensible at runtimeExtensible at runtime

Process while receivingProcess while receivingZero copy networkingZero copy networking

Serializer & parser share buffers with network stack & cryptoSerializer & parser share buffers with network stack & crypto

COM-Lite automationCOM-Lite automationTurns messages into object callsTurns messages into object callsMultiple methods in one messageMultiple methods in one message

Multiple transports and encodingsMultiple transports and encodingsUDP, HTTP, Encryption, CompressionUDP, HTTP, Encryption, CompressionRouting, roles, and conversionRouting, roles, and conversion

Page 16: XML Web Services for Invisible Computing

Distributed Real-TimeDistributed Real-TimeExperiment in distributed schedulingExperiment in distributed scheduling

Real-time data-flowReal-time data-flow

Instigator

Producer

Consumer

Sensor readings

Scheduling

Scheduling

Sampling

Page 17: XML Web Services for Invisible Computing

Real-Time Real-Time continuedcontinued

Serialize scheduling trees into XMLSerialize scheduling trees into XMLReservations pre-declare future activity at Reservations pre-declare future activity at each nodeeach nodeInstigator of activity orchestrates and tunes Instigator of activity orchestrates and tunes reservations based on feedback samplesreservations based on feedback samplesWorker nodes accept/reject schedulesWorker nodes accept/reject schedules

Merge of trees. Location independent. Could Merge of trees. Location independent. Could write scheduler in XSL.write scheduler in XSL.Coordinated schedules allow shared Coordinated schedules allow shared resource scheduling. Could turn off radio.resource scheduling. Could turn off radio.Statistical decision makingStatistical decision making

Confidence test, quality control sampling Confidence test, quality control sampling schedules, probability based admission controlschedules, probability based admission control

Concept demo shown at booth #31Concept demo shown at booth #31

Page 18: XML Web Services for Invisible Computing

Real-Time Real-Time continuedcontinued

<rs:task xmlns:rs=<rs:task xmlns:rs=http://tempuri.org/X-Reservationhttp://tempuri.org/X-Reservation name=“sense1”> name=“sense1”> <rs:reservation name=“producer” deadLine=“2004-12-31T00:00:00.5Z“<rs:reservation name=“producer” deadLine=“2004-12-31T00:00:00.5Z“ tolerance="P456S“ duration="P0.1S">tolerance="P456S“ duration="P0.1S"> <rs:resource name=“cpu"><rs:resource name=“cpu"> <rs:quantity><rs:quantity>2002000</rs:quantity>0</rs:quantity> </rs:resource></rs:resource> <rs:resource name=“<rs:resource name=“RF-transmitter-1RF-transmitter-1">"> <rs:quantity>77</rs:quantity><rs:quantity>77</rs:quantity> </rs:resource></rs:resource> </rs:reservation></rs:reservation> <rs:reservation name=“consumer" deadLine="2004-12-31T00:00:00.2Z“<rs:reservation name=“consumer" deadLine="2004-12-31T00:00:00.2Z“ tolerance="P82S" duration="P0.1S">tolerance="P82S" duration="P0.1S"> <rs:resource name=“<rs:resource name=“RF-receiverRF-receiver">"> <rs:quantity><rs:quantity>100100</rs:quantity></rs:quantity> </rs:resource></rs:resource></rs:reservation></rs:reservation></rs:task></rs:task>

Serialized reservation exampleSerialized reservation example

Triggers, sub-reservations, resource estimates, tolerancesTriggers, sub-reservations, resource estimates, tolerances

Page 19: XML Web Services for Invisible Computing

A Secure Invisible HomeA Secure Invisible Home

Page 20: XML Web Services for Invisible Computing

Setting up a Secure HomeSetting up a Secure HomeCreate house authority, e.g. usbkeyCreate house authority, e.g. usbkeyTouch each device once with usbkeyTouch each device once with usbkey

Admits device into trust domainAdmits device into trust domainDetermines functional relationships Determines functional relationships heuristicallyheuristically

Discovery process finds device with Discovery process finds device with desired function + does key exchangedesired function + does key exchange

House authority can be offlineHouse authority can be offlineRSA + AESRSA + AES

Write hash of house authority’s key on Write hash of house authority’s key on check to establish trust with bankcheck to establish trust with bank

Federation of independent trust domainsFederation of independent trust domains

Page 21: XML Web Services for Invisible Computing

Trust and DiscoveryTrust and DiscoverySimple SOAP based trust and service discovery for ad hoc networks

Integrate trust and functional setupIntegrate key exchange with discoverySimple user interactionNo external CA required

Use Global XML Architecture when infrastructure presentOptimized for cluster of nodes. Base station (PC) deals with global issuesPKI works on small devices (but can be boosted)

13s RSA decrypt, 0.03s AES on 25MHz Arm7FPGA takes times down by factors of 3000 and 10000 (3ms & 2µs)

Strong crypto necessary for marketabilityStrong crypto necessary for marketabilityWould people buy surveillance equipment against Would people buy surveillance equipment against themselves?themselves?

Page 22: XML Web Services for Invisible Computing

RTOS ArchitectureRTOS ArchitectureSupport for web services on a chip

General purpose in the abstract. Code and interface reuse.

Special in the concrete. Only take what you need.

Component BasedObjects everywhereCOM interfacesUnified namespaceSame interfaces implemented by many componentsMultiple implementations of any component

Specialized to taskPay as you goLate binding and mutationAdaptive to changing requirements

Real-time scheduling with application feedbackXML based configuration and communication

Page 23: XML Web Services for Invisible Computing

RTOS RTOS continuedcontinued

Hardware platformsARM (many), i386, H8, MIPS, TriMedia, Map1000, 68k, eCOG1Numerous development boards. Prototype gadgets. Smart I/O cards

Can be compiled with numerous compilersROM sizes e.g. 10KB, 20KB, 200KB on ARM; 26KB, 240KB on x86Power e.g. 40mW on 5x7 cm 2.8V ARM board with LCD when playing a simple game (snake)

Page 24: XML Web Services for Invisible Computing

It Still Has to be It Still Has to be Small!Small!

WinXp

Invisible

Page 25: XML Web Services for Invisible Computing

Real-Time C#Real-Time C#CLR desirable option for embedded CLR desirable option for embedded systemssystems

Great for extensions, games, appsGreat for extensions, games, apps

Not practical as the exclusive solution Not practical as the exclusive solution in embedded systemsin embedded systems

Our real-time scheduling extensionsOur real-time scheduling extensions

Prototype API implementedPrototype API implemented

Work Item Scheduler allows mixing Work Item Scheduler allows mixing native and managed threadsnative and managed threads

Native execution stacks are multiplexedNative execution stacks are multiplexed

Page 26: XML Web Services for Invisible Computing

OutlineOutline

The goals of Invisible ComputingThe goals of Invisible ComputingWhy Web Services?Why Web Services?Our approachOur approach

Table driven serializationTable driven serializationDistributed real-timeDistributed real-timeTrust and secure discoveryTrust and secure discoveryComponentized RTOSComponentized RTOSReal-time C#Real-time C#

Developing code for small devicesDeveloping code for small devicesEducational & research opportunitiesEducational & research opportunitiesAvailabilityAvailability

Page 27: XML Web Services for Invisible Computing

Developing CodeDeveloping Codefor embedded systems using Microsoft Invisible Computingfor embedded systems using Microsoft Invisible Computing

Start with emulation, then simulation, and Start with emulation, then simulation, and finally real hardwarefinally real hardware

Debugging on real embedded h/w painfulDebugging on real embedded h/w painful minimize time spent on thisminimize time spent on this

All MS Invisible Computing environments have All MS Invisible Computing environments have the same interfaces and basic configurationsthe same interfaces and basic configurations1.1. WinbigWinbig

2.2. NTUNTU

3.3. GianoGiano

4.4. BoardsBoards

Page 28: XML Web Services for Invisible Computing

1 – Winbig1 – Winbig

Runs on Windows XPRuns on Windows XP

Uses XP sockets, threads, filesUses XP sockets, threads, files

i386 binariesi386 binaries

Pleasant development underPleasant development underVisual StudioVisual Studio

Smallest SOAP stack for Windows XPSmallest SOAP stack for Windows XP

““big” is the configuration where big” is the configuration where everything is linked togethereverything is linked together usually used for ROM images usually used for ROM images

Page 29: XML Web Services for Invisible Computing

2 – NTU2 – NTU

Runs on Windows with i386 binariesRuns on Windows with i386 binaries

Implements its own threads and Implements its own threads and scheduling, etc.scheduling, etc.

Closer to real thingCloser to real thingOne thread for “CPU”, one for “timer chip”One thread for “CPU”, one for “timer chip”

Enables debugging network stack and Enables debugging network stack and scheduler under Visual Studioscheduler under Visual Studio

Page 30: XML Web Services for Invisible Computing

3 – Giano3 – Giano

Hardware simulatorHardware simulator

Interprets ARM instruction setInterprets ARM instruction set

FPGA simulation enables hardware- FPGA simulation enables hardware- software co-design worksoftware co-design work

Easy to add new “hardware” peripheralsEasy to add new “hardware” peripherals

14 MHz eb63 board on fast PC14 MHz eb63 board on fast PC

Easier to work with than real boardsEasier to work with than real boards

Extremely close to real hardware,Extremely close to real hardware,except for real-world interactions except for real-world interactions (e.g. no (e.g. no A/D pins)A/D pins)

Page 31: XML Web Services for Invisible Computing

4 – Boards4 – Boards

Real boards test actual hardwareReal boards test actual hardware– reality check– reality check

Development boards still not exactly Development boards still not exactly the same as a real productthe same as a real productAnother step closerAnother step closer

Instrumentation and monitoring Instrumentation and monitoring through FPGA co-boardthrough FPGA co-board

JTAG debugging, still unpleasantJTAG debugging, still unpleasant

Most software development done in Most software development done in simulators – very little left to do heresimulators – very little left to do here

Page 32: XML Web Services for Invisible Computing

Education and ResearchEducation and Research

Microsoft Invisible Computing is a Microsoft Invisible Computing is a research prototyperesearch prototype

Experiments in seamless computing Experiments in seamless computing through embedded web servicesthrough embedded web services

Has been used by academiaHas been used by academiaSteve Liu at Texas A&MSteve Liu at Texas A&M

Open invitation to participateOpen invitation to participate

Page 33: XML Web Services for Invisible Computing

AvailabilityAvailabilityhttp://research.microsoft.com/invisiblehttp://research.microsoft.com/invisible

Community Source License allows Community Source License allows research and education use with few research and education use with few strings attachedstrings attached

New code will be added periodicallyNew code will be added periodically

No support available at this timeNo support available at this time

The work presented in this talk was contributed by The work presented in this talk was contributed by the MSR Invisible Computing Groupthe MSR Invisible Computing Group

Alessandro Forin, Johannes Helander,Alessandro Forin, Johannes Helander,Behnam Neekzad, Stefan SigurdssonBehnam Neekzad, Stefan SigurdssonSpecial thanks:Special thanks: Paul Pham, Yong Xiong Paul Pham, Yong Xiong