承接 mmb/thunder 相关项目开发

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

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

mmb/thunder

Composer 安装命令:

composer require mmb/thunder

包简介

README 文档

README

What Is Thunder?

Thunder run a listener to the telegram and open some process in the background (grouped by Tagger), and then pass the updates to child processes.

That means the application is ready to handle updates! Doesn't need to load all packages, configs, service providers per each update.

Installation

Easily install using:

composer require mmb/thunder:dev-main

Commands

Start Command

To start the thunder service, run this command:

php artisan thunder:start

Or run it in background process:

php artisan thunder:start > /dev/null &

Stop Command

To stop the thunder service that running in the background, run this command:

php artisan thunder:stop

This command send a message to main thunder process and request to stop that. It may take a long time, because the main process is blocked for listening to Telegram. You can send a message to Telegram to make it faster XD.

Hot Reload

If you change a code, the thunder process will not refresh the process (actually this is the point of thunder to speeding up). But you can run the following command to kill and reload the processes.

php artisan thunder:hot-reload

Customize

Publish

Publish the config with following command:

php artisan vendor:publish --tag=thunder

Puncher

Puncher is the way to open new process for a tag and update.

'driver' => 'process',

Currently, only "process" driver is available.

Release is time to release a tagged process when no updates are available for that.

'release' => 180,

Tagger

Tagging is grouping the updates to handle by a separate process.

'tagger' => [
    'class' => Tagger\ChatTagger::class,
],

You can customize tagger:

class UserTagger implements Tagger
{
    public function tag(Update $update) : string
    {
        return $update->getUser()?->id ?? 'global';
    }
}

Sharing

Sharing is the way to main process and child process should connect to each other and send messages.

'driver' => 'pipe',

Currently, only "pipe" and "file" driver is available.

Hook

Hook is settings for listening for updates.

The "long" key is the timeout for "getUpdates" method in Telegram api. This parameter is time to wait by telegram until new update passed.

'long' => 60,

mmb/thunder 适用场景与选型建议

mmb/thunder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 mmb/thunder 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-17