OpenRTMFP/Cumulus Primer(1)入门介绍与部署CumulusServer
1 背景介绍
OpenRTMFP 可以帮助你实现 Flash 的实时应用的高并发扩展,OpenRTMFP/Cumulus 是基于 GNU General Public License 的。
- OpenRTMFP: Real Time Media Flow Protocol
- POCO: POrtable COmponents,是一个强大的开源 C++ 库。其在 C++ 开发中的角色,相当于 Java Class Library、苹果的 Cocoa、.NET framework。
2 准备工作
下载:
注意:
- POCO for linux: 版本必须是 1.4.0 或更高,否则会引起 TCP 相关的 bug。
3 安装
3.1 外部依赖的安装
Windows 下略,Linux 下基本就是:
./configure
make
sudo make install
3.2 安装 OpenRTMFP/Cumulus
OpenRTMFP-Cumulus/CumulusLib
make
cd ../CumulusServer
make
如果出现了.h
文件、lib 库找不到的情况,请修改 OpenRTMFP-Cumulus/CumulusLib/Makefile 或 OpenRTMFP-Cumulus/CumulusServer/Makefile。
4 配置
通过编写OpenRTMFP-Cumulus/CumulusServer/CumulusServer.ini
文件来为 OpenRTMFP-Cumulus 进行个性化配置(默认是没有这个文件的),这个文件的内容形如:
;CumulusServer.ini
port = 1985
udpBufferSize = 114688
keepAlivePeer = 10
keepAliveServer = 15
[logs]
name=log
directory=C:/CumulusServer/logs
一些字段的设置含义如下,摘自:地址
- 公开给 Client 的端口号:
port
, equals 1935 by default (RTMFP server default port), it’s the port used by CumulusServer to listen incoming RTMFP requests.
- UDP 缓冲区字节数:
udpBufferSize
, allows to change the size in bytes of UDP reception and sending buffer. Increases this value if your operating system has a default value too lower for important loads.
-
keepAliveServer
, time in seconds for periodically sending packets keep-alive with server, 15s by default (valid value is from 5s to 255s).
-
keepAlivePeer
, time in seconds for periodically sending packets keep-alive between peers, 10s by default (valid value is from 5s to 255s).
-
edges.activated
, activate or not the edges server on the RTMFP server (see CumulusEdge, Scalability page for more details about CumulusEdge). By default, CumulusServer stays a RTMFP server without edges ability (default value is false).
-
edges.port
, port for the edges server, to accept incoming new CumulusEdge instances (see CumulusEdge, Scalability page for more details about CumulusEdge). By default, it’s the port 1936.Warning: This port will receive plain text request from edges, for this purpose it should not be made public. It’s very important for security consideration. It must be available only for CumulusEdge instances, and anything else.
-
edges.attemptsBeforeFallback
, number of CumulusEdge attempt connections before falling back to CumulusServer (see CumulusEdge, Scalability page for more details about CumulusEdge). By default the value is 2 (in practical, 2 attempts happens after 5 sec approximately).
-
smtp.host
, configure a SMTP host to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is localhost.
-
smtp.port
, configure a SMTP port to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is 25.
-
smtp.timeout
, configure a SMTP timeout session in seconds to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is 60 seconds.
- 日志路径:
logs.directory
, directory where are written log files (CumulusServer/logs by default).
- 日志文件名称:
logs.name
, name of log file (log by default).
5 启动
Windows 下的启动方法为:
CumulusServer.exe /registerService [/displayName=CumulusServer /description="Open Source RTMFP Server" /startup=automatic]
Unix-like 下的启动方法为:
sudo ./CumulusServer --daemon [--pidfile=/var/run/CumulusServer.pid]
如我的启动命令为:
sudo ./CumulusServer --daemon --pidfile=./CumulusServer.pid
6 基本使用
本地 Flash client 可以通过如下语句连接:
var nc:NetConnection = new NetConnection();
nc.connect("rtmfp://localhost/");
RTMFP
默认是采用1935
端口,如果你特别指定了其他端口,比如12345
,请使用如下方式:
nc.connect("rtmfp://localhost:12345/");
7 扩展 CumulusServer——Server Application
启动CumulusServer
后,会在可执行文件的目录下出现一个www
目录,该目录的作用,就是作为 Server Application 的默认根目录。具体的对应关系如下:
rtmfp://host:port/ -> [CumulusServer folder]/www/main.lua (root application)
rtmfp://host:port/myApplication -> [CumulusServer folder]/www/myApplication/main.lua
rtmfp://host:port/Games/myGame -> [CumulusServer folder]/www/Games/myGame/main.lua
另外要提醒的是,如果main.lua
文件被修改,则不需要重启CumulusServer
,因为 Server Application 的创建是一种动态的方式。
CumulusServer 的详细扩展方式会在下一篇文章中介绍。
-
转载请注明来自柳大的CSDN博客:Blog.csdn.net/poechant
-
分享到:
相关推荐
OpenRTMFP Cumulus Primer()入门介绍与部署CumulusServer.pdf
openrtmfp又名Cumulus Server是一个完全开源和跨平台的可扩展的RTMFP服务器脚本。Cumulus Server在GPL 框架下遵循速度、优势、跨平台、轻量和高质量代码。Cumulus Server的每一个版本都是通过严格测试和审核的。可...
这本食谱在 vanilla Debian 上创建了一个交换机覆盖,并且还部署在 Cumulus 路由器/交换机上。 要求 测试 访问 Debian Wheezy 盒子 生产 访问 Cumulus HCL [1] 开关(Accton AS6701_32X,这就是这本食谱最初的目的)...
高性能计算云 目标 ...$ vi /opt/hpccloud/cumulus/cumulus/conf/config.json +- > Fix host to be localhost +- > baseUrl: " http://localhost:8080/api/v1 " , $ sudo service celeryd restar
cumulus4.4.0 镜像,可加载到EVE环境。测试好使。
这里给出了cumulus/OpenRTMFP的git官网提到的视频会话样例的AS3代码,包括服务器端和客户端两部分,我已经在<使用Cumulus和Flash Player搭建视频会议示例>http://blog.csdn.net/tao_627/article/details/18041473中给...
积云Cumulus 是的免费、开源替代品,它利用您自己的 S3 进行存储。下载您可以在下载最新版本更改默认截图目录这是可选的。 默认情况下,OS X 会将屏幕截图放在您的桌面上。 但是,如果您希望他们去其他地方,您可以...
积云框架 :open_book: 文献资料 最新文档。... DR-如果需要将devDependency添加到程序包,请将其添加到顶级package.json文件,而不是与单个程序package.json关联的package.json 。 安装 这是用于Cumulus开
您的默认AWS凭证应与用于部署的凭证相同。 要使用其他堆栈名称,请更新app/config.yml , iam/config.yml和deployer/config.yml 。 运行测试时,默认情况下,测试将使用spec/config.yml定义的配置来尝试执行工作...
用Lua编写HelloWorld应用扩展CumulusServer
用于为 Cumulus API 生成和部署仪表板的代码。 文档 其他页面: 配置 仪表板由从 Cumulus API 检索到的数据填充。 在构建和部署仪表板之前,必须预先确定和设置 Cumulus API 的环境。 配置仪表板所需的信息可在app/...
大名鼎鼎的WP-CUMULUS 3D标签云,已经改成支持中文标签,可在.htm自行添加标签链接,可以单机玩耍测试,不需要安装WordPress然后装插件~~ 主要是有些童鞋只是想要3D标签云动画,所以就提取重要文件出来稍作修改下.
包括swfobject.js和tagcolud.swf中文支持文件。
NULL 博文链接:https://lullabyus.iteye.com/blog/790150
不错的标签云,喜欢立体效果的博客主或者网站主可以试试看哦!强力推荐
#资源达人分享计划#
Mellanox Cumulus学习,基本使用,培训资源
Flex P2P 音视频流客户端(Cumulus支持)
根据设计,Cumulus只会做一件事情,而一件事情做得很好:与REST资源进行交互,并自动将通过有线方式传输到本机,通用类型的数据编码/解码。 因此,您可以将Cumulus放入任何系统中,并且可以在无需对现有代码进行大量...
以下是如何在IRIS Scientific OpenStack云上使用Magnum创建的Kubernetes集群的一些示例,例如: ://cumulus.openstack.hpc.cam.ac.uk 这是由STFC IRIS云提供资金的数字资产: : 贡献 如果您有任何问题,请提出一...