Overview of MoCA: Mobile Collaboration Architecture Laboratory for Advanced Collaboration PUC-Rio, Brazil May 2006 Research Goals The big picture Agenda Main Components and their interaction Prototype Applications Papers and Contact Information 2
Research Goals Main 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 their usability 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) 3 MoCA MoCA consists of basic services for collecting and processing context information, communication and client/serverapis and a proxy Framework that facilitate the use of these services by collaborative applications. Essentially, the basic services support Distributed monitoring, storage and complex queries about the execution context of mobile devices. Advertisement and dynamic discovery of applications and middleware services. 4
The big Picture Server Server Cm+ECI req reply Server ProxyFw Cm+ECI req mod_reply Client M Cm+ECI Application event subscr Appl? context which CIS? Core Services DS LIS CIS CS COPS Optional Services Application-specific adaptations 5 Glossary 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 6
MoCA s Personalities Jade Application Java Application C# Application FIPA MoCA/MAX Cm ECI (Pub/Sub) MoCA Core Services SOAP/XML MoCA/WS To widen the usability of MoCA s core services, we have developed two additional programming interfaces personalities MoCA/MAX for use with Agent Framework Jade MoCA/WS for use as a Web Service 7 Communication APIs Communication 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 SQLlike 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. 8
Subscriber: ECI - Example 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); } } 9 ECI - Example Publisher (Event Server): publisher = new EventProvider(localAddress,true); // create Event Provider on localhost:port eventproperty = new EventProperty(); // create Properties of an event eventproperty.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 topic String topic = new String("00:12:A9:41:AA:D6"); publisher.publish(topic,eventproperty,msg); But Event will be delivered only if eventproperties satisfy Expression 10
Client and Server APIs This 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 communication with the server or proxy; Embodies Cm and ECI APIs 11 Core Services of MoCA 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 Context Information 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 Proxies which have subscribed to such notifications; Discovery Service (DS): Accepts announcements of applications, and allows Clients to locate the corresponding Servers and Proxies; 12
Typical Pattern of Interactions MoCA Services DS CIS CS register register Handover Subscr context client Proxy? event which CIS? Appl server req reply Appl. Proxy req mod_reply M Appl. Client Subscr client event Appl. Proxy 13 Main Components 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) 14
Monitor 15 Context Information Service (CIS) Delivers context information to any application process (e.g. server/client/proxies), through direct queries or subscriptions with context 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 16
Context Information Service (CIS) CIS can be deployed as a pool of servers (each one collecting 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-change events they are interested in (expressed in standard SQL92). Example: Subject= 02:DA:20:3D:A1:2B, Properties = roaming = True or FreeMem < 15% OR CPU > 90% ; 17 Location Inference Service (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 empregase um algoritmo estocástico (que compara probabilidades) 18
Location Inference Service (LIS) Access Point Reference Points {Signal Pattern} Device Inferred Device Location: Room 501 Room 505 Room 506 Room 507 Room 508 {-90,-75,-42} {-92,-72,-53} {-82,-50,-89} {-55,-35,-78} Corridor {-75,-78,-68} {-76,-77,-74} {-54,-55,-70} {-59,-80,-49} {-63,-85,-57} {-42,-60,-60} {-30,-45,-64} {-60,-78,-48} Room 501 Room 502 Room 503 Room 504 19 LIS Acesso Síncrono Manipuaçã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) 20
LIS Acesso Assíncrono Aplicaçã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 21 LIS Funcionamento Monitor envia sinais a cada segundo A 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 22
Proxy Framework Proxy 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 can be customized to the specific application needs; Currently supports: Content Adaptation (image, text) Caching, triggered by disconnection 23 Proxy (Framework( Framework) Structure Setup Service Discovery Profile Mngt Authentication Communication Server Handover Mngt Caching Mngt Content Adaptation Protocol Translation Client Context Processing subscribe Event Dispatching Context Processing subscribe notifications Hot andfrozenspots Frozen Context Information Service Hot 24
Monitor/Sim Is a tool which simulates a mobile device: Behavior defined by a configuration file (scans are read from different files) monitor.scaninterval=1000 monitor.repeating=true cis.server.host=localhost cis.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 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) loop 25 Some Prototype Applications Some 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 user interests 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... 26
W-Chat Wireless Chat (W-Chat) shares the wireless connectivity status of the participants of a chat room; 27 Ubiquitous Guide - uguide Client/Server application Admin registers at the server one URL for each symbolic region Symbolic Regions may be representend in an hierarchy, e.g. /PUC-Rio/RDCBuilding/5thfloor/Room511 28
uguide at the Client User logs in Icon appears in task-bar Whenever user enters a registered region, a pop-up opens with the corresponding link Link can be opened in any Web browser Perhaps, user enters a non registered region 29 Overview: Selected Publications (available at www.inf.puc-rio.br/~endler/publ.html) 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 Users IEEE 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ção Mó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. 30
MoCA Current Status Implementation (docu): Monitor/XP (OK) Monitor/Sim Configuration Service - CS (OK) Context Information Service - CIS (OK) Location Inference Service - LIS (OK) Discovery Service -DS Client API (OK) Synchronous &Asynchronous Server API (OK) Synchronous & Asynchronous EventService ECI (OK) online: cs.lac.inf.puc-rio.br: 55015 (Mngt), 55016 (M) cis.lac.puc-rio.br: 55010(M);55000(pub);55001(query) lis.lac.inf.puc-rio.br: 55020(pub);55021(query) 31 Work in Progress 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 context management Mechanism for detecting stability of basic context readings 32
Credits The 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) 33 More Information... For documentation and downloads visit MoCA s Web Site: www.lac.inf.puc-rio.br/moca Send Email to: info@lac.inf.puc-rio.br 34