Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Kalimucho Research Project, OW2con11, Nov 24-25, Paris

on

  • 429 views

platform that allows development of applications distributed on several kind of devices:

platform that allows development of applications distributed on several kind of devices:

Statistics

Views

Total Views
429
Views on SlideShare
429
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Kalimucho Research Project, OW2con11, Nov 24-25, Paris Kalimucho Research Project, OW2con11, Nov 24-25, Paris Presentation Transcript

  • Kalimucho - OW2 annual conference 1 • ParisKALIMUCHO 1 • BayonneMarc Dalmau, Philippe RooseIUT of BayonneLIUPPA / University of Pau - France 1 Kalitatea means « Quality » in Basque language, Mucho means « a lot » en Spanish language
  • Kalimucho - OW2 annual conference 2Objectives of Kalimucho• Kalimucho is a platform that allows development of applications distributed on several kind of devices: • PC • Smartphones • Tablets • Sensors •…• Application are made of components• The components of these applications exchange flows of data• Components can be added/removed/migrated while the application is running: • On users requests • Because of context changes (mobility …) • According to available resources (network, energy, CPU, memory …)
  • Kalimucho - OW2 annual conference 3Why a platform ?• Classical solutions: • Embedded = ad hoc application (=> can be heavy) • Self or no adaptation• Our solution: • Components of the application are downloaded when needed and removed when not yet used (=> light and evolutive) • Components can be created / stopped / moved at any time without stopping the running application • Communications between components are transparent to the designer: they send / receive data and the platform decides from/to where
  • Kalimucho - OW2 annual conference 4Applications• Made of services • (an application = a set of services)• Services are assemblies of components • (a service = an assembly of components with connectors)• Components are simple • (a component = a function)• Dynamic deployment and reconfiguration of applications • Add a new user / Remove a user • Add/Remove a service • Modify the constitution of a service• Dynamic adaptation of the application • To the context • To the users • To the usage
  • Kalimucho - OW2 annual conference 5Application model• Distributed components linked by connectors• A component has 0 to N inputs• A component has 0 or 1 output that can be duplicated
  • Kalimucho - OW2 annual conference 6Example of application• An organism taking care of environment sends an agent (with a smartphone) to the scene of an environmental accident1. At his arrival he films the scene he and sends the video (in streaming mode) to the organisms center.2. The center wants this video to be sent to an expert who is not actually in the center but has a smartphone.3. The expert decides that it is necessary to get pictures in order to constitute a file. These pictures will be sent simultaneously to the him and to the center.4. In order to complete the information in the file the center wants these pictures to be tagged by their GPS position.5. Etc .
  • Kalimucho - OW2 annual conference 7Act #1: Arriving on the scene• Video captured by the agent’s smartphone is sent to the center Video display Video capture Kalimucho Kalimucho Center Scene Deployment : Commands executed by the platforms Agent : CreateComponent video application.video.VideoAcquisition [null] [vid] Agent : CreateConnector vid internal Center Center : CreateComponent videodisplay application.videodisplay.VideoDisplay [vid] [null]
  • Kalimucho - OW2 annual conference 8Act #2: The expert• Video is now received by the expert Video capture Video display Center Kalimucho Kalimucho Scene Expert Kalimucho Commands executed by the platforms Center : SendComponent videodisplay Expert
  • Kalimucho - OW2 annual conference 9Act #3: Taking pictures• Video is replaced by pictures Kalimucho Video capture Centre Video display Kalimucho Expert Kalimucho Commands executed by the platforms Agent : RemoveComponent video Scene Expert : RemoveComponent videodisplay Expert : RemoveConnector vid
  • Kalimucho - OW2 annual conference 10Act #3: Taking pictures• Video is replaced by pictures Pictures display Kalimucho Picture capture Centre Pictures display Kalimucho Expert Kalimucho Commands executed by the platforms Agent : RemoveComponent video Scene Expert : RemoveComponent videodisplay Expert : RemoveConnector vid Agent : CreateComponent pictures application.camera.PictureAcquisition [null] [tocenter] Center : CreateConnector tocenter Agent internal Center : CreateComponent picturesdisplay application.camera.PictureDisplay [tocenter not_used] [null] Expert : CreateComponent picturesdisplay application.images.PictureDisplay [toexpert not_used] [null] Agent : CreateConnector toexpert internal Expert Agent : DuplicateOutputComponent photo toexpert
  • Kalimucho - OW2 annual conference 11Act #4: Adding GPS tags• Pictures sent to center are tagged by their GPS position GPS capture Picture capture Picture display Centre Kalimucho Kalimucho Picture display Scene Commands executed by the platforms Expert Kalimucho Agent : CreateComponent position application.GPS.GPSAcquisition [null] [tag] Agent : CreateConnector tag internal Center Center: ReconnectInputComponent picturesdisplay 1 tag
  • Kalimucho - OW2 annual conference 12Unpredictable context changes• In this example all the decisions were taken because of utility• but ..• If, when sending the video to the expert, the platform detects that the quality is bad (network throughput too low). It can decide by itself to send pictures rather than video: the video capture and video display components will be replaced by a picture capture and a picture display component.• Later, if the expert moves and get a better reception, the platform can choose to come back to the video mode as initially.• ….
  • Kalimucho - OW2 annual conference 13How the platform works• Video captured by the agent’s smartphone is sent to the center Video display Video capture Kalimucho Scene Kalimucho Center Deployment : Commands executed by the platforms Agent : CreateComponent video application.video.VideoAcquisition [null] [vid] Agent : CreateConnector vid internal Center Center : CreateComponent videodisplay application.videodisplay.VideoDisplay [vid] [null]
  • Kalimucho - OW2 annual conference 14What happens ?1. The platform on the agent’s smatphone receives the command:• CreateComponent video application.video.VideoAcquisition [null] [vid] 1. It sends a broadcast message in order to find a platform holding the code of the video capture component 2. One of the platforms sends it this code (it manages a repository of components) n o siti qui c oA ide rV Code repository fo ing Kalimucho ok tion uisi Lo Acq ideo for V Looking for V ideoAcquisit king Kalimucho io n Loo Kalimucho Code for VideoAcquisition
  • Kalimucho - OW2 annual conference 15What happens ?1. The platform on the agent’s smatphone goes on executing the command:• CreateComponent video application.video.VideoAcquisition [null] [vid] 3. The platform on the agent’s smatphone download and installs this component then it waits until its input and output connections are established (here there is only an output) Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 16What happens ?2. The platform on the agent’s smatphone receives the command: • CreateConnector vid internal Center 1. It looks for a route to the Center Video capture Kalimucho essage m P ing Kalimucho
  • Kalimucho - OW2 annual conference 17What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 2. If this route is direct, the Center replies to the PING message Video capture Kalimucho reply P ing Kalimucho
  • Kalimucho - OW2 annual conference 18What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 3. The platform on the agent’s smatphone sends to the platform on the Center a command in order to create a connector Video capture Kalimucho r cto nne e co Creat Kalimucho
  • Kalimucho - OW2 annual conference 19What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 4. The connector is created as output of the component of video capture connector Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 20What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 2. If there is no route to the Center there is no reply to the PING message No reply Video capture X Kalimucho essage m P ing Kalimucho
  • Kalimucho - OW2 annual conference 21What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 3. The platform on the agent’s smatphone try to find a relay (broadcast message) r nte Ce d Fin Video capture Kalimucho Kalimucho Fin d ter Ce nt Cen er Find Kalimucho
  • Kalimucho - OW2 annual conference 22What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 4. Each device tries to reach the Center by a PING message PIN Gm ess age Video capture Kalimucho Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 23What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 5. Some devices gets a reply from the Center PIN Gr epl y Video capture Kalimucho Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 24What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 6. These devices indicates to the smatphone that they can act as a relay Video capture Ca Kalimucho Kalimucho n do rela y to Ce nte r Kalimucho
  • Kalimucho - OW2 annual conference 25What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 7. The platform on the agent’s smatphone choose one of these devices and send it a command in order to create a connector with it Video capture Kalimucho Kalimucho Cre ate c on nec tor Kalimucho
  • Kalimucho - OW2 annual conference 26What happens ?2. The platform on the agent’s smatphone goes on executing the command: • CreateConnector vid internal Center 8. The device creayes the connector and sends to the Center a command in order to create the other part of this connector Cre ate ac o nn ect or Video capture Kalimucho Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 27What happens ?2. The platform on the agent’s smatphone goes on executing the command: CreateConnector vid internal Center 9. The connector is created as output of the component Video capture Kalimucho Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 28What happens ?3. The platform on the Center receives the command:• CreateComponent affichagevideo application.videodisplay.VideoDisplay [vid] [null] 1. The platform on the Center create the component (as seen) and link it to the established connection • The application can run r co nnecto Video Displsy Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 29Act #2: The expert Video capture Video display Center Kalimucho Kalimucho scene Expert Kalimucho Commands executed by the platforms Center : SendComponent videodisplay Expert
  • Kalimucho - OW2 annual conference 30How the platform works1. The platform on the Center receives the command:• SendComponent videodisplay Expert 1. It stops the video capture component 2. It gets its state 3. It looks for a route to reach the expert’s smatphone ( Expert) 4. It sends to the platform on the Expert a migration command including the state of the component (serialization) Component is stopped ent p on Video display d com l iz e Seria Kalimucho Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 31How the platform works3. The platform on the Center goes on executing the command:• SendComponent videodisplay Expert 5. The Center remove the component and its code 6. The Expert broadcast message in order to find a platform holding the code of this component (excepted if it already has it) 7. One of the platforms sends it this code (from a repository) 8. The Expert installs this component, set it in the state it had on the Center and waits for its connections to be established Component is removed Video display Kalimucho Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 32How the platform works3. The platform on the Center goes on executing the command:• SendComponent affichagevideo Expert 9. The Center sends a command to the Agent in order it redirects the connector by witch it sends the video to go to the Expert Video display Kalimucho er t to Exp ector n con Video capture Kalimucho ire ct Red Kalimucho
  • Kalimucho - OW2 annual conference 33How the platform works3. The platform on the Center goes on executing the command:• SendComponent affichagevideo Expert 10. The platform on the agent’s smartphone find a route to the expert’s smartphone (as seen) 11. The Expert now has its connections and can run the component • The video is now reveived by the expert’s smatphone Video display Kalimucho Video capture Kalimucho Kalimucho
  • Kalimucho - OW2 annual conference 34Command language• Components • CreateComponent name class [input1 input2 …] [output1 output2 …] • Input and/or Output lists can be empty: [null] • An input can be marked as "not_used" to be used later • RemoveComponent name • SendComponent name to • DisconnectInputComponent name number • ReconnectInputComponent name number new_input • DuplicateOutputComponent name new_output
  • Kalimucho - OW2 annual conference 35Command language• Connectors • CreateConnector name from to • from and to can be "internal" • RemoveConnector name • RedirectInputOfConnector name to • RedirectOutputOfConnector name to• Context • ReadState • ReadContainerState name • ReadQoS name • name is the name of a component or a connector
  • Kalimucho - OW2 annual conference 36 Platform Architecture Local part of the application Reconfigurations States and Events Supervision Context captureOthers Platforms Decision The Decision States and Events module is not yetimplemented (work Hardware infrastructure in progress)
  • Kalimucho - OW2 annual conference 37 Prototype Platform Architecture Local part of application Reconfigurations States and Events Supervision Context captureOthers Platforms Decision Test Module States and Events Hardware infrastructureConfigurations file
  • Kalimucho - OW2 annual conference 38Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file Applications Services Register Plugins Manager Route Finder Context Class DNS Supervisor Manager Manager Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 39Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services Register Plugins Manager Route Finder Context Class DNS Supervisor Manager Manager Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 40Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services • Command execution Register Plugins Manager Route Finder Context Class DNS Supervisor Manager Manager Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 41Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services • Command execution Register Plugins Manager Route Finder • Context management Context Class DNS Supervisor Manager Manager Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 42Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services • Command execution Register Plugins Manager Route Finder • Context management Context Class • Code management DNS Supervisor Manager Manager Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 43Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services • Command execution Register Plugins Manager Route Finder • Context management Context Class • Code management DNS Supervisor Manager Manager • Services for applications Repository Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 44Platform Kernel Component Connector Plugins Container Container Plugins • Made of services services for configuration file • Network Applications Services • Command execution Register Plugins Manager Route Finder • Context management Context Class • Code management DNS Supervisor Manager Manager • Services for applications Repository • Services management Manager Network Communication Independent Layer Code Loader Hardware Network Communication Dependent Host Context Access Layer Sensors
  • Kalimucho - OW2 annual conference 45Context serveillance• The context manager: • The platform: • Controls the hardware • CPU load • Get states from the context manager • Memory free • Receives alarms from the context manager • Battery level for: • Low levels (quality downgrade) • Controls the network • Up levels (quality upgrade) • Platform traffic • Receives context information from others • Application traffic platforms • Controls the BCs • State (live cycle) • Level of QoS
  • Kalimucho - OW2 annual conference 46Application model (components)• The Business Component (BC) is encapsulated into a container (Osagaia) BC Container Output stream Input stream Duplicated Connector Input Business .... Connector Unit (I U) Component (BC) . . .... .... Output Input stream Listeners Manager Unit (OU) . . Input Control Unit Unit• The container Connector (I U) (CU) Connector • Manages the life cycle of the BC (CU) Supervision States and Alarms • Control the state of the BC (CU) • Allows platform supervision (CU) • Offers input and output accesses (IUs, Listeners manager and OU) • Send states and alarms to the platform (CU)
  • Kalimucho - OW2 annual conference 47Application model (connectors)• The data flow is encapsulated into a container (Korrontea) • Allows data transfer politics (BC) • Ensure no lost of data (Buffers) • Allows platform supervision (CU) • Control the data flow (IU and OU) Input Connector Output stream stream buffer BC buffer Input Output Unit Unit (I U) Control Unit (OU)• Internal connector (CU) • Links two BCs in the same host Supervision States and Alarms
  • Kalimucho - OW2 annual conference 48Application model (connectors)• Distributed connector • Links two BCs in two hosts with a direct network connection Host A Host B Input Connector Output Input Connector Outputstream stream stream stream buffer BC buffer buffer BC buffer Input Output Client network Server Input Output Unit Unit Unit Unit (I U) Control Unit (OU) Thread Thread (I U) Control Unit (OU) (CU) (CU) Supervision States and Alarms Supervision States and Alarms
  • Kalimucho - OW2 annual conference 49 Application model (connectors) • Distributed connector with relay • Links two BCs in two hosts with no direct network connection Host A Host B Host C Input Connector Output Input Connector Output Input Connector Outputstream stream stream stream stream stream buffer BC buffer buffer BC buffer buffer BC buffer Input Output Client network Server Input Output Client network Server Input Output Unit Unit Unit Unit Unit Unit (I U) Control Unit (OU) Thread Thread (I U) Control Unit (OU) Thread Thread (I U) Control Unit (OU) (CU) (CU) (CU) Supervision States and Alarms Supervision States and Alarms Supervision States and Alarms The two networks may be different (for exampleWifi and 3G)
  • Kalimucho - OW2 annual conference 50Developing applications• Only BCs and classes of exchanged data are to be developed• BC inherits from an abstract class (BCModel)• Life cycle is controlled by: • init executed only the first time (not after a migration) • destroy executed when stopped (either before a migration) • run_BC BC activity• Inputs can be read by • Direct blocking method • Listeners• Output is written by • Direct method
  • Kalimucho - OW2 annual conference 51Developing applications• Kalimucho offers services to the BCs for: • Resources access (resources loaded with the code) • User interface definition and management (on Android) • Hardware access (GPS, SMS, GoogleMaps, sensors, camera) • Sending commands to a local or a distant platform and receiving replies• BCs exchange data of user defined classes • Data classes inherits from a Kalimucho’s class (Sample) • Data classes code availability is managed by the platform • Data is time stamped when created and the date is adjusted to local time when received (DNS)
  • Kalimucho - OW2 annual conference 52 Example: The BC for GPS acquisitionpublic class GPSAcquisition extends BCModel { private static final long serialVersionUID = 64240010100000001L; private transient GPSAccess localGPS; // not sent by migration private double latitude, longitude, altitude; // sent by migration public void init() throws StopBCException, InterruptedException {} public void run_BC() throws StopBCException, InterruptedException { localGPS = public void destroy() throws StopBCException, InterruptedException { (GPSAccess)ServicesRegister.waitForService("GPS_ACCESS"); localGPS.stopGPS(); // stop the GPS for this BC localGPS.startGPS(); // start the GPS for this BC } while (isRunning()) { Location loc = localGPS.getGPSLocation(); public float levelStateQoS() { latitude = loc.getLatitude(); return 0.9f; // actual QoS of this BC longitude = loc.getLongitude(); } altitude = loc.getAltitude(); } writeSample(new GPSCoordinates(latitude, longitude, altitude)); Thread.sleep(10000); // send location every 10s } }
  • Kalimucho - OW2 annual conference 53Exchanged data: the class GPSCoordinates public class GPSCoordinates extends Sample { private static final long serialVersionUID = 64240010100000001L; private double latitude, longitude, altitude; public GPSCoordinates() { latitude = 0; longitude = 0; altitude = 0; } public GPSCoordinates(double lat, double longt, double alt) { latitude = lat; longitude = longt; altitude = alt; } public double getLatitude() { return latitude; } public double getLongitude() { return longitude; } public double getAltitude() { return altitude; } }
  • Kalimucho - OW2 annual conference 54Platform performance• Size of the platforms • On PC: 366 KB • On Android: 356 KB• Command execution time (on an Android Nexus One) • Create a component: 2 to 20 ms • Remove a component: 15 ms to the time for the component to stop (limited to 1 second) • Create an internal connector: 3 to 15 ms • Create a distributed connector: 10 to 100 ms • Remove an internal connector: 3 to 15 ms • Remove a distributed connector: 3 to 25 ms • Disconnect/reconnect an input: 2 to 7 ms • Duplicate an output: 2 to 7 ms
  • Kalimucho - OW2 annual conference 55Platform performance• Total migration time for a component with one input connector and one output connector Migration time 500 400 Average value: 311 ms 300 Standard deviation: 100 ms 200 100 0 0 5 10 15 20 25 Test #
  • Kalimucho - OW2 annual conference 56Conclusion• Kalimucho is now available on OW2 forge • http://forge.ow2.org/projects/kalimucho/• Work in progress: • User oriented heuristic of decision (simulation with Labview - PhD 2006) • Heuristic of deployment (simulation with java - PhD 2010) • PhD student working on Context evaluation and decision taking
  • Kalimucho - OW2 annual conference 57KALIMUCHO THANK YOU• dalmau@iutbayonne.univ-pau.fr