承接 stanislav-web/sonar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stanislav-web/sonar

Composer 安装命令:

composer require stanislav-web/sonar

包简介

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

ChangeLog

[v1.2.2-alpha] 2015-09-27

- add debugger (show verbose in config)
- change cache session (to shared memory)

[v1.2-alpha] 2015-09-22

- configurable error log
- add cache session (memcache)
- silent error logger (warnings & noticies)

[v1.1-alpha] 2015-09-21

- implementing geo location detector

[v1.0-alpha] 2015-09-20

- the first version of package
- socket application named as "Sonar"
- implemented:
    - tracking user's page position
    - tracking user's page timing activity
    - tracking user's device (phone, table, pc)
    - tracking the time of each page

Compatible

  • PSR-1, PSR-2, PSR-4 Standards

System requirements

  • PHP 5.5 or higher
  • Phalcon PHP extension 1.3.4 (support 2.x)
  • PHP MongoDb client extension
  • Beanstalk queue server

Installation

First update your dependencies through composer. Add to your composer.json:

"require": {
    "stanislav-web/sonar": "dev-master",
}

Then run to update dependency and autoloader

php composer.phar update
php composer.phar install

or just

php composer.phar require stanislav-web/sonar dev-master

(Do not forget to include the composer autoloader)

Configuration

This package have a variety of settings, both mandatory and optional.

  1. You can select them in the global app configuration file of your Phalcon project if you will be making their to global application config. See example:
    // CLI task's configuration (required)

    'cli' => [

        // Sonar task configuration
        'sonar' =>  [
            'debug'     =>   true,  // verbose mode
            'errors'    =>   true,  // add errors to logfile
            'cache'     =>   true,  // enable cache
            'errorLog'  =>   APP_PATH.'/../logs/sonar-error.log',

            // queue client configurations
            'beanstalk'        =>  [
                'host'  =>  '127.0.0.1',
                'port'  =>  11300,
            ],

            // webscoket server configuration
            'socket'        =>  [
                'host'  =>  '127.0.0.1',
                'port'  =>  9003,
            ],

            // db storage configuration (Mongo)
            'storage'       =>  [
                'host'      =>  '127.0.0.1',
                'port'      =>  27017,
                'user'      =>  'root',
                'password'  =>  'root',
                'dbname'    =>  'sonar',
            ]
        ]
    ];
  1. Register task in your Phalcon CLI autoloader:
    $loader = new \Phalcon\Loader();
    $loader->registerDirs([
        ...
        DOCUMENT_ROOT.'vendor/stanislav-web/sonar/src/Sonar/System/Tasks'
        ...
    ]);
  1. Running socket server using CLI from your project. And tracking user thought web interface (not yet implemented):
php public/cli.php sonar

(examples of client connect you can see here)

Unit Test

Also available in /phpunit directory. Run command to start

// Create mongo user
mongo

use sonar_test

db.createUser({
        user: "test_user",
        pwd: "test_password",
        roles: [ { role: "userAdmin", db: "sonar_test" } ]
    }
)
phpunit --configuration phpunit.xml.dist --coverage-text

or from your project root: 

phpunit --configuration ./vendor/stanislav-web/sonar/phpunit.xml.dist --coverage-text

In Future

  • More examples
  • Output working

Documents

##Issues

stanislav-web/sonar 适用场景与选型建议

stanislav-web/sonar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 9, 最近一次更新时间为 2015 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「site visitor」 「site visitor grabber」 「users monitor」 「phalcon mongo」 「mongo visitors grabber」 「site visitor monitor」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 stanislav-web/sonar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 stanislav-web/sonar 我们能提供哪些服务?
定制开发 / 二次开发

基于 stanislav-web/sonar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 31
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-21