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

ambienttalk
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Software Languages Lab Brussels, Belgium

AmbientTalk

Tom Van Cutsem

A scripting language for mobile phones

slide-2
SLIDE 2

Mobile Ad Hoc Networks

Networks of mobile devices that use wireless p2p communication

2

slide-3
SLIDE 3

Mobile Ad Hoc Networks

Networks of mobile devices that use wireless p2p communication

2

Zero Infrastructure

slide-4
SLIDE 4

Mobile Ad Hoc Networks

Networks of mobile devices that use wireless p2p communication

2

Volatile Connections Zero Infrastructure

slide-5
SLIDE 5

Mobile Ad Hoc Networks

Networks of mobile devices that use wireless p2p communication

2

Volatile Connections Zero Infrastructure Local interactions

slide-6
SLIDE 6
  • Object-oriented, functional patterns,

dynamically typed

  • Actor-based concurrency/distribution
  • Mirror-based reflection
  • JVM as platform
  • Runs on and J2ME/CDC phones

AmbientTalk: fact sheet

3

slide-7
SLIDE 7

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-8
SLIDE 8

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-9
SLIDE 9

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-10
SLIDE 10

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-11
SLIDE 11

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-12
SLIDE 12

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-13
SLIDE 13

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-14
SLIDE 14

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-15
SLIDE 15

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-16
SLIDE 16

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-17
SLIDE 17

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-18
SLIDE 18

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-19
SLIDE 19

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76

slide-20
SLIDE 20

Scheme 1975

ABCL

Smalltalk ‘70s-‘80s

4

Four Decades of Language Research

AmbientTalk 2006 1986 1997 1986 Hewitt’s actors (PLASMA) ‘73-’76 ECMAScript Harmony

slide-21
SLIDE 21

How does AmbientTalk help?

5

Volatile Connections Zero Infrastructure

No blocking synchronization receive events, even when disconnected Peer-to-peer service discovery protocol decentralized, location-based Asynchronous, buffered messaging send messages, even when disconnected Network failures ≠ exceptions timeouts & leasing, whether connected or disconnected

slide-22
SLIDE 22

Event Loop Concurrency

  • AmbientTalk programs are event loops
  • They react to events from the outside world
  • Inter-event loop communication is asynchronous

6

slide-23
SLIDE 23

Event Loop Concurrency

  • AmbientTalk programs are event loops
  • They react to events from the outside world
  • Inter-event loop communication is asynchronous

6

Event Loop (actor) Message queue

  • bjects
slide-24
SLIDE 24

Demo

slide-25
SLIDE 25

def service := object: { def echo(text) { system.println("Received: "+text); text } } deftype EchoService; def pub := export: service as: EchoService; 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");

EchoServer EchoClient

slide-26
SLIDE 26

AmbientTalk = OO + Events

9

when: type discovered: { |ref| ... } when: future becomes: { |result| ... } when: ref disconnected: { ... } when: ref reconnected: { ... } when: ref expired: { ... }

Follow-up on

  • utstanding requests

React to services appearing and disappearing Generate and receive application requests React to references disconnecting, reconnecting, expiring

  • bj<-msg(arg)

def msg(param) { ... }

slide-27
SLIDE 27

Urbiflock

10

  • P2P Geosocial networking

framework

  • Test deployment on Brussels

public transport network

slide-28
SLIDE 28

Summary

11

Volatile Connections Zero Infrastructure ad hoc

slide-29
SLIDE 29

Summary

11

Volatile Connections Zero Infrastructure Android 1.6 J2ME CDC J2SE 1.5 ad hoc

slide-30
SLIDE 30

Summary

11

Volatile Connections Zero Infrastructure

Non-blocking Synchronisation Decentralized Discovery Asynchronous Communication Disconnections ≠ Failures

Android 1.6 J2ME CDC J2SE 1.5 ad hoc

slide-31
SLIDE 31

ambienttalk.googlecode.com

Interpreter (MIT License)