Agenda - PUC-Rioendler/talks/MoCA-Overview.pdf · Topic is any string, ... – Aproximate position...
Transcript of Agenda - PUC-Rioendler/talks/MoCA-Overview.pdf · Topic is any string, ... – Aproximate position...
1
OverviewOverview ofof MoCAMoCA::Mobile Mobile CollaborationCollaboration ArchitectureArchitecture
Laboratory for Advanced Collaboration
PUC-Rio, Brazil
May 2006
22
AgendaAgenda
• Research Goals
• The big picture
• Main Components and their interaction
• Prototype Applications
• Papers and Contact Information
2
33
ResearchResearch GoalsGoalsMain Goals: • Design and implement a middleware to support the development
and deployment of such collaborative applications;• Experiment with new forms of context/location-aware collaboration,
develop applications using the middleware, and evaluate theirusability and usefulness.
Target setting:• Structured wireless network (802.11)• Users with laptops and palmtops• Intra-domain applications (e.g. for University campus-community,
corporation)
We called the middleware Mobile Collaboration Architecture (MoCA)
44
MoCAMoCAMoCA consists of basic services for collecting and
processing context information, communication andclient/serverAPIs and a proxy Framework that facilitatethe use of these services by collaborative applications.
Essentially, the basic services support
• Distributed monitoring, storage and complex queriesabout the execution context of mobile devices.
• Advertisement and dynamic discovery of applications andmiddleware services.
•
3
55
TheThe big Picturebig Picture
Client
Cm+ECIM
DS CIS CS
which CIS?
context
Appl?
req
subscr
req
event
reply mod_reply
LIS
COPS
Core Services
OptionalServices
Server
Cm+ECI
Server Server
Cm+ECI
ProxyFw
Application-specific adaptations
Application
66
GlossaryGlossary
• Client and Server APIs• Cm: Communication Service• ECI: Event Communication Interface• M: Monitor/XP (also versions /Sim & /CE)• CS: Configuration Service• CIS: Context Information Service• LIS: Location Inference Service• DS: Discovery Service
• ProxyFw: Proxy Framework• COPS: Context Privacy Service
4
77
MoCAMoCA´́ss PersonalitiesPersonalities
To widen the usability of MoCA’s core services, we have developed twoadditional programming interfaces personalities
• MoCA/MAX – for use with Agent Framework Jade
• MoCA/WS – for use as a Web Service
MoCA Core Services
MoCA/MAX MoCA/WS
Jade Application Java Application C# Application
SOAP/XMLFIPA Cm ECI(Pub/Sub)
88
Communication APIsCommunication APIsCommunication Service (Cm):• Supports synchronous and asynchronous communication among
Java programs using both TCP or UDP
Event-based Communication Interface (ECI):• Supports asynchronous communication using the publish/subscribe
approach based on topics
• Through its API, a process can:– subscribe to events related to some topic (and satisfying an given SQL-
like expression) and/or – publish an event+message on a topic.
• An event provider is in charge of dispatching events to all subscribers which have subscribed to this event and whose expression is satisfied by the event properties.
5
99
ECI ECI -- ExampleExampleSubscriber:
Topic topic = subscriber.subscribe(subject,expression);MyEventListener listener = new MyEventListener(); subscriber.addListener(listener, topic);
On occurrence of an event, ECI calls onReceiveData(Object), of listener, where Object contains event data.
Topic is any string, e.g. the device’s MAC-address (00:12:A9:41:AA:D6)Example of Expression: ((EnergyLevel < 65) or (FreeMemory < 18000) or ((OnLine = false)
and (DeltaT > 8000)) or (AdvertisementPeriodicity > 2))
public class MyEventListener implements EventListener { public void onReceiveData(Object data) {
Event receivedEvent = null; receivedEvent = (Event) data; String msg = (String) receivedEvent.getData(); System.out.println(listenerMsg + " received this msg from Event Server: " + msg);
} }
1010
ECI ECI -- ExampleExample
Publisher (Event Server):publisher = new EventProvider(localAddress,true); // create Event Provider on localhost:porteventProperty = new EventProperty(); // create Properties of an eventeventProperty.setBooleanProperty("OnLine",true);eventProperty.setLongProperty("deltaT",5000);eventProperty.setIntProperty("EnergyLevel",30);eventProperty.setIntProperty("FreeMemory",19000); eventProperty.setIntProperty("CPU",58);
// Publishes the event with a message to subscribers on a specific topicString topic = new String("00:12:A9:41:AA:D6"); publisher.publish(topic,eventProperty,msg);
But Event will be delivered only if eventProperties satisfy Expression
6
1111
ClientClient andand Server Server APIsAPIsThis APIs make the interaction with MoCA core services transparent to
the application.
Main functions:
• Gets addresses & register at MoCA core services (CIS, DS)
• Client gets address of CIS (and possibly, of a proxy);
• Starts the Monitor (Client only);
• Selects a protocol (sockets/TCP, sockets/UDP) for communicationwith the server or proxy;
• Embodies Cm and ECI APIs
1212
Core Core ServicesServices ofof MoCAMoCA• Monitor (at the mobile device):
– Is in charge of: (i) probing the state information (aka execution context) of the mobile device and (ii) sending this information to the ContextInformation Service (CIS) executing in the static network;
• Configuration Service (CS):– Stores and manages the configuration of each mobile device:
• MAC Address, (IP:port) pair of CIS, periodicity of the Monitor repots to the CIS, and (IP:port) pair of the Discovery Service;
• Context Information Service (CIS): – stores and processes the state information received from the Monitors,
and eventually sends notifications about context changes to Proxieswhich have subscribed to such notifications;
• Discovery Service (DS):– Accepts announcements of applications, and allows Clients to locate the
corresponding Servers and Proxies;
7
1313
Appl.Proxy
TypicalTypical PatternPattern ofof InteractionsInteractions
Applserver
DS
Appl.Proxy
CIS CS
Appl. Client
M
which CIS?context
Proxy?
req
Subscrclient
req
event
reply mod_reply
MoCA Services
Subscrclient event
Handover
register register
1414
MainMain ComponentsComponents• Monitor
– is a daemon executing on the mobile device;– Periodically polls (and sends to the CIS) state information about
the mobile device’s resources and wireless RF signals, e.g.: • Strength of RF signal received from all visible Access Points ;• CPU utilization, available memory and energy;• MAC Address, IP and currently used Access Point;
– RF signals are obtained through WiFi scan operations, in a uniform way, independently of the 802.11 network interface;
• Implemented for Linux, WinXP– The Monitor also reports to the CIS any change of the current IP
address or Access Point of the device (i.e. a migration)
8
1515
MonitorMonitor
1616
Context Information Service (CIS)Delivers context information to any application process (e.g.
server/client/proxies), through direct queries or subscriptions withcontext expressions.
• Context variables used in expressions• CPU (Int – 0 to 100) %• EnergyLevel (Int – 0 to 100) %• AdvertisementPeriodicity (Int – 0 to 100000)• APMacAddress (String)• FreeMemory (Long) in Kbytes• DeltaT (Long) in milliseconds• OnLine (Boolean)• IPChange (Boolean)• Roaming (Boolean)• RF Signal Strength from each AP (dB)
• Example of an expression: (Roaming = true) or ((OnLine = false) and (DeltaT > 10000))
• Usually, applications are interested in:– State of the device (e.g. available memory, enery level)– Wireless connectivity status– Aproximate position of the device
9
1717
Context Information Service (CIS)
CIS can be deployed as a pool of servers (each onecollecting the context information from Monitors);
• CIS-Monitor communication uses sockets/UDP;
• The proxies subscribe to the CIS informing the devices’s MAC-Address (as the Subject) and the Context-changeevents they are interested in (expressed in standardSQL92). Example:
Subject=”02:DA:20:3D:A1:2B”, Properties = “roaming = True” or “FreeMem < 15%” OR “CPU > 90%”;
1818
LocationLocation InferenceInference ServiceService (LIS)(LIS)LIS é um serviço para a inferência aproximada da localização de
dispositivos com interface 802.11 em ambientes indoor.Envolve duas etapas:Mapeamento/Calibração:• Mede-se a intensidade de sinal proveniente de todos os APs 802.11em
diversos Pontos de Referência (RP), que são armazenadas• A cada ponto de RP associa-se uma coordenada ou nome simbólico• Define-se as Regiões Simbólicas na àrea de interesse
Inferência:• Usando a diferença entre intensidade de sinal medida (também de todos os
APs) e as intensidades armazenadas, estima-se a distância que o dispositivo está dos n RP mais próximos,
• A fim de compensar variações do sinal, usa-se várias medidas e emprega-se um algoritmo estocástico (que compara probabilidades)
10
1919
{-59,-80,-49} {-63,-85,-57} {-42,-60,-60} {-30,-45,-64}
{-90,-75,-42} {-92,-72,-53} {-82,-50,-89} {-55,-35,-78}
{-75,-78,-68} {-76,-77,-74} {-54,-55,-70}
Room 501 Room 502 Room 503 Room 504
Room 505 Room 506 Room 507 Room 508
Corridor
Access Point
Reference Points {Signal Pattern}
Device
Location Inference Service (LIS)Location Inference Service (LIS)
{-60,-78,-48}
Inferred Device Location:Inferred Device Location:Room 501
2020
LIS LIS –– AcessoAcesso SSííncrononcronoManipuação da/Consulta sobre a hierarquia de regiões Simbólicas:• Region[] getAtomicRegions()
• void add(Hierarchy hierarchy)
• void remove(String hierarchyId)
• Hierarchy getHierarchy(String hierarchyId)
• List getAllHierarchies()
Consultas sobre Dispositivos em região e Região de um Dispositivo:• String getRegion(String deviceId, String hierarchyId)
• String[] getDevices()
• String[] getDevices(String regionId)
11
2121
LIS LIS –– Acesso AssAcesso AssííncrononcronoAplicação precisa instanciar um RegionListener e/ou um DeviceListener:
• void subscribe(String regionId, RegionListener listener)– onDeviceEntered(String regionId, String deviceId)– onDeviceExited(String regionId, String deviceId)
• void unsubscribe(String regionId, RegionListener listener)
• void subscribe(String deviceId, DeviceListener listener)– onRegionChanged(String deviceId, String regionId)– void unsubscribe(String deviceId, DeviceListener listener)
• void unsubscribe(String deviceId, DeviceListener listener)
Cada vez que um disp. entra ou deixa uma área o LIS notifica todas as aplicações registradas através do método onRegionChanged, informando o regionID e deviceID
2222
LIS FuncionamentoLIS FuncionamentoMonitor envia sinais a cada segundoA cada segundo LIS consulta CIS sobre sinais referente a todos os dispositivos
LIS mantém um cache da localidade mais recente de cada dispositivo, implementa o algoritmo de inferência, e gerencia hierarquia de áreas
12
2323
Proxy Proxy FrameworkFrameworkProxy is the element dealing with mobility-related tasks such as:
– Wired-wireless protocol translation– Caching/Hoarding during disconnection– Handover Management– Content Adaptation– Notice context changes and perform context-specific adaptations– ...
• But each collaborative application has specific demands;
• ProxyFramework is a “white-box” Application Framework which canbe customized to the specific application needs;
• Currently supports:– Content Adaptation (image, text)– Caching, triggered by disconnection
2424
Proxy (Proxy (FrameworkFramework) ) StructureStructure
ProtocolTranslation
CachingMngt
ProfileMngt
ContentAdaptation
HandoverMngt
AuthenticationSetup
Communication
ContextProcessing
EventDispatching
ContextProcessing
subscribe notifications
ServiceDiscovery
Server Client
Context Information Service
Frozen
Hot
Hot and Frozen Spots
subscribe
13
2525
Monitor/Monitor/SimSimIs a tool which simulates a mobile device:
• Behavior defined by a configuration file (scans are read from different files)
• Sends this information to CIS (like the “real” Monitor)
• Can be deployed on any host
This facilitates:
• Debugging of the context-aware applications in the usual networked environment (without having to physically move between regions)
• Evaluating the scalability of the application (test with hundreds/thousands of fake mobile devices)
monitor.scanInterval=1000 monitor.repeating=true cis.server.host=localhostcis.monitor.port=55010 file1=conf/Scan-Banco_01.txt interval1=5000 file2=conf/Scan-EspacoAberto.txt interval2=10000 file3=conf/Scan-Mesa_03.txt interval3=20000
loop
2626
Some Some PrototypePrototype ApplicationsApplicationsSome location-aware applications (prototypes) developed using MoCA:
• W-Chat chat-tool with connectivity awareness
• Notes in the Air (NITA) notes to locations (virtual whiteboards) and location-based chat
• Mobile Matchmaking Service location-based matching of userinterests
• BuddySpaceLive on-line tracking of friend’s locations
• Wireless Marketing Service (WMS) location-based discount coupons
• Virtual Lines location-based reservation of a position in a line
• Who Are You? (WAY) proximity-based exchange of business cards
• ...
14
2727
WW--ChatChat
Wireless Chat (W-Chat) shares the wireless connectivitystatus of the participants of a chat room;
2828
UbiquitousUbiquitous GuideGuide -- uGuideuGuide
• Client/Server application
• Admin registers at the serverone URL for each symbolicregion
• Symbolic Regions may berepresentend in an hierarchy, e.g.
/PUC-Rio/RDCBuilding/5thfloor/Room511
15
2929
uGuideuGuide atat thethe ClientClient• User logs in • Icon appears in task-bar• Whenever user enters a
registered region, a pop-upopens with the correspondinglink
• Link can be opened in anyWeb browser
• Perhaps, user enters a nonregistered region
3030
SelectedSelected PublicationsPublications(available at www.inf.puc-rio.br/~endler/publ.html)
Overview:• V. Sacramento, M. Endler, H.K. Rubinsztejn, L.S. Lima, K. Gonçalves, F.N.do Nascimento, G.
Bueno, MoCA: A Middleware for Developing Collaborative Applications for Mobile UsersIEEE Distributed Systems Online, ISSN 1541-4922, vol. 5, no. 10, October, 2004.
LIS and NITA:• K. Gonçalves, H.K. Rubinsztejn, M. Endler, B. Santana, S.D.J. Barbosa, Um aplicativo para
comunicacão baseada em localização, 6o. Workshop de Comunicação sem Fio e ComputaçãoMóvel (WCSF 2004), Fortaleza, pages 225-231, October 2004.
• H.K. Rubinsztejn, M. Endler, V. Sacramento, K. Gonçalves, F.N. do Nascimento, Support for Context-aware Collaboration, First International Workshop on Mobility Aware Technologies and Applications (MATA 2004), Florianópolis, LNCS no. 3284, pages 37-47, October, 2004
Proxy Framework:• H.K. Rubinsztejn, M. Endler, N. Rodrigues, A Framework for Building Customized Adaptation
Proxies, in Proc. of the IFIP conference on Intelligence in Communication Systems (INTELLCOMM 2005) (to appear), Montreal, October 2005.
Context Privacy:• V. Sacramento, M. Endler, F.N do Nascimento, A Privacy Service for Context-Aware Mobile
Computing, Proc. of the IEEE Conference on Security and Privacy for Emerging Areas in Communication Networks (to appear), Athens, September 2005.
16
3131
MoCAMoCA –– CurrentCurrent StatusStatusImplementation (docu): online:
Monitor/XP (OK)Monitor/SimConfiguration Service - CS (OK) cs.lac.inf.puc-rio.br:
55015 (Mngt), 55016 (M)Context Information Service - CIS (OK) cis.lac.puc-rio.br:
55010(M);55000(pub);55001(query)Location Inference Service - LIS (OK) lis.lac.inf.puc-rio.br:
55020(pub);55021(query)Discovery Service -DSClient API (OK)
Synchronous &Asynchronous
Server API (OK)Synchronous & Asynchronous
EventService – ECI (OK)
3232
WorkWork in in ProgressProgress• Flexibilization of CIS with new tags (e.g. transmission
rate, GPS, etc.)
• Monitor/CE and Communication API for Windows Mobile
• Mechanism for measuring link quality (transmission rate)
• uGuide/CE for portables
• Integration of LIS with GPS-based positioning
• Framework for Context-aware workflows for m-commerce
• A tool for evolutionary and heterogeneous contextmanagement
• Mechanism for detecting stability of basic contextreadings
17
3333
CreditsCreditsThe Middleware Team:
• Vagner Sacramento
• Hana K. Rubinsztejn
• Ricardo C.A. da Rocha
• Luciana dos S. Lima
• José Viterbo
• Fernando Ney Nascimento
• Gustavo Luis Baptista
• Marcelo Malcher
The Application Folks:
• Kleder Gonçalves
• Pedro Neves
• Rodrigo Prestes
• Fabio Bruno Pereira
• João Paulo Braga
Other Collaborators:
• Daniel Fleischmann (Gr)
• Giulliano Bueno (Gr)
3434
More More InformationInformation......For documentation and downloads visit MoCA’s Web Site:
www.lac.inf.puc-rio.br/moca
Send Email to: