ambienttalk
play

AmbientTalk A scripting language for mobile phones Tom Van Cutsem - PowerPoint PPT Presentation

AmbientTalk A scripting language for mobile phones Tom Van Cutsem Software Languages Lab Brussels, Belgium Mobile Ad Hoc Networks 2 Networks of mobile devices that use wireless p2p communication Mobile Ad Hoc Networks 2 Networks of mobile


  1. AmbientTalk A scripting language for mobile phones Tom Van Cutsem Software Languages Lab Brussels, Belgium

  2. Mobile Ad Hoc Networks 2 Networks of mobile devices that use wireless p2p communication

  3. Mobile Ad Hoc Networks 2 Networks of mobile devices that use wireless p2p communication Zero Infrastructure

  4. Mobile Ad Hoc Networks 2 Networks of mobile devices that use wireless p2p communication Zero Volatile Infrastructure Connections

  5. Mobile Ad Hoc Networks 2 Networks of mobile devices that use wireless p2p communication Zero Volatile Infrastructure Connections Local interactions

  6. AmbientTalk: fact sheet 3 • Object-oriented, functional patterns, dynamically typed • Actor-based concurrency/distribution • Mirror-based reflection • JVM as platform • Runs on and J2ME/CDC phones

  7. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  8. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  9. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  10. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  11. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  12. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  13. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  14. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  15. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  16. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  17. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  18. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  19. Four Decades of Language Research 4 Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  20. Four Decades of Language Research 4 ECMAScript Harmony Smalltalk ‘70s-‘80s 1986 AmbientTalk 2006 1997 Scheme 1975 Hewitt’s actors (PLASMA) ABCL ‘73-’76 1986

  21. How does AmbientTalk help? 5 Volatile Connections Asynchronous, buffered messaging send messages, even when disconnected No blocking synchronization receive events, even when disconnected Network failures ≠ exceptions timeouts & leasing, whether connected or disconnected Zero Infrastructure Peer-to-peer service discovery protocol decentralized, location-based

  22. Event Loop Concurrency 6 • AmbientTalk programs are event loops • They react to events from the outside world • Inter-event loop communication is asynchronous

  23. Event Loop Concurrency 6 • AmbientTalk programs are event loops • They react to events from the outside world • Inter-event loop communication is asynchronous Event Loop objects (actor) Message queue

  24. Demo

  25. EchoServer def service := object: { def echo(text) { system.println("Received: "+text); text } } deftype EchoService; def pub := export: service as: EchoService; EchoClient deftype EchoService; def echoF := when: EchoService discovered: { |echoSvc| system.println("Discovered an echo service"); echoSvc; } within: 2.minutes echoF<-echo("test1"); def resultF := echoF<-echo("test2")@TwoWay; when: resultF becomes: { |value| system.println("Reply: " + value); } echoF<-echo("test3");

  26. AmbientTalk = OO + Events 9 Generate and receive obj<-msg(arg) application requests def msg(param) { ... } Follow-up on when: future becomes: { |result| ... } outstanding requests when: type discovered: { |ref| ... } React to services appearing and disappearing when: ref disconnected: { ... } React to references disconnecting, when: ref reconnected: { ... } reconnecting, expiring when: ref expired: { ... }

  27. Urbiflock 10 • P2P Geosocial networking framework • Test deployment on Brussels public transport network

  28. Summary 11 Zero Infrastructure Volatile Connections ad hoc

  29. Summary 11 J2SE 1.5 J2ME CDC Android 1.6 Zero Infrastructure Volatile Connections ad hoc

  30. Summary 11 Non-blocking Disconnections Asynchronous Decentralized ≠ Failures Synchronisation Communication Discovery J2SE 1.5 J2ME CDC Android 1.6 Zero Infrastructure Volatile Connections ad hoc

  31. Interpreter (MIT License) ambienttalk.googlecode.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend