steven

Results 2 issues of steven

今日心血来潮,买了个服务器,准备做个聊天室 首先梳理一下流程 1.下载安装php7,prefix=/home/shenchenxi/data/study/php ....(make,makeinstall) 2.下载swoole, phpize(/home/shenchenxi/data/study/php/bin/phpize)生成configure 3../configure --with-php-config=/home/shenchenxi/data/study/php/bin/php 4.make(报错,) ![image](https://user-images.githubusercontent.com/45584543/49421501-30908700-f7cb-11e8-9276-0ad2fc6e1232.png) 我去,也真是日了狗,怎么问都问不出个花来

目前singleflight组件在这个场景下我还是不太满意的,所有请求进入,实际上就是注册一个通知, pub-sub模式,等唯一一个请求拿到返回的时候,挨个通知到所有请求。 但是在目前这个场景下,其实可以考虑直接使用mutex,拿锁的请求去获取内容,没拿到锁的降级处理 1. 直接等待(对客户不友好) 2. 降级处理,获取之前的数据。(对业务不友好) 这个值得讨论一下