jdare/clank-bundle
Composer 安装命令:
composer require jdare/clank-bundle
包简介
Symfony ClankBundle
README 文档
README
About
Clank is a Symfony2 Bundle designed to bring together WebSocket functionality in a easy to use application architecture.
Much like Socket.IO it provides both server side and client side code ensuring you have to write as little as possible to get your app up and running.
Powered By Ratchet and Autobahn JS, with Symfony2
Resources
- Installation Instructions
- Client Javascript
- Server Side of RPC
- PubSub Topic Handlers
- Periodic Services(functions to be run every x seconds with the IO loop.)
- Session Management
- Clank Server Events
Code Cookbook
Sample Projects
- Clank Chat (View Source) This is a simple chat room site where a user can join any channel and chat to people there.
Installation Instructions
###Step 1: Install via composer Add the following to your composer.json
{ "require": { "jdare/clank-bundle": "0.1.*" } }
Then update composer to install the new packages:
php composer.phar update
###Step 2: Add to your App Kernel
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new JDare\ClankBundle\JDareClankBundle(), ); }
###Step 3: Add to Assetic Bundles
Add "JDareClankBundle" to your assetic bundles in app/config (this is required to render the client side code).
# Assetic Configuration assetic: ... bundles: [ JDareClankBundle ]
###Step 4: Configure WebSocket Server
Add the following to your app/config.yml
# Clank Configuration clank: web_socket_server: port: 8080 #The port the socket server will listen on host: 127.0.0.1 #(optional) The host ip to bind to
Note: when connecting on the client, if possible use the same values as here to ensure compatibility for sessions etc.
Step 5: Launching the Server
The Server Side Clank installation is now complete. You should be able to run this from the root of your symfony installation.
php app/console clank:server
If everything is successful, you will see something similar to the following:
Starting Clank
Launching Ratchet WS Server on: *:8080
This means the websocket server is now up and running!
Next Steps
For further documentations on how to use Clank, please continue with the client side setup.
jdare/clank-bundle 适用场景与选型建议
jdare/clank-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 982.07k 次下载、GitHub Stars 达 130, 最近一次更新时间为 2013 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Web Socket Application」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jdare/clank-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jdare/clank-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jdare/clank-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
Model of a web-based resource
Retrieve a WebResourceInterface instance over HTTP
A Laravel queue connector to process jobs at the end of the application
NO LIBRARIES socket per page bridge for your Laravel application.
C3JS By phpanonymous (Mahmoud Ibrahim)
统计信息
- 总下载量: 982.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 130
- 点击次数: 6
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-02-02