Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.0 release #201

Closed
downsider opened this issue Jun 14, 2021 · 13 comments
Closed

PHP 8.0 release #201

downsider opened this issue Jun 14, 2021 · 13 comments

Comments

@downsider
Copy link

Firstly, I appreciate all the time and effort that has been put into this extension and thank you very much for it.

I'm very eager to see a release for PHP 8. Do you have any kind of ETA for this?

I don't need a fixed date, more like "it's close", "far away", "something in between", kinda thing.

@nelolka
Copy link

nelolka commented Jun 17, 2021

I've compiled it for windows
Download

@Tofandel
Copy link

It looks like it's already working for PHP8 but not released for PECL yet

@downsider
Copy link
Author

downsider commented Jun 21, 2021

Yeah, I really just need it to be tagged at some point. I'm fine with building it from source, but my company doesn't like using unreleased software, for obvious reasons

@krakjoe
Copy link
Owner

krakjoe commented Aug 4, 2021

The fact is the future of parallel is in jeopardy because of fibers in core: The core has chosen a concurrency model and it doesn't accommodate threads. Fibers and parallel threads cannot interact with each other in a predictable way because of the way CSP is implemented in parallel. Some people think that's not a problem, but I disagree, I don't think you'll be able to make full use of either fibers or threads while the two cannot interact with each other.

I've heard a few people say that they would like me to continue to maintain parallel, including the author of the Fiber RFC and some of its supporters. However, I wrote parallel for inclusion into PHP, and today it looks like that is never going to happen.

I don't use parallel for anything personally, nor do I use it at work. I can't justify spending time on it.

I have a few sponsors on github but nowhere near enough to change my mind that this project is probably a dead end.

@Tofandel
Copy link

Tofandel commented Aug 4, 2021

I guess that's okay, I don't think php ever wanted to go with threads, it's always been super hard to compile a php version that is threadsafe and then install libs like parallel to use (personally tried 5 times over the years and never succeeded once).. I guess it would have been a better choice for performance but in the end, we just want an easy way to write and use async functions which has never been directly available in php, maybe one day they'll make php threadsafe by default but I doubt it

I'm just happy it's going somewhere and not having to wait another 10 years to see that happen

Just a bit sad to see years of efforts and work thrown away

Cheers

@ziaratban
Copy link

Hi Joe,
First let me tell you a little bit about my feeling about the parallel project.
A few months ago I realized that in PHP's new versions, the paraller feature is added, so I was very happy. It is about 7 years that I am coding in PHP and I really enjoy this language. I have a lot of interest in writing CLI programms with the PHP language and I believe that parallel is a neccesity for this.

PHP not supporting multithreading is painful
I know that how much you have worked on this project and I really thank you for the work that you and other developers have done. The parallel project is the outcome of the experience that you have had on the pthread and this progress is really great. I always had this thought that if one day I could become a sponser, my first priority will be PHP developers, and I have a good feeling about this thought.

  1. but what is the reason that PHP's core doesn’t support multithreading?
  2. Does Fibre really cover all our needs and can it be a substitute to multitreading?
    https://wiki.php.net/rfc/fibers#how_do_various_fibers_access_the_same_memory
  3. Why doesn’t PHP support multithreading, which is one of the important features?
  4. Why should PHP withhold itself, when parallel and cloud processing is becoming more popular these days?
  5. Why is it when other languages compete on the parallel programming subject, PHP has a cold view on this subject?
  6. Does the parallel project have exactly this problem in amp?
  7. Do you have a substitute for the parallel project?

I really don’t have a good feeling and this if this project reaching a deadend is very unpleasant. But these questions will always stay in my mind.

Regards
Abolfazl Ziaratban

@jkroonza
Copy link

@krakjoe - reading the above sadens me. I really get that you don't use it personally, and that's probably OK. However, Fibers really is no substitute for this in any way. This project really helped us solve a major problem where we could get checks that previously took hours down to minutes.

Consider calls that blocks, without any non-blocking alternatives, eg code involving dns_get_record() - our use case - where you simply pass a label, and a type, or calls to pretty much all things SQL based (from what I can tell). In fact, Fibers really only seems to solve cases that doesn't need solving (ie, has alternative solutions). So unless someone can show me how to take a sequence of say 10k DNS names, and have a concurrent resolver resolving say 10 of these names in parallel at a time using fibers ...

Now our only alternative is going to another language, probably some C in this case where we can use getaddrinfo_a ... but then our interactions with SOAP becomes a nightmare again.

I note there are availability of PHP8, in spite of PHP8.2 not working (or there's reports). Any chance we can get a tagged release at least for version 8.0/8.1 perhaps?

Given the overall demand for this, I'm hopeful that others should be able to contribute fixes for newer PHP versions based on the framework you've already provided.

@jerrac
Copy link

jerrac commented Jun 28, 2022

#201 (comment) throws a wrench into my current side project... :( A couple years ago I wrote an app that used pthreads to multithread. It let me process some data fast enough my target server couldn't keep up. It was pretty awesome, and I was sad work decided to buy from a vendor instead...

I was really hoping to do something similar in my current project.

Question, does Fiber make it impossible to do real multithreading?

@jkroonza
Copy link

Question, does Fiber make it impossible to do real multithreading?

Short answer: Yes. Fiber is similar to the way multi-threading would work under DOS.

@jerrac
Copy link

jerrac commented Jul 5, 2022

Ok. Thanks for the info.

Thanks to @krakjoe for the work he did on both this and pthreads. Would have been awesome if it had made it into core.

@cmb69 cmb69 mentioned this issue Aug 8, 2022
@sirsnyder
Copy link

Question, does Fiber make it impossible to do real multithreading?

No, fibers are green threads. Multiple switching stacks in one process, still tied to one CPU core. See https://wiki.php.net/rfc/fibers#why_not_add_an_event_loop_and_asyncawait_api_to_core

@krakjoe
Copy link
Owner

krakjoe commented Oct 24, 2022

It's coming #250

@krakjoe krakjoe closed this as completed Oct 24, 2022
@davidvigoda2022
Copy link

Why are the new features of PHP v8.1 mentioned in the official documentation not compiled in the core of PHP v8.1, and how can I enable Fiber in PHP v8.1 on Debian 11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants