These are the slides of our first Webinar of HelixCloud - our middleware software to enable Video Streaming Cloud Services using Helix Universal Server by RealNetworks
2. Who am I
David Riccitelli
@ziodave
http://www.linkedin.com/in/riccitelli
http://blog.insideout.io/
Co-Founder of InsideOut10, holding of
Interact Egypt, with an active presence in
the European, North African and Middle
East markets.
Active since the 1995 in streaming media
and Real partner.
(more on LinkedIn)
4. Mission
"To provide affordable, scalable and highly
reliable streaming services to customers
while minimizing impacts on the core
network infrastructure and lowering
operational costs"
5. Features
● Account and User Management
● Quota Limit
● Integrated FTP Server
● Slick Web UI
● Multi-format Streaming URL
● Multiple Roles (Administrator, User,
Reporter)
● URL Protection (network, geo, token)
● Real-Time Reporting
● APIs for 3rd Party Integration
6. Architecture
Channel
Channel
Channel
Manager SLTA
SLTA
Web UI Manager SLTA Session
Manager
Manager
Web APIs
Helix
FTP Server
Server Storage
INGESTION MANAGEMENT DELIVERY
7. Web APIs
The Web APIs are the core of Helix Cloud
Authentication
Authorization
Logging REST
Reporting APIs
Account & User Management
File Management
Channel Management ...and more
8. FTP Server
The FTP Server is tightly integrated with
the Web APIs and UI.
The same username can be used for file
upload and for management via the UI.
Uploads are inhibited when the storage
quota is reached.
9. Web UI
The Web UI is highly responsive and
customizable.
It is built on top of the Web APIs.
It provides different access levels.
It features Google Visualization APIs for
the generation of graphs.
10. Channel Manager
Provides management of channels based
on on-demand contents.
Supports multiple sources and servers.
Is tightly integrated with Helix SLTA
agent.
Provides useful feedback of currently
playing clip via Web APIs and UI.
14. Folder Structure: bin
+ /opt/helixcloud/
+ bin/
| - helixcloud-channelmgr
|
:
.
The Channel Manager package is installed in the /opt/helixcloud folder which contains different
subfolders: bin, lib, etc, log, var.
The bin subfolder contains runnable files, including start-up scripts that can be added to the /etc/init.d
of your system.
The Channel Manager includes the helixcloud-channelmgr which is a start-up script that can be
installed in the /etc/init.d and allows you later to start, stop and check the status of the service by
issuing the following commands:
/etc/init.d/helixcloud-channelmgr {start|stop|status}
15. Folder Structure: lib
+ /opt/helixcloud/
:
+ lib/
| - helixcloud-channelmgr-1.0-SNAPSHOT.jar
:
.
The log subfolder contains the program files, i.e. the files that contain the actual executable code for
the Channel Manager.
The Channel Manager includes the helixcloud-channelmgr-1.0-SNAPSHOT.jar file which is the
actually self-contained program and is launched, along with its parameters, using the helixcloud-
channelmgr script described in the previous slide.
16. Folder Structure: opt
+ /opt/helixcloud/
:
+ etc/
| - chmgr.properties
| - logback.xml
:
.
The etc subfolder contains the configuration files:
● chmgr.properties holds the general configuration parameters for the Channel Manager service.
● logback.xml has the logging settings.
17. Folder Structure: log
+ /opt/helixcloud/
:
+ log/
| - helixcloud.log
| - helixcloud-{timestamp}.log
| + channels/
| + {account}/{user}/{channel}/
| - slta-{timestamp}.log
:
.
The log subfolder contains the logs for the service.
Application logs are written to the helixcloud.log file (and rotated daily to helixcloud-{timestamp}.
log). Application logs are also stored into the database if the logging is configured so.
The standard output for each SLTA instance is written to {account}/{user}/{channel}/slta-
{timestamp}.log
18. Folder Structure: var
+ /opt/helixcloud/
:
+ var/
+ channels/
| + {account}/{user}/
| - {channel}.mp4.json
+ templates/
- channels.xml
The var subfolder contains two subfolders:
● channels with the data for all the configured channels in json format.
● templates with the configuration files for the SLTA, in our case the configuration file is called
channels.xml.
20. Startup Script: installation
On RedHat and CentOS the startup script is
installed as follows:
cd /etc/init.d
ln -s /opt/helixcloud/bin/helixcloud-channelmgr
chmod 755 helixcloud-channelmgr
chkconfig --add helixcloud-channelmgr
The the service is started as follows:
/etc/init.d/helixcloud-channelmgr start
21. Application Configuration
slta.runner.commandLine=/opt/helix/_realserver-14.3.0.268/Bin/slta.sh
slta.runner.arguments=-c {template} {path}{suffix} {playlist} -fp
slta.runner.destinationSuffix=.1
slta.runner.template=/opt/helixcloud/var/templates/channel.xml
slta.runner.basePath=/opt/helixcloud/var/media/
slta.storage.path=/opt/helixcloud/var/channels/
slta.storage.suffix=.json
slta.log.path=/opt/helixcloud/log/channels/
● ...commandLine: the full command line to the slta.sh script (it must be the slta.sh script)
● ...arguments: the arguments to be appended to the command line. Arguments include
placeholders for dynamic information such as the template, path, suffix and playlist parameters
● ...destinationSuffix: the destination suffix to append to the destination name (useful for
redundant configurations) - will replace the {suffix} placeholder
● ...template: the SLTA configuration - will replace the {template} placeholder
● ...basePath: the path to the clips
● ...path: the path to the channels JSON data storage
● ...suffix: the suffix for the channels data file
● ...log.path: the path to the SLTA instances logs.
22. Logging Configuration
<configuration>
<appender name="..." class="...">
...
</appender>
<logger name="..." level="..." />
<root level="...">
...
</root>
</configuration>
The logging configuration is divided into 3 major groups:
● appender defines where to "write" the log data
● logger sets a verbosity filter according to the source of the log data
● root activates the appenders
Logging is provided via the logback framework which provides an extensive documentation at this
web address: http://logback.qos.ch/manual/index.html
23. Logging: Appenders
Typically the following appenders are
configured:
● stdout: writes the log lines on the standard
output (useful if run on a terminal window)
● file: writes the log lines to (rolling) files
● database/db: writes the log lines as SQL
inserts in a logging database/table
24. Logging: Loggers
Loggers are configured to report only warnings
and errors from most of the programs.
Loggers will report also debug information from
the program core, unless we decide to
configure it differently.
27. Monitoring Configuration
The Channel Manager service listens for API
requests on port 8081/tcp, therefore this port
can be configured in Nagios to continuously
monitor the availability of the Channel
Manager service.
29. API Overview
● Middleware APIs: access point for
integrators.
● Channel Manager APIs: internal
communications.
30. APIs: roles
Administrators: can operate the full
platform and perform operations on
all the account and users.
In our examples, Yoda has "admin" as username and password.
Users: can only access their own
data.
In our examples, the Ewoks have "user" as username and password.
31. API: List of all channels
curl -X GET http://admin:admin@localhost/api/1/channels
32. API: list user channels
curl -X GET http://admin:admin@localhost/api/1/channels/ user
curl -X GET http://user:user@localhost/api/1/ me/channels
34. API: get details about a channel
curl -X GET
http://admin:admin@localhost/api/1/channels/ user↵
?path=channel1.mp4
curl -X GET
http://user:user@localhost/api/1/ me/channels↵
?path=channel1.mp4
35. API: add a clip to a channel
curl -X POST
http://admin:admin@localhost/api/1/channels/ user/↵
clips?path=channel1.mp4&clip=clip1.mp4 ↵
&clip=clip2.mp4
curl -X POST
http://user:user@localhost/api/1/ me/channels/ ↵
clips?path=channel1.mp4&clip=clip1.mp4 ↵
&clip=clip2.mp4