Re: Node.PHP
| From: | Michael Save | Date: | Sat, 31 Mar 2012 01:33:12 +0000 |
| Subject: | Re: Node.PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317382@lists.php.net to get a copy of this message | ||
Because "normal" PHP is not asynchronous.
Also, I kind of doubt you can outperform node.js with standard PHP.
On Sat, Mar 31, 2012 at 11:56 AM, German Geek <geek.de@gmail.com> wrote:
> Maybe stupid question, but is node.php really necessary? If you can program
> PHP and it performs better than node.js, why would you need to have another
> wrapper around things. Why not just program "normal" PHP?
>
> twitter: geekdenz
> Blog: http://www.thheuer.com
>
> On Sat, Mar 31, 2012 at 10:39 AM, Hiyarli Baba <rootdot@gmail.com> wrote:
>>
>> As like Micheal's said said just keep up alive the project
>> I was preferes node.js to pho only when i needed send millions of ssl
>> api requests.
>> nodejs sends 1k https request in onky 2 second including parsing
>> required elements from database , check the returned source write to
>> file
>>
>> if you want develope / clone more modules for that please start from
>> http|s.req :p and let me coninue at php
>>
>> http://stackoverflow.com/a/9199961 my nodejs + php thing
>>
>> 2012/3/22, Michael Save <savetheinternet@omegasdg.com>:
>> > Very nice!
>> >
>> > I'll have a proper look at this in the morning, and I'll try it out
>> > for myself. Looking forward to seeing more development on this.
>> >
>> > Michael
>> >
>> > On Thu, Mar 22, 2012 at 11:40 AM, Joseph Moniz <joseph.moniz@gmail.com>
>> > wrote:
>> >> Hey,
>> >>
>> >> So i had my first Hackathon at work last week and my project was to
>> >> prototype making a node.js clone using PHP instead of V8. So i
>> >> snatched up libuv and joyent's HTTP parser and set off on a 24 hour
>> >> coding spree to get something workable. By the time the sun was coming
>> >> out the next morning the following code was working.
>> >>
>> >> <?php
>> >>
>> >> $http = new node_http();
>> >>
>> >> $http->listen(8080, function($request, $response) {
>> >> $response->end("yay, super awesome response");
>> >> });
>> >>
>> >> nodephp_run();
>> >>
>> >> ?>
>> >>
>> >> The C code that powers it was whipped together really fast and is kind
>> >> of hackish as a result. The code has some memory leaks that i haven't
>> >> had time to fully track down yet. Some small portions of the code were
>> >> borrowed from the phode project.
>> >>
>> >> In a naive benchmark on this simple server VS an equally simple server
>> >> in node.js this implementation already out performs node.js in
>> >> throughput by being able to serve just under 200% the amount of
>> >> requests per second that node.js could. Take that with a grain of salt
>> >> though because node.js has much more feature and is much more hardend
>> >> from production use. I do believe the PHP binary will have some major
>> >> performance gains over V8 as crossing the PHP <--> C barrier seems to
>> >> be a much lighter operation then crossing the V8 <--> C++ barrier.
>> >>
>> >> Any help or feedback will be greatly appreciated. The projects source
>> >> code can be found here:
>> >> https://github.com/JosephMoniz/node.php
>> >>
>> >> - Joseph Moniz
>> >>
>> >> --
>> >> PHP General Mailing List (http://www.php.net/)
>> >> To unsubscribe, visit:
>> >> http://www.php.net/unsub.php
>> >>
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>