PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
fkelly
Moderator


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

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

See this link:

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


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: 414
Location: France,Translator

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

i was just about to ask about this.

I'm not a c++ hater , but I don't like compiled code
View user's profile Send private message Visit poster's website MSN Messenger
fkelly
Moderator


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

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

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.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

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

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.
View user's profile Send private message
montego
Site Admin


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

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

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.
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 Back to top

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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

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

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!
View user's profile Send private message
jakec
Site Admin


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

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

Hi Gremmie, long time no speak. Wink
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

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

I haven't tried this, but if I were to want to do a web app in C++, I'd check out this framework:
Only registered users can see links on this board!
Get registered or login to the forums!


It is apparently influenced by
Only registered users can see links on this board!
Get registered or login to the forums!
, which is what I am developing in these days.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum