trinity/messages
Composer 安装命令:
composer require trinity/messages
包简介
Trinity Messages bundle
README 文档
README
#Messages This bundle provides basic framework for transferring data.
It is based on simple idea: to have a unified process of sending, receiving, packing(serializing) and unpacking(unserializing) data across multiple(or single one) systems.
This bundle is meant to be used for client-server communication. But it is usable in any other form or communication.
The bundle itself does not provide any way of actual "sending" of the messages. It can be therefore used with e.g. rabbitMQ or HTTP.
The bundle defines basic "protocol" for sending the messages by defining all the field that are required.
Each message is "signed" with very basic method. Each sender and receiver has it's id(public key) and secret(secret key).
##Each message sent(serialized) has:
- uid - unique identification of the message
- clientId - unique identification of the client which is either sender of this message or which is the message meant to be sent to. It is used on server to choose a private key to check hash of the message.
- jsonData - the data which are sent in the message
- hash - simple hash of the message information and data
- type - type of the message. This field is used while unpacking the message
- parentMessageUid - uid of the message which is this message responding to
- sender - identification of the sender - it can be anything you need. It is meant to be used by the lower level classes which are responsible for actual sending of the message(via rabbitMQ, HTTP, etc.)
- destination - identification of the sender - it can be anything you want. It is meant to be used by the lower level classes which are responsible for actual sending of the message(via rabbitMQ, HTTP, etc.)
- user - identification of the user which made the message. If you need to know who is responsible for the message.
trinity/messages 适用场景与选型建议
trinity/messages 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.58k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 trinity/messages 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 trinity/messages 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.58k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-06