hyperf / hyperf/socketio-server

redis 配置

Open
#24 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
26
Forks
6
PR merge metrics
No merged PRs in 30d

Description

1、我在使用的时候,重新配置了Hyperf\SocketIOServer\Room\AdapterInterface::class的对应关系,并在构造函数中修改了redis的配置信息,将dbIndex从0改动到了3.启动后数据仍然保存在db0中,如果通过watcher监听器重启,数据会同时储存在db0和db3中。
2、引入的tarit类Emitter在Hyperf\SocketIOServer\BaseNamespace中,虽然书写的时候避免方法名称冲突,可以避免问题。但是如果使用调度器模式,是不是会更方便。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Redis dbIndex behavior after rebinding Hyperf\SocketIOServer\Room\AdapterInterface::class and after a watcher restart. Inspect the constructor configuration and Hyperf\SocketIOServer\BaseNamespace, including its Emitter usage and dispatcher-mode question. Done means the intended database is used consistently and the Emitter design question has a documented decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, redis
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.