Thanks for your great work every day :blush:
I build all my setups due to a setup-script for all purposes.
Now, there comes a change about dependencies - started with _hiredis_.
Built-in hiredis dependency, no longer needed to compile it separately, refactor Co\Redis, more stable
Will this happen with _mysqlnd_ and _libpq_, too? With _nghttp2_, _openssl_, and so on?
_Why_ is this now handled by swoole? When will others follow?
Good issue, It’s what everyone cares about.
The developers who use the redis class in swoole are so much. The installation of hiredis troubled too many newbies. But this is not the most important reason.
We used the asynchronous callback method to implement the coroutine in C. The timing problem of asynchronous callback caused the lack of stability to plague us for a long time. Now we have the full coroutine (the C and the PHP layer are both coroutine modes), we directly hooked the source code of hiredis, realizing a high stability version.
The dependencies of other libraries are not as complicated as redis, and there are not many developers who need nghttp2, postgre, etc. Those who really need to use them must have the ability to compile them. mysqlnd only provides a mysql_escape method, and openssl Is a very basic library. We can't integrate everything, no project will do this, but we will try to remove the dependency, nghttp2 dependency removal is possible, we only use its header compression function, In the future, we will take the time to complete it.
That is what we are after. In the future, we may release a Swoole Boot, a simple Swoole installation tool.
在swoole中使用redis类的开发者实在是太多了, hiredis的安装困扰着一大堆新手, 当然这不是首要原因.
我们之前底层使用的是异步回调的方式来构造协程, 其中存在异步回调的时序问题导致稳定性不足一直困扰着我们, 现在我们有了全协程(即C底层和PHP层都是协程模式), 直接hook了hiredis的源码, 实现了真正的高稳定
其它类库的依赖不像redis这么复杂, 并且需要nghttp2, postgre等库的开发者并不多, 真正需要使用它们的人必然具备了编译它们的能力, mysqlnd只提供了一个mysql_escape方法而已, 而openssl是一个很基本的库. 我们不可能集成所有的东西, 没有哪个项目会这么做, 但我们会尽量移除依赖, nghttp2的依赖移除是有可能的, 我们只用到了它的首部压缩功能, 未来我们会抽时间完成
这是我们所追求的, 未来我们可能会创造一个Swoole Boot, 一个傻瓜式的Swoole安装工具
Very good explanation, thank you very much :+1:
Issue can be closed at your timing
Most helpful comment
Good issue, It’s what everyone cares about.
The reason to include hiredis
The developers who use the redis class in swoole are so much. The installation of hiredis troubled too many newbies. But this is not the most important reason.
We used the asynchronous callback method to implement the coroutine in C. The timing problem of asynchronous callback caused the lack of stability to plague us for a long time. Now we have the full coroutine (the C and the PHP layer are both coroutine modes), we directly hooked the source code of hiredis, realizing a high stability version.
Will other dependencies be integrated?
The dependencies of other libraries are not as complicated as redis, and there are not many developers who need nghttp2, postgre, etc. Those who really need to use them must have the ability to compile them. mysqlnd only provides a mysql_escape method, and openssl Is a very basic library. We can't integrate everything, no project will do this, but we will try to remove the dependency, nghttp2 dependency removal is possible, we only use its header compression function, In the future, we will take the time to complete it.
Better Swoole development experience
That is what we are after. In the future, we may release a Swoole Boot, a simple Swoole installation tool.
集成hiredis是有原因的
在swoole中使用redis类的开发者实在是太多了, hiredis的安装困扰着一大堆新手, 当然这不是首要原因.
我们之前底层使用的是异步回调的方式来构造协程, 其中存在异步回调的时序问题导致稳定性不足一直困扰着我们, 现在我们有了全协程(即C底层和PHP层都是协程模式), 直接hook了hiredis的源码, 实现了真正的高稳定
其它依赖会被集成吗?
其它类库的依赖不像redis这么复杂, 并且需要nghttp2, postgre等库的开发者并不多, 真正需要使用它们的人必然具备了编译它们的能力, mysqlnd只提供了一个mysql_escape方法而已, 而openssl是一个很基本的库. 我们不可能集成所有的东西, 没有哪个项目会这么做, 但我们会尽量移除依赖, nghttp2的依赖移除是有可能的, 我们只用到了它的首部压缩功能, 未来我们会抽时间完成
更好的Swoole开发体验
这是我们所追求的, 未来我们可能会创造一个Swoole Boot, 一个傻瓜式的Swoole安装工具