定制 tridiamond/hprose-workerman 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tridiamond/hprose-workerman

Composer 安装命令:

composer require tridiamond/hprose-workerman

包简介

Combines Hprose with Workerman, compatitble with latest hprose 2.x

README 文档

README

Workerman is a framework for building multi-process servers in PHP. It allows you to build a Webserver or another kind of server - maybe for an API. Hprose is both, a protocol and RPC engine. It is modern, lightweight and amazingly fast. It's own serialization format supports objects, binary data and even more!

Introduction to Hprose

Hprose is a High Performance Remote Object Service Engine.

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

Hprose supports many programming languages, for example:

  • AAuto Quicker
  • ActionScript
  • ASP
  • C++
  • Dart
  • Delphi/Free Pascal
  • dotNET(C#, Visual Basic...)
  • Golang
  • Java
  • JavaScript
  • Node.js
  • Objective-C
  • Perl
  • PHP
  • Python
  • Ruby
  • ...

Through Hprose, You can conveniently and efficiently intercommunicate between those programming languages.

Usage

Install with composer

composer require tridiamond/hprose-workerman

Example: Create a Hprose-based workerman setup

<?php
# Standalone
require_once "Workerman/Autoloader.php";
require_once "Hprose.php"; # If you run the native PECL extension, you won't need this.

# Using composer
require_once "vendor/autoload.php";

// Create the worker
$host = "127.0.0.1";
$port = 9999;
$worker = new \Workerman\Hprose($host, $port);
// Set options
$worker->count = 4;
$worker->reloadable = true;

// Add a function
function hello($w) { return "Hello, $w!"; }
$hprose = $worker->hprose();
$hprose->addFunction("hello");

// Start the Workerman framework, run the worker(s)...
\Workerman\Worker::runAll();

You now have a Workerman instance with 4 workers listening on your local port 9999. This server balances requests upon processes and lets you scale your application.

Note

This little module was originally coded by Kevin Ingwersen (Ingwie Phoenix), I have completely rebuilded it to make it more efficient and best of all SUPPORTS latest Hprose and Workerman versions.

License

This code is released by the standard MIT license.

Author

This little module was coded/modified by TriDiamond Hprose was originally developed by Ma Bingyao

tridiamond/hprose-workerman 适用场景与选型建议

tridiamond/hprose-workerman 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 09 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 tridiamond/hprose-workerman 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-13