sh-4.2# composer require swooletw/laravel-swoolePHP Deprecated:Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Deprecated:Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Deprecation Notice:strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///www/server/php/80/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice:Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/src/Composer/Repository/ArrayRepository.php:277
Deprecation Notice:Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/src/Composer/Repository/ArrayRepository.php:277
Deprecation Notice:Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/src/Composer/Repository/ArrayRepository.php:277
Deprecation Notice:strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///www/server/php/80/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice:Return type of Composer\Repository\CompositeRepository::count() should either be compatible with Countable::count(): int,or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/80/bin/composer/src/Composer/Repository/CompositeRepository.php:180
Segmentation fault
高认可度评论:
造谣只凭一张嘴,请摆出你的证据。
不然,
据说除 PHP 以为的语言,都要收费了,每个开发者每年要收100万
。这个要具体场景具体分析吧,你的这个描述只能说加缓存,异步处理,减少IO,再不济就只有加机器加配置了 :see_no_evil:
swoole 什么时候收费了? 推荐swoole-cli + hyperf3 贼爽,orm是laravel的,基本无脑上手
swoole有收费的必要吗,收费的话市场有那么多可选择的,搞php多都去用workman了那。
没看懂,那现在瓶颈在哪里呢?有没有尝试增大队列的消费者数量,看起来很多东西要排查才行。
workman
swoole收费? 在哪里看到的?
谢邀,特意注册来喷,开源项目怎么收费?你把开源代码clone 下来他怎么收费?打车去你家敲门,不给钱就删你硬盘代码?!
你也可以选择:github.com/walkor/webman
轻轻松松开发分布式IM:github.com/walkor/GatewayWorker
造谣只凭一张嘴,请摆出你的证据。
不然,
据说除 PHP 以为的语言,都要收费了,每个开发者每年要收100万
。你这个是谣言,已经问了Swoole作者。
上go
额。。。事情是这样的,我的安装了swoole扩展以后,
composer require swooletw/laravel-swoole
就一直报错:然后我就去查原因,就查到了
https://learnku.com/articles/47250
这个文章,高赞回复说了商业化,也提到了open swoole
,然后不就上来疑问了??大家跑题了,我是问解决高并发的方案。。。。投票压力不是给到数据库的吗
你还是没说你的瓶颈在哪里,是代码执行慢了?是机器连接少了?宽带低了?数据库顶不住了?你说用了队列,那就大概是数据库顶不住的问题啊,和开发语言什么关系?你就是用c语言,数据库还是顶不住啊。
加配置 加机器 就行
具体问题具体分析,如上面几个老哥说的,为什么需要处理并发,是因为有大数据提交导致数据库顶不住压力,还是因为同时操作导致锁表,还是系统的处理响应速度慢了?其实并发的压力基本上都是在数据库的IO上,因此需要减轻数据库的压力:分表、分库、队列、读写分离都可以尝试一下。 在lphp里,可以使用队列,排队去消费,并且集中批量处理,或者使用redis的哈希表(数据库中进行分表,例如分0-9一共10个表)去接收提交的数据,不同的哈希表对应不同的数据表,然后分批批量处理(如果一个个插入数据库效率不高)。 在Go里,那就更简单了,队列+协程,或者管道+协程,也是分批、批量处理的操作。
Swoole一直都是开源免费的,建议修改帖子内容,有误解诱导性。
Redis不等于高并发,实际上算上IO成本,Redis跟MySQL的性能拉不开一倍。
你为啥要用laravel swoole 第三方库,不使用laravel 框架官方加速引擎呢?
已经迭代有2年半了,版本都发81个了 github.com/laravel/octane
学习swoole或是workerman困难的话可以看看这个
zhuanlan.zhihu.com/p/637624511
www.bilibili.com/video/BV1Dj411d7G...
swoole不会收费的 收费也只是官方的那几个商业项目收费 swoole 还要继续开源扩大影响力呢
webman你值得拥有
建议看看hyperf 框架,部分业务抽离出来使用协程处理
是持续的并发,还是短时的并发呢,具体并发的峰值是多少呢。不同的并发有不同的解决方法