承接 dereuromark/cakephp-queue 相关项目开发

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

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

dereuromark/cakephp-queue

Composer 安装命令:

composer require dereuromark/cakephp-queue

包简介

The Queue plugin for CakePHP provides deferred task execution.

README 文档

README

CI Coverage Status Latest Stable Version Minimum PHP Version PHPStan License Total Downloads Coding Standards

This branch is for use with CakePHP 5.1+. For details see version map.

Background

This is a very simple and minimalistic job queue (or deferred-task) system for CakePHP. If you need a very basic PHP internal queue tool, this is definitely an option. It is also a great tool for demo purposes on how queues work and doesn't have any dependencies.

Overall functionality is inspired by systems like Gearman, Beanstalk or dropr, but without any illusion to compete with these more advanced Systems.

The plugin is an attempt to provide a basic, simple to use method to enable deferred job execution, without the hassle of setting up or running an extra queue daemon, while integrating nicely into CakePHP and also simplifying the creation of worker scripts. You can also easily provide progress and status information into your pages.

Please also read my blog posts about deferred execution and real-life example usage [new]. For more high-volume and sophisticated use cases please see the awesome list alternatives.

Why use deferred execution?

Deferred execution makes sense (especially in PHP) when your page wants to execute tasks, which are not directly related to rendering the current page. For instance, in a BBS-type system, a new users post might require the creation of multiple personalized email messages, notifying other users of the new content. Creating and sending these emails is completely irrelevant to the currently active user, and should not increase page response time. Another example would be downloading, extraction and/or analyzing an external file per request of the user. The regular solution to these problems would be to create specialized cronjobs which use specific database states to determine which action should be done.

The Queue plugin provides a simple method to create and run such non-user-interaction-critical tasks.

Another important reason is that specific jobs can be (auto)retried if they failed. So if the email server didn't work the first time, or the API gateway had an issue, the current job to be executed isn't lost but kept for rerun. Most of those external services should be treated as failable once every x calls, and as such a queue implementation can help reducing issues due to such failures. If a job still can't finish despite retries, you still have the option to debug its payload and why this job cannot complete. No data is lost here.

While you can run multiple workers, and can (to some extent) spread these workers to different machines via a shared database, you should consider using a more advanced system for high volume/high number of workers systems.

Demo

See Sandbox app.

Installation and Usage

Full documentation: https://dereuromark.github.io/cakephp-queue/

Cronjob based background scheduling

If you are looking for scheduling certain background jobs: This plugin works flawlessly with QueueScheduler plugin.

dereuromark/cakephp-queue 适用场景与选型建议

dereuromark/cakephp-queue 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 949.91k 次下载、GitHub Stars 达 308, 最近一次更新时间为 2013 年 11 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 dereuromark/cakephp-queue 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 949.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 309
  • 点击次数: 26
  • 依赖项目数: 16
  • 推荐数: 3

GitHub 信息

  • Stars: 308
  • Watchers: 19
  • Forks: 138
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-11-18