SlideShare una empresa de Scribd logo
1 de 79
Descargar para leer sin conexión
Distributed Object-Oriented Programming with
      RFID Technology
      Andoni Lombide Carreton, Kevin Pinte and Wolfgang De Meuter




      Department of Computer Science
      Vrije Universiteit Brussel

      10th IFIP International Conference on Distributed Applications and Interoperable Systems
      June 7-10 2010
      Amsterdam, the Netherlands                                                                 1

Monday 7 June 2010
Mobile RFID-enabled Applications




                                         2

Monday 7 June 2010
Mobile RFID-enabled Applications




                                         Mobile devices




                                                          2

Monday 7 June 2010
Mobile RFID-enabled Applications

                                         Mobile devices




                                                     2

Monday 7 June 2010
Mobile RFID-enabled Applications

                                                    Mobile devices




                                         Intermittent connectivity




                                                                     2

Monday 7 June 2010
Mobile RFID-enabled Applications

                                                    Mobile devices




              Spontaneous interactions



                                         Intermittent connectivity




                                                                     2

Monday 7 June 2010
Mobile RFID-enabled Applications
                     Scarce infrastructure
                                                        Mobile devices




              Spontaneous interactions



                                             Intermittent connectivity




                                                                         2

Monday 7 June 2010
Mobile RFID-enabled Applications
                     Scarce infrastructure
                                                        Mobile devices



Representation of physical objects




              Spontaneous interactions



                                             Intermittent connectivity




                                                                         2

Monday 7 June 2010
5 Requirements

      • Addressing physical objects (“things”)


      • Storing application objects on RFID tags


      • Reactivity to appearing and disappearing “things”


      • Asynchronous communication with “things”


      • Fault-tolerant communication




                                                            3

Monday 7 June 2010
5 Requirements

      • Addressing physical objects (“things”)


      • Storing application objects on RFID tags


      • Reactivity to appearing and disappearing “things”


      • Asynchronous communication with “things”


      • Fault-tolerant communication




                                                            3

Monday 7 June 2010
5 Requirements

      • Addressing physical objects (“things”)


      • Storing application objects on RFID tags


      • Reactivity to appearing and disappearing “things”


      • Asynchronous communication with “things”


      • Fault-tolerant communication




                                                            3

Monday 7 June 2010
Assumes no       Non-blocking
               infrastructure   communication




                Classless       Dynamic object
               object model       discovery


                                                 4

Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              5




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              5




        Event Loop




 Message queue




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              5




                     ‘local’ object




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                               5




                             ‘remote’ object




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              6




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              6


                     “do m immediately”



                           obj.m()

                     obj




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                                  6


                              “do m eventually”



                           obj<-m()




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                                  6


                              “do m eventually”



                           obj<-m()




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                              6




                       ?
                     future




Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                                         6




                       ?
                     future




                       when: future becomes: { |value|
                         // process reply
                       }


Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
                                                         6




                       ?
                     future




                       when: future becomes: { |value|
                         // process reply
                       }


Monday 7 June 2010
Exporting & discovering objects
                                                  7




                                        mplayer




Monday 7 June 2010
Exporting & discovering objects
                                                          7




                                        mplayer




              deftype MusicPlayer   deftype MusicPlayer




Monday 7 June 2010
Exporting & discovering objects
                                                                 7




                                            mplayer




              deftype MusicPlayer        deftype MusicPlayer

                                    export: mplayer as: MusicPlayer




Monday 7 June 2010
Exporting & discovering objects
                                                                   7




                                               mplayer




              deftype MusicPlayer           deftype MusicPlayer

                                      export: mplayer as: MusicPlayer


     whenever: MusicPlayer discovered: { |mplayer|
       // open a session
     }

Monday 7 June 2010
Exporting & discovering objects
                                                                   7




                                               mplayer




              deftype MusicPlayer           deftype MusicPlayer

                                      export: mplayer as: MusicPlayer


     whenever: MusicPlayer discovered: { |mplayer|
       // open a session
     }

Monday 7 June 2010
Far References
                                                                           8




                       uploadSong



                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
Far References
                                                                           8




                       uploadSong



                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
Far References
                                                                           8




                       uploadSong



                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
Far References
                                                                           8




                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
Far References
                                                                           8




                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
Far References
                                                                           8




                                                       session




              when: session<-uploadSong(s)@Due(timeout) becomes: { |ack|
                // continue exchange
              } catch: TimeoutException using: { |e|
                // stop exchange
              }
Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
RFID and AmbientTalk




                                       RFID event loop



                             Hardware Abstraction Layer




                                                          9

Monday 7 June 2010
Addressing physical objects as software objects

    deftype Book;

    def aBook := object: {
      def isbn := 123;
      def title := “My book”;
      def reviews := Vector.new();
                                                      RFID event loop
         def setTitle(newTitle)@Mutator {
            title := newTitle;
         };
                                            Hardware Abstraction Layer
      def addReview(review)@Mutator {
         reviews.add(review);
      };
    } taggedAs: Book;

                                                                         10

Monday 7 June 2010
Addressing physical objects as software objects

    deftype Book;

    def aBook := object: {
      def isbn := 123;
      def title := “My book”;
      def reviews := Vector.new();
                                                      RFID event loop
         def setTitle(newTitle)@Mutator {
            title := newTitle;
         };
                                            Hardware Abstraction Layer
      def addReview(review)@Mutator {
         reviews.add(review);
      };
    } taggedAs: Book;

                                                                         10

Monday 7 June 2010
Storing objects on RFID tags


                                     tag
                     aBook




                                                     RFID event loop

     def aBook := object: { ... };
                                           Hardware Abstraction Layer
     when: BlankTag discovered: { |tag|
       when: tag<-initialize(aBook)
         becomes: { |bookReference|
           // ...
         }
     }                                                                  11

Monday 7 June 2010
Storing objects on RFID tags


                                     tag
                     aBook




                                                     RFID event loop

     def aBook := object: { ... };
                                           Hardware Abstraction Layer
     when: BlankTag discovered: { |tag|
       when: tag<-initialize(aBook)
         becomes: { |bookReference|
           // ...
         }
     }                                                                  11

Monday 7 June 2010
Storing objects on RFID tags


                                     tag
                     aBook




                                                     RFID event loop

     def aBook := object: { ... };
                                           Hardware Abstraction Layer
     when: BlankTag discovered: { |tag|
       when: tag<-initialize(aBook)
         becomes: { |bookReference|
           // ...
         }
     }                                                                  11

Monday 7 June 2010
Storing objects on RFID tags


                                     tag
                     aBook
                                bookRe
                                      ference



                                                          RFID event loop

     def aBook := object: { ... };
                                                Hardware Abstraction Layer
     when: BlankTag discovered: { |tag|
       when: tag<-initialize(aBook)
         becomes: { |bookReference|
           // ...
         }
     }                                                                       11

Monday 7 June 2010
Reactivity to appearing and disappearing objects




                                                   RFID event loop

   whenever: Book discovered: { |book|
     // React on appearance
     whenever: book disconnected: {      Hardware Abstraction Layer
       // React on disappearance
     }
     whenever: book reconnected: {
       // React on reappearance
     }
                                                                      12
   }
Monday 7 June 2010
Reactivity to appearing and disappearing objects




                                                   RFID event loop

   whenever: Book discovered: { |book|
     // React on appearance
     whenever: book disconnected: {      Hardware Abstraction Layer
       // React on disappearance
     }
     whenever: book reconnected: {
       // React on reappearance
     }
                                                                      12
   }
Monday 7 June 2010
Reactivity to appearing and disappearing objects




                                                   RFID event loop

   whenever: Book discovered: { |book|
     // React on appearance
     whenever: book disconnected: {      Hardware Abstraction Layer
       // React on disappearance
     }
     whenever: book reconnected: {
       // React on reappearance
     }
                                                                      12
   }
Monday 7 June 2010
Reactivity to appearing and disappearing objects




                                                   RFID event loop

   whenever: Book discovered: { |book|
     // React on appearance
     whenever: book disconnected: {      Hardware Abstraction Layer
       // React on disappearance
     }
     whenever: book reconnected: {
       // React on reappearance
     }
                                                                      12
   }
Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Asynchronous communication




                                                     RFID event loop



  when: book<-getTitle()                   Hardware Abstraction Layer
    becomes: { |title|
       system.println(“TITLE: “ + title)
    };
  system.println(“Here first!”);

                                                                        13

Monday 7 June 2010
Fault-tolerant communication




                                                         RFID event loop



 def myReview := “Not for beginners”;
                                               Hardware Abstraction Layer
 when: book<-addReview(myReview)@Due(10.seconds)
   becomes: { |ack|
     // Message processed successfully
   } catch: TimeoutException using: { |exc|
     // Message timed out
   }                                                                        14

Monday 7 June 2010
Fault-tolerant communication




                                                         RFID event loop



 def myReview := “Not for beginners”;
                                               Hardware Abstraction Layer
 when: book<-addReview(myReview)@Due(10.seconds)
   becomes: { |ack|
     // Message processed successfully
   } catch: TimeoutException using: { |exc|
     // Message timed out
   }                                                                        14

Monday 7 June 2010
Fault-tolerant communication




                                                         RFID event loop



 def myReview := “Not for beginners”;
                                               Hardware Abstraction Layer
 when: book<-addReview(myReview)@Due(10.seconds)
   becomes: { |ack|
     // Message processed successfully
   } catch: TimeoutException using: { |exc|
     // Message timed out
   }                                                                        14

Monday 7 June 2010
Addressing groups of RFID-tagged objects




              def books := ambient: Book;

              def computerScienceBooks := ambient: Book where: { |b|
                 b.category == “Computer Science”
              };

              def shelfFuture := computerScienceBooks<-getShelf()@Any;
              when: shelfFuture becomes: { |shelf|
                 system.println(“Place the book in shelf: “ + shelf);
              };

              computerScienceBook<-setShelf(“5D”)@[ All, Sustain ];      15

Monday 7 June 2010
Addressing groups of RFID-tagged objects




              def books := ambient: Book;

              def computerScienceBooks := ambient: Book where: { |b|
                 b.category == “Computer Science”
              };

              def shelfFuture := computerScienceBooks<-getShelf()@Any;
              when: shelfFuture becomes: { |shelf|
                 system.println(“Place the book in shelf: “ + shelf);
              };

              computerScienceBook<-setShelf(“5D”)@[ All, Sustain ];      15

Monday 7 June 2010
Addressing groups of RFID-tagged objects




              def books := ambient: Book;

              def computerScienceBooks := ambient: Book where: { |b|
                 b.category == “Computer Science”
              };

              def shelfFuture := computerScienceBooks<-getShelf()@Any;
              when: shelfFuture becomes: { |shelf|
                 system.println(“Place the book in shelf: “ + shelf);
              };

              computerScienceBook<-setShelf(“5D”)@[ All, Sustain ];      15

Monday 7 June 2010
Addressing groups of RFID-tagged objects




              def books := ambient: Book;

              def computerScienceBooks := ambient: Book where: { |b|
                 b.category == “Computer Science”
              };

              def shelfFuture := computerScienceBooks<-getShelf()@Any;
              when: shelfFuture becomes: { |shelf|
                 system.println(“Place the book in shelf: “ + shelf);
              };

              computerScienceBook<-setShelf(“5D”)@[ All, Sustain ];      15

Monday 7 June 2010
Addressing groups of RFID-tagged objects




              def books := ambient: Book;

              def computerScienceBooks := ambient: Book where: { |b|
                 b.category == “Computer Science”
              };

              def shelfFuture := computerScienceBooks<-getShelf()@Any;
              when: shelfFuture becomes: { |shelf|
                 system.println(“Place the book in shelf: “ + shelf);
              };

              computerScienceBook<-setShelf(“5D”)@[ All, Sustain ];      15

Monday 7 June 2010
16

Monday 7 June 2010
17

Monday 7 June 2010
Implementation




                        RFID hardware level
                     RFID Hardware Abstraction Layer
                                                       18

Monday 7 June 2010
Implementation




                       Java RFID library level
                                  JNI

                        RFID hardware level
                     RFID Hardware Abstraction Layer
                                                       18

Monday 7 June 2010
Implementation




                                                       public class Transponder {
                       Java RFID library level         }
                                                           ...


                                  JNI

                        RFID hardware level
                     RFID Hardware Abstraction Layer
                                                                                    18

Monday 7 June 2010
Implementation




                       AT RFID Event Loop
                               Symbiosis
                                                       public class Transponder {
                       Java RFID library level         }
                                                           ...


                                  JNI

                        RFID hardware level
                     RFID Hardware Abstraction Layer
                                                                                    18

Monday 7 June 2010
Implementation




                                                       when: tag<-getSerial() becomes: { |nr|
                       AT RFID Event Loop              }
                                                           ...


                               Symbiosis
                                                       public class Transponder {
                       Java RFID library level         }
                                                           ...


                                  JNI

                        RFID hardware level
                     RFID Hardware Abstraction Layer
                                                                                         18

Monday 7 June 2010
Implementation


                                Thing level
                     Object serialization/backend connection
                                                          when: tag<-getSerial() becomes: { |nr|
                         AT RFID Event Loop               }
                                                              ...


                                  Symbiosis
                                                          public class Transponder {
                        Java RFID library level           }
                                                              ...


                                     JNI

                          RFID hardware level
                      RFID Hardware Abstraction Layer
                                                                                            18

Monday 7 June 2010
Implementation


                                Thing level               book<-setTitle(“Title”);


                     Object serialization/backend connection
                                                          when: tag<-getSerial() becomes: { |nr|
                         AT RFID Event Loop               }
                                                              ...


                                  Symbiosis
                                                          public class Transponder {
                        Java RFID library level           }
                                                              ...


                                     JNI

                          RFID hardware level
                      RFID Hardware Abstraction Layer
                                                                                            18

Monday 7 June 2010
Limitations and Future Work

      • Processing RFID events happens sequentially within one event loop. May
        lead to performance problems in very large systems?


      • No data protection when multiple RFID devices write to tags concurrently.


      • Efficient serialization of proxy objects is work in progress. For cheap passive
        tags, we need to fit the data on ~8K of memory.


      • New generation of active RFID hardware may provide solutions.




                                                                                         19

Monday 7 June 2010
Conclusion

      • Represent RFID-tagged things as true mutable proxy objects in an object-
        oriented system.


      • Reactivity to appearing and disappearing things.


      • Asynchronous and fault-tolerant communication.


      • Addressing and communicating with groups of intensionally described things.




                http://soft.vub.ac.be/soft/research/amopcop                           20

Monday 7 June 2010

Más contenido relacionado

Similar a AmbientTalk Rfid Dais2010

M.Malone Simple Geo @ Social Developers Summit
M.Malone Simple Geo @ Social Developers SummitM.Malone Simple Geo @ Social Developers Summit
M.Malone Simple Geo @ Social Developers SummitMediabistro
 
The Knowledge Hub (NWEGG presentation)
The Knowledge Hub (NWEGG presentation)The Knowledge Hub (NWEGG presentation)
The Knowledge Hub (NWEGG presentation)Ingrid Koehler
 
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerNETWAYS
 
OSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartOSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartRonny
 
T-DOSE 2010 - Agile Enterprise, CLouds and Devops
T-DOSE 2010 - Agile Enterprise, CLouds and DevopsT-DOSE 2010 - Agile Enterprise, CLouds and Devops
T-DOSE 2010 - Agile Enterprise, CLouds and DevopsChef Software, Inc.
 
Akka scalaliftoff london_2010
Akka scalaliftoff london_2010Akka scalaliftoff london_2010
Akka scalaliftoff london_2010Skills Matter
 
Human APIs - expanding the mobile web or are robots coming to JavaScript?
Human APIs - expanding the mobile web or are robots coming to JavaScript? Human APIs - expanding the mobile web or are robots coming to JavaScript?
Human APIs - expanding the mobile web or are robots coming to JavaScript? Nikolai Onken
 
Better Quality through Scrum
Better Quality through ScrumBetter Quality through Scrum
Better Quality through ScrumDominik Jungowski
 
Turning That UX Frown Upside Down
Turning That UX Frown Upside DownTurning That UX Frown Upside Down
Turning That UX Frown Upside DownSteve Fisher
 
Maximising value of social media
Maximising value of social mediaMaximising value of social media
Maximising value of social mediaIngrid Koehler
 
Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Skills Matter
 
Human APIs, the future of mobile
Human APIs, the future of mobileHuman APIs, the future of mobile
Human APIs, the future of mobileNikolai Onken
 
Scientific Applications with Python
Scientific Applications with PythonScientific Applications with Python
Scientific Applications with PythonEnthought, Inc.
 

Similar a AmbientTalk Rfid Dais2010 (19)

M.Malone Simple Geo @ Social Developers Summit
M.Malone Simple Geo @ Social Developers SummitM.Malone Simple Geo @ Social Developers Summit
M.Malone Simple Geo @ Social Developers Summit
 
The Knowledge Hub (NWEGG presentation)
The Knowledge Hub (NWEGG presentation)The Knowledge Hub (NWEGG presentation)
The Knowledge Hub (NWEGG presentation)
 
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
 
OSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartOSMC2010 Open NMS Kickstart
OSMC2010 Open NMS Kickstart
 
T-DOSE 2010 - Agile Enterprise, CLouds and Devops
T-DOSE 2010 - Agile Enterprise, CLouds and DevopsT-DOSE 2010 - Agile Enterprise, CLouds and Devops
T-DOSE 2010 - Agile Enterprise, CLouds and Devops
 
Vidivideo and IM3I
Vidivideo and IM3IVidivideo and IM3I
Vidivideo and IM3I
 
Visualizing Objects and Memory Usage
Visualizing Objects and Memory UsageVisualizing Objects and Memory Usage
Visualizing Objects and Memory Usage
 
Railsconf 2010
Railsconf 2010Railsconf 2010
Railsconf 2010
 
Akka scalaliftoff london_2010
Akka scalaliftoff london_2010Akka scalaliftoff london_2010
Akka scalaliftoff london_2010
 
Human APIs - expanding the mobile web or are robots coming to JavaScript?
Human APIs - expanding the mobile web or are robots coming to JavaScript? Human APIs - expanding the mobile web or are robots coming to JavaScript?
Human APIs - expanding the mobile web or are robots coming to JavaScript?
 
Better Quality through Scrum
Better Quality through ScrumBetter Quality through Scrum
Better Quality through Scrum
 
Turning That UX Frown Upside Down
Turning That UX Frown Upside DownTurning That UX Frown Upside Down
Turning That UX Frown Upside Down
 
Maximising value of social media
Maximising value of social mediaMaximising value of social media
Maximising value of social media
 
OpenSocial Done Right
OpenSocial Done RightOpenSocial Done Right
OpenSocial Done Right
 
More! @ ED-MEDIA
More! @ ED-MEDIAMore! @ ED-MEDIA
More! @ ED-MEDIA
 
Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06
 
Human APIs, the future of mobile
Human APIs, the future of mobileHuman APIs, the future of mobile
Human APIs, the future of mobile
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
 
Scientific Applications with Python
Scientific Applications with PythonScientific Applications with Python
Scientific Applications with Python
 

AmbientTalk Rfid Dais2010

  • 1. Distributed Object-Oriented Programming with RFID Technology Andoni Lombide Carreton, Kevin Pinte and Wolfgang De Meuter Department of Computer Science Vrije Universiteit Brussel 10th IFIP International Conference on Distributed Applications and Interoperable Systems June 7-10 2010 Amsterdam, the Netherlands 1 Monday 7 June 2010
  • 2. Mobile RFID-enabled Applications 2 Monday 7 June 2010
  • 3. Mobile RFID-enabled Applications Mobile devices 2 Monday 7 June 2010
  • 4. Mobile RFID-enabled Applications Mobile devices 2 Monday 7 June 2010
  • 5. Mobile RFID-enabled Applications Mobile devices Intermittent connectivity 2 Monday 7 June 2010
  • 6. Mobile RFID-enabled Applications Mobile devices Spontaneous interactions Intermittent connectivity 2 Monday 7 June 2010
  • 7. Mobile RFID-enabled Applications Scarce infrastructure Mobile devices Spontaneous interactions Intermittent connectivity 2 Monday 7 June 2010
  • 8. Mobile RFID-enabled Applications Scarce infrastructure Mobile devices Representation of physical objects Spontaneous interactions Intermittent connectivity 2 Monday 7 June 2010
  • 9. 5 Requirements • Addressing physical objects (“things”) • Storing application objects on RFID tags • Reactivity to appearing and disappearing “things” • Asynchronous communication with “things” • Fault-tolerant communication 3 Monday 7 June 2010
  • 10. 5 Requirements • Addressing physical objects (“things”) • Storing application objects on RFID tags • Reactivity to appearing and disappearing “things” • Asynchronous communication with “things” • Fault-tolerant communication 3 Monday 7 June 2010
  • 11. 5 Requirements • Addressing physical objects (“things”) • Storing application objects on RFID tags • Reactivity to appearing and disappearing “things” • Asynchronous communication with “things” • Fault-tolerant communication 3 Monday 7 June 2010
  • 12. Assumes no Non-blocking infrastructure communication Classless Dynamic object object model discovery 4 Monday 7 June 2010
  • 13. Event Loop Concurrency in AmbientTalk 5 Monday 7 June 2010
  • 14. Event Loop Concurrency in AmbientTalk 5 Event Loop Message queue Monday 7 June 2010
  • 15. Event Loop Concurrency in AmbientTalk 5 ‘local’ object Monday 7 June 2010
  • 16. Event Loop Concurrency in AmbientTalk 5 ‘remote’ object Monday 7 June 2010
  • 17. Event Loop Concurrency in AmbientTalk 6 Monday 7 June 2010
  • 18. Event Loop Concurrency in AmbientTalk 6 “do m immediately” obj.m() obj Monday 7 June 2010
  • 19. Event Loop Concurrency in AmbientTalk 6 “do m eventually” obj<-m() Monday 7 June 2010
  • 20. Event Loop Concurrency in AmbientTalk 6 “do m eventually” obj<-m() Monday 7 June 2010
  • 21. Event Loop Concurrency in AmbientTalk 6 ? future Monday 7 June 2010
  • 22. Event Loop Concurrency in AmbientTalk 6 ? future when: future becomes: { |value| // process reply } Monday 7 June 2010
  • 23. Event Loop Concurrency in AmbientTalk 6 ? future when: future becomes: { |value| // process reply } Monday 7 June 2010
  • 24. Exporting & discovering objects 7 mplayer Monday 7 June 2010
  • 25. Exporting & discovering objects 7 mplayer deftype MusicPlayer deftype MusicPlayer Monday 7 June 2010
  • 26. Exporting & discovering objects 7 mplayer deftype MusicPlayer deftype MusicPlayer export: mplayer as: MusicPlayer Monday 7 June 2010
  • 27. Exporting & discovering objects 7 mplayer deftype MusicPlayer deftype MusicPlayer export: mplayer as: MusicPlayer whenever: MusicPlayer discovered: { |mplayer| // open a session } Monday 7 June 2010
  • 28. Exporting & discovering objects 7 mplayer deftype MusicPlayer deftype MusicPlayer export: mplayer as: MusicPlayer whenever: MusicPlayer discovered: { |mplayer| // open a session } Monday 7 June 2010
  • 29. Far References 8 uploadSong session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 30. Far References 8 uploadSong session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 31. Far References 8 uploadSong session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 32. Far References 8 session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 33. Far References 8 session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 34. Far References 8 session when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange } catch: TimeoutException using: { |e| // stop exchange } Monday 7 June 2010
  • 35. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 36. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 37. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 38. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 39. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 40. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 41. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 42. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 43. RFID and AmbientTalk RFID event loop Hardware Abstraction Layer 9 Monday 7 June 2010
  • 44. Addressing physical objects as software objects deftype Book; def aBook := object: { def isbn := 123; def title := “My book”; def reviews := Vector.new(); RFID event loop def setTitle(newTitle)@Mutator { title := newTitle; }; Hardware Abstraction Layer def addReview(review)@Mutator { reviews.add(review); }; } taggedAs: Book; 10 Monday 7 June 2010
  • 45. Addressing physical objects as software objects deftype Book; def aBook := object: { def isbn := 123; def title := “My book”; def reviews := Vector.new(); RFID event loop def setTitle(newTitle)@Mutator { title := newTitle; }; Hardware Abstraction Layer def addReview(review)@Mutator { reviews.add(review); }; } taggedAs: Book; 10 Monday 7 June 2010
  • 46. Storing objects on RFID tags tag aBook RFID event loop def aBook := object: { ... }; Hardware Abstraction Layer when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... } } 11 Monday 7 June 2010
  • 47. Storing objects on RFID tags tag aBook RFID event loop def aBook := object: { ... }; Hardware Abstraction Layer when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... } } 11 Monday 7 June 2010
  • 48. Storing objects on RFID tags tag aBook RFID event loop def aBook := object: { ... }; Hardware Abstraction Layer when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... } } 11 Monday 7 June 2010
  • 49. Storing objects on RFID tags tag aBook bookRe ference RFID event loop def aBook := object: { ... }; Hardware Abstraction Layer when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... } } 11 Monday 7 June 2010
  • 50. Reactivity to appearing and disappearing objects RFID event loop whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { Hardware Abstraction Layer // React on disappearance } whenever: book reconnected: { // React on reappearance } 12 } Monday 7 June 2010
  • 51. Reactivity to appearing and disappearing objects RFID event loop whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { Hardware Abstraction Layer // React on disappearance } whenever: book reconnected: { // React on reappearance } 12 } Monday 7 June 2010
  • 52. Reactivity to appearing and disappearing objects RFID event loop whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { Hardware Abstraction Layer // React on disappearance } whenever: book reconnected: { // React on reappearance } 12 } Monday 7 June 2010
  • 53. Reactivity to appearing and disappearing objects RFID event loop whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { Hardware Abstraction Layer // React on disappearance } whenever: book reconnected: { // React on reappearance } 12 } Monday 7 June 2010
  • 54. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 55. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 56. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 57. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 58. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 59. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 60. Asynchronous communication RFID event loop when: book<-getTitle() Hardware Abstraction Layer becomes: { |title| system.println(“TITLE: “ + title) }; system.println(“Here first!”); 13 Monday 7 June 2010
  • 61. Fault-tolerant communication RFID event loop def myReview := “Not for beginners”; Hardware Abstraction Layer when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out } 14 Monday 7 June 2010
  • 62. Fault-tolerant communication RFID event loop def myReview := “Not for beginners”; Hardware Abstraction Layer when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out } 14 Monday 7 June 2010
  • 63. Fault-tolerant communication RFID event loop def myReview := “Not for beginners”; Hardware Abstraction Layer when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out } 14 Monday 7 June 2010
  • 64. Addressing groups of RFID-tagged objects def books := ambient: Book; def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science” }; def shelfFuture := computerScienceBooks<-getShelf()@Any; when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf); }; computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15 Monday 7 June 2010
  • 65. Addressing groups of RFID-tagged objects def books := ambient: Book; def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science” }; def shelfFuture := computerScienceBooks<-getShelf()@Any; when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf); }; computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15 Monday 7 June 2010
  • 66. Addressing groups of RFID-tagged objects def books := ambient: Book; def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science” }; def shelfFuture := computerScienceBooks<-getShelf()@Any; when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf); }; computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15 Monday 7 June 2010
  • 67. Addressing groups of RFID-tagged objects def books := ambient: Book; def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science” }; def shelfFuture := computerScienceBooks<-getShelf()@Any; when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf); }; computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15 Monday 7 June 2010
  • 68. Addressing groups of RFID-tagged objects def books := ambient: Book; def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science” }; def shelfFuture := computerScienceBooks<-getShelf()@Any; when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf); }; computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15 Monday 7 June 2010
  • 71. Implementation RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 72. Implementation Java RFID library level JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 73. Implementation public class Transponder { Java RFID library level } ... JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 74. Implementation AT RFID Event Loop Symbiosis public class Transponder { Java RFID library level } ... JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 75. Implementation when: tag<-getSerial() becomes: { |nr| AT RFID Event Loop } ... Symbiosis public class Transponder { Java RFID library level } ... JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 76. Implementation Thing level Object serialization/backend connection when: tag<-getSerial() becomes: { |nr| AT RFID Event Loop } ... Symbiosis public class Transponder { Java RFID library level } ... JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 77. Implementation Thing level book<-setTitle(“Title”); Object serialization/backend connection when: tag<-getSerial() becomes: { |nr| AT RFID Event Loop } ... Symbiosis public class Transponder { Java RFID library level } ... JNI RFID hardware level RFID Hardware Abstraction Layer 18 Monday 7 June 2010
  • 78. Limitations and Future Work • Processing RFID events happens sequentially within one event loop. May lead to performance problems in very large systems? • No data protection when multiple RFID devices write to tags concurrently. • Efficient serialization of proxy objects is work in progress. For cheap passive tags, we need to fit the data on ~8K of memory. • New generation of active RFID hardware may provide solutions. 19 Monday 7 June 2010
  • 79. Conclusion • Represent RFID-tagged things as true mutable proxy objects in an object- oriented system. • Reactivity to appearing and disappearing things. • Asynchronous and fault-tolerant communication. • Addressing and communicating with groups of intensionally described things. http://soft.vub.ac.be/soft/research/amopcop 20 Monday 7 June 2010