Hacker Newsnew | comments | show | ask | jobs | submit login

> So it's desirable to eventually converge PHP and JavaScript?

PHP has always been about making coding easy and fun. Since more people are doing JavaScript, it only makes sense to make things familiar.

> Why then have PHP at all?

That's a question that will have to be answered soon.

For now, the answer that I'm coming up with, is that with PHP-FPM you can make PHP properly threaded. All of the server-side JavaScript implementations are event driven. The threaded model has advantages when jobs are cpu or io heavy.

Right now, I'm working on an implementation where Node.js is receiving calls via websockets and handing that off to PHP-FPM via FastCGI for processing. A hybrid system like that has advantages of both the event model and the thread model.




> Right now, I'm working on an implementation where Node.js is receiving calls via websockets and handing that off to PHP-FPM via FastCGI for processing. A hybrid system like that has advantages of both the event model and the thread model. <

That sounds pretty cool. Personally, I was blown away what difference Nginx<->PHP-FPM makes compared to the old Apache way of doing things. Nginx is an absurdly fast evented web server as well. It would be very interesting to bring this kind of thing to Node.js because it would allow for some awesome customization which just isn't possible with Nginx.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: