{"id":15374343,"url":"https://github.com/yurunsoft/swoole-shared-memory","last_synced_at":"2025-04-15T12:31:31.760Z","repository":{"id":47018979,"uuid":"162391698","full_name":"Yurunsoft/swoole-shared-memory","owner":"Yurunsoft","description":"Swoole Shared Memory (简称 SSM) 是为了解决 Swoole 常驻内存场景，多进程变量共享问题而开发的组件。","archived":false,"fork":false,"pushed_at":"2021-09-17T08:16:01.000Z","size":166,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:03:33.827Z","etag":null,"topics":["php","sharedmemory","swoole"],"latest_commit_sha":null,"homepage":"https://gitee.com/yurunsoft/swoole-shared-memory","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yurunsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T06:18:42.000Z","updated_at":"2024-12-16T05:34:33.000Z","dependencies_parsed_at":"2022-09-04T14:41:19.036Z","dependency_job_id":null,"html_url":"https://github.com/Yurunsoft/swoole-shared-memory","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Fswoole-shared-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Fswoole-shared-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Fswoole-shared-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yurunsoft%2Fswoole-shared-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yurunsoft","download_url":"https://codeload.github.com/Yurunsoft/swoole-shared-memory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072220,"owners_count":21208141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","sharedmemory","swoole"],"created_at":"2024-10-01T13:58:24.160Z","updated_at":"2025-04-15T12:31:31.495Z","avatar_url":"https://github.com/Yurunsoft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swoole-shared-memory\n\n[![Latest Version](https://img.shields.io/packagist/v/yurunsoft/swoole-shared-memory.svg)](https://packagist.org/packages/yurunsoft/swoole-shared-memory)\n[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg)](https://secure.php.net/)\n[![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.1.0-brightgreen.svg)](https://github.com/swoole/swoole-src)\n[![IMI License](https://img.shields.io/github/license/Yurunsoft/swoole-shared-memory.svg)](https://github.com/Yurunsoft/swoole-shared-memory/blob/master/LICENSE)\n\n## 介绍\n\n`Swoole Shared Memory` ( 以下简称 `SSM` ) 是为了解决 `Swoole` 常驻内存场景，多进程变量共享问题而开发的组件。\n\n`SSM` 直接支持任意变量的跨进程共享，它是通过序列化和反序列化实现的。不仅支持常用的 `KV` 操作，还支持`Stack`、`Queue` 和 `PriorityQueue`数据结构操作。\n\n`SSM` 通过 `Unix Socket` 内核通信，不走网卡，效率极高。无需预先定义空间大小、字段等，甚至可以与 `fpm` 项目进行变量共享 ( `fpm` 项目仅可作为客户端 )。\n\n你只需要在 `Swoole` 自定义进程中启动 `SSM` 服务来监听 `Unix Socket`，或者也可以启动一个独立的 `SSM` 服务。\n\n## Composer\n\n本项目可以使用composer安装，遵循psr-4自动加载规则，在你的 `composer.json` 中加入下面的内容:\n\n```json\n{\n    \"require\": {\n        \"yurunsoft/swoole-shared-memory\": \"~1.0\"\n    }\n}\n```\n\n然后执行 `composer update` 安装。\n\n## 文档\n\n[API 文档](https://apidoc.gitee.com/yurunsoft/swoole-shared-memory) (感谢码云提供服务)\n\nQQ群：17916227 [![点击加群](https://pub.idqqimg.com/wpa/images/group.png \"点击加群\")](https://jq.qq.com/?_wv=1027\u0026k=5wXf4Zq)，如有问题会有人解答和修复。\n\n## 运行环境\n\n- [PHP](https://php.net/) \u003e= 7.1\n- [Composer](https://getcomposer.org/)\n- [Swoole](https://www.swoole.com/) \u003e= 4.1.0\n\n## 版权信息\n\nSwoole Shared Memory 遵循 MIT 开源协议发布，并提供免费使用。\n\n## 捐赠\n\n\u003cimg src=\"https://raw.githubusercontent.com/Yurunsoft/swoole-shared-memory/dev/res/pay.png\"/\u003e\n\n开源不求盈利，多少都是心意，生活不易，随缘随缘……\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurunsoft%2Fswoole-shared-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurunsoft%2Fswoole-shared-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurunsoft%2Fswoole-shared-memory/lists"}