Transforming VLC into an SA-Aware Application - Telecommunications Software Engineering Lab Concordia University Presenters: Anik Mishra and Ali Kanso

Page created by Randy Fernandez
 
CONTINUE READING
Transforming VLC into an SA-Aware
            Application

        Telecommunications Software Engineering Lab
        Concordia University
        Presenters: Anik Mishra and Ali Kanso

                                                      1
Overview

• Objective of the Work
• VLC
   – Introduction
   – Workflow
• Design of a SAF Compliant VLC
   – Choosing components
   – Levels of Integration
   – Sample system configuration
• Evaluation of the Work

                                   2
Objective of the Work

• Go through the steps of modifying a regular
  application for High Availability and Service
  Continuity using SAF standards

• Have a running application for testing and analyzing
  configuration and upgrade campaign generation

• Document methodology/lessons learned

• Contrast results achieved with effort required

                                                         3
Introduction to VLC

• Started as an academic project in 1996 at the École
  Centrale Paris

• Intended to consist of a client and server to stream
  videos across a campus network

• Server portion later integrated with client

• Now managed by the VideoLAN non-profit
  organization

                                                         4
VLC Workflow
                               RTSP server
Control module    «create»

   «create»
                    VLM                          Internet

                   «create»
                 (as needed)   File IO, demux,
                                  RTP send

                                                            5
Choosing Components
• Multiple criteria for choosing components:
   – Unit of failure detection and/or recovery
       • One aspect of components is failure detection and recovery
       • Components must be able to be started separately
   – Unit of service
       • At what granularity is the service request?

• VLC: highly threaded design
   – Each RTP stream in its own thread
   – However, threads are not separable

Therefore
   – Two possible configurations

                                                                      6
Choosing Components

• VLC as a Container component:
   – Broadcast: streams as a contained component
       • Each CSI represents one stream
   – VoD: RTSP servers as contained components (?)
       • Each RTSP server is its own CSI?
       • Each different media stream is its own CSI?

• Container components not supported by OpenSAF at
  design time

• VLC as single component
   – Unit of failure: only one process

                                                       7
VLC Component: Arguments

 • VLC needs to be configured
     – Objective: simplest configuration possible

 • One argument:
Non-proxied non-SA aware
                       VLC           SA-aware File
                                Configuration
specified as a command line argument   specified as CSI Attribute

                                                                    8
Levels of Integration                    Higher availability
                                             & complexity

                                   VLC with
                                   checkpointed
                                   positions
                     SA Aware
                     VLC
                     (no service
                     continuity)
      Non-SA Aware
      Non-proxied
      VLC

VLC
                                                        9
Target Configuration

 • Two components
                    IP address            VLC

Comp category:      Non-proxied non-sa-   SA Aware
                    aware: no state
Dependency:         none                  Depends on IP
                                          address component

                                                         10
Configuration
         Application

         SG

Node 1    SU 1                SU 2       Node 2
            IP-Comp            IP-Comp

           VLC-Comp           VLC-Comp

           SI
                   IP-CSI
                  Video-CSI

                                                  11
Redundancy Model

• Redundancy model should be based on component
  capabilities and desired availability

• In our case:
   – Non-proxied Non-SaAware: non-preinstantiable
   – SaAware: 1_active_or_1_standby

• Chosen redundancy models:
   – Non-proxied Non-SaAware : NoRed
   – SaAware: 2N

                                                    12
Evaluation: Non-Preinstantiable SAF
              Managed Component
• Client experience after administrative action
    – Broadcast: video restarts after client resynchronisation timeout
      (~10 seconds for VLC GUI)
    – VoD: Client required to re-request video stream

• Benefits:
    – Managed by SAF
        • Administrative functions (like locking)
•   Benefits w/IP component
    – Broadcast: None
    – VoD: Server immediately available at same IP after
      management operation

                                                                         13
Non-Preinstantiable SAF Managed
         Component: Implementation
• Problems:
   – VLC failures not detected by OpenSAF (no monitoring)
       • Passive monitoring needed

• Difficulty: Low

• Effort:
   – “3” lifecycle commands
   – IMM XML:
       • VLC component: ~295 “lines”
       • IP components: +110 “lines”
   – No changes to VLC needed

                                                            14
Non-Preinstantiable SAF Managed Component:
                VLC CLC CLI

• Instantiate:
   – cvlc --daemon --pidfile /var/run/vlc/vlc.pid

• Terminate
   – kill "$(< /var/run/vlc/vlc.pid)“

• Cleanup
   – kill -9 "$(< /var/run/vlc/vlc.pid)“
   – rm /var/run/vlc/vlc.pid

                                                    15
Non-Preinstantiable SAF Managed Component:
                 IP CLC CLI

• Instantiate:
   – ip addr add $ip dev $dev
   – arping -U -c 1 –I $dev $ip

• Terminate/Cleanup
   – ip addr del $ip dev $dev

                                         16
Evaluation: SA Aware

• Client Experience:
   – Same as Non-Preinstantiable
   – However, VLC crashes are noticed (and corrected)
     without passive monitoring

• Added Benefits:
   – Program crashes detected by SAF; extra healthchecks
     possible
   – Configuration through CSI Arguments
   – Faster recovery after failure (executable already pre-
     instantiated)

                                                              17
SA Aware: Implementation

• Difficulty:
   – Medium (VLC architecture knowledge needed)

• Changes to VLC needed:
   – Additional control module

• Effort:
   – Control module: ~400 lines + 30 lines build system
   – Only “2” lifecycle commands
   – IMM XML: Roughly the same

                                                          18
SA Aware: Control Module

• Implements VLC’s control module interface

• Also implements AMF’s callback interface
   – saAmfCSISetCallback
   – saAmfCSIRemoveCallback
   – saAmfComponentTerminateCallback

• CSI Set can receive 4 states
   –   STANDBY
   –   ACTIVE
   –   QUIESCED
   –   QUIESCING
                                              19
Evaluation: Checkpointing Broadcast Streams

• Client Experience After Failure:
   – Video resumes at roughly the same position
     after a brief pause

• Added Benefits:
   – Better user experience

• Difficulty:
   – High, edits to main VLC code needed
                                                  20
Checkpointing: Implementation

• Changes to VLC needed:
   – Edits to VL Manager:
      • Move over current configuration
      • Restart streams at a specific offset
   – Edits to RTP stream_out to bind specific source
     IP/port

• Effort:
   – Control module: +~390 LoC
   – VLM and RTP changes: ~150 LoC

                                                   21
VLC modified workflow

  Control module
   (OpenSAF)            Playlist                     Internet

Video status               VLM
                                   Video status

                                   File IO, demux,
                                      RTP send

                                                                22
Summary
Integration level          Effort              Added benefit              Shortcoming
Non-proxied Non-    •Lowest                  •SAF managed              (After a failure)
                    •No changes to VLC       •Redundant server is      •User experiences
 SaAware VLC                                 available after failure   service outage
                                                                       •User has to request
                                                                       the video again (VoD)
 SaAware VLC        •Higher                  •Crashes automatically    •No service continuity
                    •New VLC control         detected by AMF           (the video starts over
                    module                   •Faster recovery          after failure)

 SaAware VLC        •Highest                 •Better user
                    •Additional changes to   experience (after a
     With           control module           failure the video                       −
 Checkpointing      •Synchronization         resumes at roughly the
                    through checkpoint       same position after a
                    service                  brief pause)

                                                                                                23
• Work done in context of MAGIC

• MAGIC: Modeling and Automatic Generation of Information
             and upgrade Campaigns for Service Availability

• A collaboration between Ericsson and Concordia

• Funded by NSERC and Ericsson

                                                              24
Discussion?

              25
You can also read