Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Wed Feb 03, 2010 7:01 am Reply with quote

See this link:

Only registered users can see links on this board! Get registered or login!

Basically what it says is that Facebook is written in PHP and has performance issues as a result and they've figured out a way to convert the PHP code to C++ ... the product that does it is known as HipHop and is available Open Source.
 
View user's profile Send private message Visit poster's website
eldorado
Involved
Involved



Joined: Sep 10, 2008
Posts: 424
Location: France,Translator

PostPosted: Wed Feb 03, 2010 11:14 am Reply with quote

i was just about to ask about this.

I'm not a c++ hater , but I don't like compiled code

_________________
Only registered users can see links on this board! Get registered or login! (My RN site)- Only registered users can see links on this board! Get registered or login!(cod4 clan) - Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website MSN Messenger
fkelly







PostPosted: Wed Feb 03, 2010 1:42 pm Reply with quote

I'm not sure what "liking" or "not liking" compiled code has to do with it. I don't have time to investigate this but I'd guess there's a bunch of gotchas that would have to be overcome ... like they mention that (understandably) the php eval statement won't work. If there was some automatic, reliable and easy way to point a compiler at the top level directory for a distribution and have it create something that would improve efficiency significantly what is there not to like? Of course this would only work on a relatively stable distribution where you are not changing code frequently.

It's really an academic discussion anyway ... I just thought it was interesting to find out that Facebook was written in PHP and why and to see what they are doing to deal with the practicalities of millions of users. It's also kind of cool that they are contributing this back as Open Source, though they may not have had an alternative.
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Wed Feb 03, 2010 8:18 pm Reply with quote

Funny, I submitted a news story about it here before reading this post.

It seems to minify PHP in ways similar to the way PHP Minify improves JS and CSS.

Just to clarify: they don't say eval won't work - just that they don't optimize it.

That said, I absolutely agree with fkelly's assessment: it's very interesting to see how FB (Facebook, not PHP-Nuke's original "author"!) deals with performance issues. And yes, it is pretty cool that they're making this available for others to use as well.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Feb 05, 2010 6:54 am Reply with quote

Yeah, fascinating idea. I have often thought it would be nice to have a natively compiled and executed system for PHP like I've seen others do for Java.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Fri Feb 05, 2010 2:38 pm Reply with quote

Most web applications are I/O bound. Apparently Facebook has optimized its I/O delivery system so much that it actually makes sense for them to tackle CPU utilization, and they can actually see a benefit by taking this somewhat drastic action.

There's a reason most web applications are written in interpreted languages like Perl, Python, Ruby, or PHP. Unless you are Facebook, they are good enough for 99% of the sites out there. Otherwise we'd all be using C or C++ to build web apps.

Oh, and hi guys. Smile Hope everyone is doing well.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
kguske







PostPosted: Fri Feb 05, 2010 2:42 pm Reply with quote

Yes, @ 100 million pages per week, it probably makes sense for them to look at any possible way to improve performance...

Nice to see you, Gremmie! Hope you are well, too!
 
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Fri Feb 05, 2010 2:46 pm Reply with quote

Hi Gremmie, long time no speak. Wink
 
View user's profile Send private message
Gremmie







PostPosted: Sat Feb 06, 2010 12:11 pm Reply with quote

I haven't tried this, but if I were to want to do a web app in C++, I'd check out this framework:

http://cppcms.sourceforge.net/wikipp/en/page/main

It is apparently influenced by Only registered users can see links on this board! Get registered or login!, which is what I am developing in these days.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©