Ubicomp by ewghwehws

VIEWS: 2 PAGES: 19

									A File System for System
Programming in Ubiquitous
Computing




                     Christian Decker, Michael
                     Beigl, Albert Krohn
                     TecO, University of Karlsruhe
                     Institut for Telematics
                     Telecooperation Office (TecO)
                     www.teco.edu
Outline
 Ubiquitous Computing and Devices

 Development on Ubicomp Devices

 File System Approach

 Applications

 Related Work

 Conclusion




TecO       File System for System Programming in Ubicomp, ARCS 2005   2
Ubiquitous Computing - Ubicomp
 … building aware environments




                   AwareHome
                   (GATech)


Other areas
 Safety applications                                                 AwareOffice
                                                                      (TecO)
 Military applications

TecO       File System for System Programming in Ubicomp, ARCS 2005    3
Embedded Sensor Devices in
Ubicomp




         Motes                          Particles                    Telos



 Limited computing power, 8-bit microcontroller
 Few kilobytes … 512 kilobytes of Flash memory
 Customized radio protocols
 Battery powered
 Extensible by various sensors

TecO      File System for System Programming in Ubicomp, ARCS 2005    4
Ubicomp Development –
State-of-the-Art
Manage a variety of resources, esp. sensors

 Lightweight OS (e.g. TinyOS)
     OS shields resources, e.g. sensors

     No direct access

     Communication through events -> event dispatching




 Library based access models
     Abstract access functions

     Direct access, virtually no overhead




 But… shielding/abstraction causes still confusion


TecO       File System for System Programming in Ubicomp, ARCS 2005   5
Ubicomp Development –
Case Study
 Study comprising of various students, practical courses and
  projects

Findings
 Experience lack
    Huge number of various sensor interfaces

    Developers are stuck to the well-known




 Application complexity
    Developer focus on distributed application logic

    Rich sensor interfaces, poorly used




 Interface breach
     Sensor interfaces similar, only slight difference

     Hard to realize -> debugging


TecO        File System for System Programming in Ubicomp, ARCS 2005   6
File System Approach
Design principles                                                                 Application
 Developer in the center
 Support developer to                       Name                 File System                                          Type
  follow the simplest way                    Space                Operations              File System                 System


 Easy-to-understand
  interfaces -> generic                   Direct Resources                                 Mediated Resources




                                                                                                      Detection
                                                                              Actuators
                                                                  unication
                                           Sensors
                                                        Memory




                                                                                                                      Volume
                                                                   Comm-




                                                                                            Battery
                                                                                            Status
                                                                                                       Shock


                                                                                                                       Audio
                                                                                                                               ...
Support in two ways
 Uniform representation of
  all resources
 Uniform access model                    Hardware
                                           Microphone




                                                                   Frontend
                                                         Memory
                                                                    Radio

                                                                               LEDs
TecO      File System for System Programming in Ubicomp, ARCS 2005                                                7
Resources

                                                     Application



                Name                 File System                                      Type
                Space                Operations              File System             System




             Direct Resources                                 Mediated Resources




                                                                         Detection
                                                 Actuators
                                     unication
              Sensors
                           Memory




                                                                                     Volume
                                      Comm-




                                                               Battery
                                                               Status
                                                                          Shock


                                                                                      Audio
                                                                                              ...




             Hardware
              Microphone




                                      Frontend
                            Memory
                                       Radio

                                                  LEDs




TecO   File System for System Programming in Ubicomp, ARCS 2005                                     8
Resources cont.

                                                     Application



                Name                 File System                                      Type
                Space                Operations              File System             System




             Direct Resources                                 Mediated Resources




                                                                         Detection
                                                 Actuators
                                     unication
              Sensors
                           Memory




                                                                                     Volume
                                      Comm-




                                                               Battery
                                                               Status
                                                                          Shock


                                                                                      Audio
                                                                                              ...




             Hardware
              Microphone




                                      Frontend
                            Memory
                                       Radio

                                                  LEDs




TecO   File System for System Programming in Ubicomp, ARCS 2005                                     9
Name Space                                          Name
                                                    Space
                                                                         File System
                                                                         Operations              File System
                                                                                                                          Type
                                                                                                                         System




 File = entity identifying a resourceDirect Resources  Mediated Resources




                                                                                                             Detection
                                                                                     Actuators
 Directory = special file identifying collections of files




                                                                         unication
                                                  Sensors
                                                               Memory




                                                                                                                         Volume
                                                                          Comm-




                                                                                                   Battery
                                                                                                   Status
                                                                                                              Shock


                                                                                                                          Audio
                                                                         ...


 Uniform, hierarchical namespace
    /dev/- direct resources, e.g. sensors, memory, power

     supply, communication interfaceHardware




                                                  Microphone
    /context/ - mediated resources, access direct




                                                                          Frontend
                                                                Memory
                                                                           Radio

                                                                                      LEDs
     resources, application functions, algorithms
    /usr/ - data files




TecO        File System for System Programming in Ubicomp, ARCS 2005                                         10
 Access Model                                            Name
                                                         Space
                                                                              File System
                                                                              Operations              File System
                                                                                                                               Type
                                                                                                                              System




 Fundamental operations                   Direct Resources                                             Mediated Resources
  read(..) and write(..) – data transfer operations




                                                                                                                  Detection
                                                                                          Actuators
                                                                              unication
                                                       Sensors
                                                                    Memory




                                                                                                                              Volume
                                                                               Comm-




                                                                                                        Battery
                                                                                                        Status
                                                                                                                   Shock


                                                                                                                               Audio
  Resources are coupled with specific r/w methods                                                                                     ...

Resource     Resource name       Type     Read      Write                                 VoltageSensorGet(int &v)
identifier
                                                                                          {
1            /dev/voltage        3        pFunc     pFunc
                                                     Hardware                             ...
...
                                                                                          }
 Example: read(1, buf, 1)




                                                       Microphone




                                                                               Frontend
                                                                     Memory
                                                                                Radio

                                                                                           LEDs
                                                                                          NOP()
 Additional operations                                                                    {
  open(..)
                                                                                          ;
  mount(..)/umount(..)
                                                                                          }
  getType(..)
 Type System
  Type of resource, developer decides
  Compatibility in resource combinations

 TecO            File System for System Programming in Ubicomp, ARCS 2005                                         11
Particle File System
 File system for Particle platform
  (Ubicomp device, sensor network)
 18f6720 PIC microcontroller
 128KB FlashROM, 4KB RAM,
  512KB external Flash

Resources
 Memory – 512KB Flash
 Power supply – AAA battery
 Wireless communication
 Sensors – acceleration, light, force, temperature, audio,
  ball switch
 Actuators – LEDs, speaker

TecO       File System for System Programming in Ubicomp, ARCS 2005   12
     Application: Telnet

     “/context/telnet/less /usr/file1“                    Command         Telnet Server             Command
                                                           Parser                                   Interpreter
     Telnet Client
                                                                                        /context/telnet/less
                                                                        ParticleFS
                                                                                       /usr/file1

               Telnet Proxy                              /dev/comm       /dev/eMem

                Command
                 Parser
                                                        Communication     Memory
                                                                                          file1          less
                 Particle         Wireless
                                             Wireless      Stack           Driver
              Communication       Network
PC               Module
                                             Network               Direct
                                                                 Resources             Mediated Resources

      UDP Network
        ...                     ...                                        External
                                                         RF Frontend
                                                                            Flash
                       Bridge                                    Hardware


                                                                                      Particle

     TecO             File System for System Programming in Ubicomp, ARCS 2005                                  13
           Application: Telnet cont.
                                                                        Telnet application
                  Command       Telnet Server            Command         combines resources
                   Parser                                Interpreter
                                                                        “context/telnet/less“ is
                                             /context/telnet/less        a resource
                              ParticleFS
                                            /usr/file1                  Application function
                  /dev/comm    /dev/eMem                                 represented in the file
                                                                         system
             Communication      Memory
                                                                        “less” checks for type of
                                                                         argument
                                                file1         less
Wireless        Stack            Driver
Network                    Direct
                         Resources          Mediated Resources          “less” denies access to
                                                                         /dev/accl, but grants
                                 External
                                                                         access to /usr/file1
              RF Frontend
                                  Flash
                         Hardware




           TecO                File System for System Programming in Ubicomp, ARCS 2005       14
Application: Over-the-Air-
Programming
 Programming is file copy!
                                                                FTP Proxy




         Compiled
         Program




                                                                    Network




                      Bridge
                                                     Particle
TecO     File System for System Programming in Ubicomp, ARCS 2005             15
Performance
File system
 ~1900 bytes RAM
 ~2100 bytes ROM
File library
 ~10 kilobytes ROM

Access overhead
 *buf = f()
     Call + store result

     26 instruction cycles

 read(fd,buf,1)
     lookup for function pointers + call + store result

     More parameters

     100 instruction cycles



TecO       File System for System Programming in Ubicomp, ARCS 2005   16
Related Work
Plan9
 All resources are files and accessed like files
 Client/server concept

Dynamo, Context-aware file system (CFS)
 Middleware and infrastructure solutions
 Context-based sharing and visibility of data
 PDA like devices

MatchBox, Micro-ROM
 File systems for small embedded sensor devices
 Only for data storage in files


TecO       File System for System Programming in Ubicomp, ARCS 2005   17
Conclusion and Outlook
File system
 Uniform resource representation (direct/mediated)
 Uniform access on resources (read/write)
 Combining resources (compatibility by type system)
 Implementation on embedded sensor system (ParticleFS)
 Applications: Telnet + Over-the-Air-Programming

Future work
 Unblocking resource access
 Represent remote resources
 Shell/Macroprogramming




TecO      File System for System Programming in Ubicomp, ARCS 2005   18
Thank you




                       Q&A


TecO   File System for System Programming in Ubicomp, ARCS 2005   19

								
To top