Closed wagnert closed 4 years ago
Hey Tim,
Regarding your questions:
Broadly, yes, this is a project I will be coming back to. However, I would not like to recommend to you (or anyone else) to start using this extension in production until I have started development on it again. Since Parallel is currently being actively developed and maintained, it would be a better idea to look into that extension instead for your multithreading needs.
Multithreaded sockets are not possible with this extension. This may be introduced in future, however that is some way off.
I don't think there are any performance benchmarks on this.
No migration path exists between the two extensions, because they are very different in how they approach things. Going from one to the other will require a complete rewrite, and so trying to outline a migration path isn't going to be particularly useful.
I do hope to get back to this project in the not-too-distant future :) Thanks!
For whats its worth, re point 4, Parallel is also wildly different from pthreads. As of this writing Mr. Watkins has not released a migration guide per se (and may not). So it's still 6 in one hand, half dozen in the other.
Hi Thomas,
thanks for your quick answer. As we need socket support, I think it'll actually don't make sense to migrate. We'll have a look at pht in the future again to see how the development will go on.
We hope that you'll find the time to improve pht as it seems to be a very interesting project :)
Best Regards
@wagnert
Hello, wagnert!
I am interested in your project, you can check my code, maybe it helps you.
https://gist.github.com/zhaoyanliang2/ded89c60251c6320278c9313dbd93f52
I actually use it on Windows, in theory it should be able to use it on Linux as well.
It provides two php functions, stream_fd_fetch
stream_fd_attach
.
Hi @zhaoyanliang2 thanks for asking. As I'm not really into C development, so I'm not the right one to decide if it can help or not. If you'll provide a PHP extension that provides multithreaded socket support, I'll install and test it for sure :)
Hi Thomas,
I'm one of the core developers of appserver.io a PHP application server. As we have been one of the first that uses pthreads, you have maybe heard of that project. We still stuck a little bit on PHP 5.6 as Joe has breaking changes from pthreads 2 to 3 and we didn't find the time to update yet. As Joe Watkins mentioned, that pthreads will not be supported anymore, we're looking for a replacement of pthreads to update appserver.io to PHP 7+ and found pht which seems very promising. I've some questions and we'll be happy to hear your thoughts about that
In one of the previous issues I see that you actually don't have the time to work on pht, but hopefully that'll change in the future :)
Best Regards