FORUM WARNING [2] Division by zero (Line: 2933 of /srcsgcaop/boardclass.php)
FORUM WARNING [2] Division by zero (Line: 2943 of /srcsgcaop/boardclass.php)
Should Wikipedia's software be rewritten in Ruby on Rails? -
     
 
The Wikipedia Review: A forum for discussion and criticism of Wikipedia
Wikipedia Review Op-Ed Pages

Welcome, Guest! ( Log In | Register )

 
Reply to this topicStart new topic
> Should Wikipedia's software be rewritten in Ruby on Rails?
Rating  5
LamontStormstar
post
Post #21


Postmaster
*******

Group: Regulars
Posts: 2,360
Joined:
Member No.: 342



Should Wikipedia's software be rewritten in Ruby on Rails? Discuss.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lar
post
Post #22


"His blandness goes to 11!"
*******

Group: Regulars
Posts: 2,116
Joined:
From: A large LEGO storage facility
Member No.: 4,290



QUOTE(LamontStormstar @ Sat 11th October 2008, 5:40am) *

Should Wikipedia's software be rewritten in Ruby on Rails? Discuss.

I've never used RoR and I'm but a dabbler in PHP so this ain't worth much.

What I hear is that RoR is very very nifty, and PHP not exactly as nifty. So maybe if one was starting over...

But the question becomes why would this be a good idea? There is a vast sunk cost (which is never a reason not to do something, that's why it is called "sunk" cost) but any rewrite has to get to be at least as good as the current implementation, or it's just a science project. Which can be fun....

I seem to recall Kelly M was working on a Java reimplementation, for fun.

But I tell my clients not to replace perfectly good COBOL programs (!!!), if they're working fine, just for the sake of replacing them. SO I'm biased in favour of things that already exist.

Interesting question though.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
LamontStormstar
post
Post #23


Postmaster
*******

Group: Regulars
Posts: 2,360
Joined:
Member No.: 342



Java would probably be even slower than PHP. Whenever I go to a website with a java applet, if it is really complex it slows my computer way down.

I know mediawiki spends a whole bunch a month on server costs alone so more efficient coding would save them a lot of mine. I forgot the number and the last time I looked was quite a ways back but my guess is they spend per month about 1/10th of what one of those rich executives the USA gave trillions of dollars to (in the bailout that after it passed the stock markets crashed because investors thought it was a bad bill) spend per day on executive retreats.

So mediawiki spends a lot.

I wouldn't be sure the right language, though I've heard ruby on rails is the new thing. There's also python.

This post has been edited by LamontStormstar:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
KamrynMatika
post
Post #24


Ãœber Member
*****

Group: Regulars
Posts: 626
Joined:
Member No.: 1,776



Ruby is slower than PHP. Ruby can be 20x slower than Java in fact. There'd be absolutely no point rewriting it. I'm really interested to see where things like http://www.webtoolkit.eu/wt go, though. C++ is pretty fast.

The point of RoR is that it's fast to develop in it, that's about its only selling point - if you have an already developed system that works just fine it would be completely redundant to rewrite it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Somey
post
Post #25


Can't actually moderate (or even post)
*********

Group: Moderators
Posts: 11,816
Joined:
From: Dreamland
Member No.: 275



Personally, now that Delphi for PHP exists, I can't imagine why anyone would want to switch from PHP to Ruby on Rails, unless they were already skilled in it of course.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The Joy
post
Post #26


I am a millipede! I am amazing!
********

Group: Members
Posts: 3,839
Joined:
From: The Moon
Member No.: 982



I thought Brion Vibber and friends had switched to Ubuntu now?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
KamrynMatika
post
Post #27


Ãœber Member
*****

Group: Regulars
Posts: 626
Joined:
Member No.: 1,776



QUOTE(The Joy @ Sat 11th October 2008, 9:14pm) *

I thought Brion Vibber and friends had switched to Ubuntu now?


Ubuntu is an operating system, PHP, Ruby, Java, etc are programming languages.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Milton Roe
post
Post #28


Known alias of J. Random Troll
*********

Group: Regulars
Posts: 10,209
Joined:
Member No.: 5,156



QUOTE(Lar @ Sat 11th October 2008, 6:19am) *

But I tell my clients not to replace perfectly good COBOL programs (!!!), if they're working fine, just for the sake of replacing them. SO I'm biased in favour of things that already exist.


Programmer becomes depressed because so many of his buisness clients insist that he upgrade their COBOL programs and it's so ugly and clunky that he finally can't stand it. He commits suicide. His relatives, out of guilt, have him cryogenically preserved.

In the far future he wakes up and it's a combination of Futurama and Buck Rogers. The cyborg-humans debrief him.

"Well, you'll find this funny," he says, "But I was a programmer. I actually used to work with computers back when you could see them. They were boxes and stuff that sat on desks."

Moment of shock, and then look of greed on the faces of the defrosters:

"Say.... you wouldn't happen to know any COBOL...?"

This post has been edited by Milton Roe:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Kelly Martin
post
Post #29


Bring back the guttersnipes!
********

Group: Regulars
Posts: 3,270
Joined:
From: EN61bw
Member No.: 6,696



QUOTE(LamontStormstar @ Sat 11th October 2008, 8:35am) *
Java would probably be even slower than PHP. Whenever I go to a website with a java applet, if it is really complex it slows my computer way down.
Server side Java is nothing like client-side java. The slowness you're experiencing is due to your browser launching a JVM inside the browser. Server side Java doesn't have this problem; the JVM is already running in the server and all you get is the same HTML you'd get from the PHP app -- it's just generated that much faster. A properly implemented Java webapp will run rings around a PHP app.

MediaWiki runs 25% faster just by running it within Quercus, which is pretty much just a PHP interpreter written in Java. A full reimplementation in Java would be 50% to 75% faster.

I doubt that a Ruby on Rails implementation would be that much faster as RoR is, like PHP, a fully interpreted language (although the odds are that the RoR interpreter is more efficient than PHP, as PHP's is just about the worst-performing interpreter there is in common use). Java is at least compiled to JVM code. The only way to get faster than that would be to go to a fully compiled language like C or C++.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
LamontStormstar
post
Post #30


Postmaster
*******

Group: Regulars
Posts: 2,360
Joined:
Member No.: 342



QUOTE(Somey @ Sat 11th October 2008, 1:02pm) *

Personally, now that Delphi for PHP exists, I can't imagine why anyone would want to switch from PHP to Ruby on Rails, unless they were already skilled in it of course.



I once worked on Delphi back in the 1990s. I'd tried visual basic, then I tried Delphi. Delphi was only a little slower to develop in than Visual Basic and Delphi was more powerful and code was slower. I then tried C++ because a friend recommedned it, which was hard and slow to develop in, though code got even smaller and the program was faster. I later gave up on C++.

I'm not sure what Delphi for PHP is about. Delphi is a bit of a better language than PHP




QUOTE(Kelly Martin @ Sat 11th October 2008, 6:00pm) *

QUOTE(LamontStormstar @ Sat 11th October 2008, 8:35am) *
Java would probably be even slower than PHP. Whenever I go to a website with a java applet, if it is really complex it slows my computer way down.
Server side Java is nothing like client-side java. The slowness you're experiencing is due to your browser launching a JVM inside the browser. Server side Java doesn't have this problem; the JVM is already running in the server and all you get is the same HTML you'd get from the PHP app -- it's just generated that much faster. A properly implemented Java webapp will run rings around a PHP app.

MediaWiki runs 25% faster just by running it within Quercus, which is pretty much just a PHP interpreter written in Java. A full reimplementation in Java would be 50% to 75% faster.

I doubt that a Ruby on Rails implementation would be that much faster as RoR is, like PHP, a fully interpreted language (although the odds are that the RoR interpreter is more efficient than PHP, as PHP's is just about the worst-performing interpreter there is in common use). Java is at least compiled to JVM code. The only way to get faster than that would be to go to a fully compiled language like C or C++.




Hmm... isn't the native PHP interpreter written in C++ or something low-level? If it's not, that's surprising.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Somey
post
Post #31


Can't actually moderate (or even post)
*********

Group: Moderators
Posts: 11,816
Joined:
From: Dreamland
Member No.: 275



QUOTE(LamontStormstar @ Mon 13th October 2008, 12:44pm) *
I'm not sure what Delphi for PHP is about. Delphi is a bit of a better language than PHP

Delphi's native language is Object Pascal, which I also happen to like better than most. Delphi for PHP is a PHP language implementation using a Delphi-like IDE with access to web-enabled versions of Delphi VCL (Visual Control Library) objects and language functions. If you use a lot of those objects, the results might be slower than a hand-coded PHP-generated page simply because of the additional code, and the extra HTML/CSS required to render them on the browser. But if your server isn't overtaxed, and assuming most users have a reasonably fast connection/machine, it won't be particularly noticeable.

Other than that, it isn't much different from any other PHP implementation on the server side - it's just much easier to work with, dev-wise, and at least as easy as RoR (though I'm not all that experienced with RoR, admittedly). Kelly is correct in that server-side Java is faster than most (if not all) PHP interpreters, but if your website isn't getting thousands of hits a minute, a decent server isn't going to seize up because you're running PHP, and IMO it's more widely supported in the freeware/open-source world.

I agree with the other thing - if you've got a website that requires maximum optimization, no question that you want to be running compiled C++ wherever possible. As long as you or your developers never get hit by a truck, that is! It's bad enough trying to fix other people's bugs in uncompiled PHP and Java files. I'm a little better at it than some folks, but it's hardly my favorite thing to do, if you know what I'm sayin'.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Kelly Martin
post
Post #32


Bring back the guttersnipes!
********

Group: Regulars
Posts: 3,270
Joined:
From: EN61bw
Member No.: 6,696



The PHP interpreter is written in C or C++ (I forget which), but there are "features" of the PHP language that force it to be slow. Quercus gets around this (I think) by doing some one-time analysis to determine when those features are not being used, and accelerating the resulting intermediate language code when possible. There are other "accelerated PHP" systems that do similar things.

PHP is a fantastically crappy language.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
LamontStormstar
post
Post #33


Postmaster
*******

Group: Regulars
Posts: 2,360
Joined:
Member No.: 342



I know the site Twitter runs on RoR.

Kelly, what language do you think is good for a website? If you're going to say C/C++, then what's your second pick?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gomi
post
Post #34


Member
********

Group: Members
Posts: 3,022
Joined:
Member No.: 565



QUOTE(LamontStormstar @ Mon 13th October 2008, 10:44am) *
Hmm... isn't the native PHP interpreter written in C++ or something low-level?

Yes, and in addition there has been a lot of work done to integrate PHP with Apache, the dominant web server out there. This ameliorates a good deal of the overhead of the interpretive nature of PHP, but not entirely. It is likely that what has been said above is true, which is native C/C++ CGI modules are faster than Java, which is in turn faster than PHP, which is in turn faster than Python, which is in turn faster than Ruby. But this, of course, obscures vast amounts of other complexity that depends on what it is you're trying to do. A large stream of poorly-designed SQL queries will use up vastly more time than any amount of user interface cruft you can imagine.

Recall here that Yahoo runs on a LAMPs engine (Linux, Apache, MySQL, PHP), and it seems to perform well under high levels of load.

The two useful ways of improving Wikipedia performance would be to optimize the database queries and structure, which (given the size of the existing dataset) is probably impossible, or to re-implement the core Wiki functions in C++. In fact, I'm doubtful that even the latter would help, as I suspect the site is database-bound.

On the larger topic, has anyone tried PHP/Cake and have a report to give?

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Somey
post
Post #35


Can't actually moderate (or even post)
*********

Group: Moderators
Posts: 11,816
Joined:
From: Dreamland
Member No.: 275



QUOTE(Kelly Martin @ Mon 13th October 2008, 1:43pm) *
PHP is a fantastically crappy language.

It's also crappily fantastic! (IMG:smilys0b23ax56/default/laughing.gif)

I'd say it's a good example of "first and cheapest out the door wins," personally. There are lots of much better languages for web development - interpreted and otherwise - but since they don't run on cheap LAMP hosting for $5 a month, many/most of them are going to be relegated to also-rans. It's too bad, really - one of the things I dislike most about the internet, if not computers/programming in general.

If I'm just stating the obvious here, you all have my apologies...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gomi
post
Post #36


Member
********

Group: Members
Posts: 3,022
Joined:
Member No.: 565



QUOTE(Kelly Martin @ Mon 13th October 2008, 11:43am) *
PHP is a fantastically crappy language.

Yes, it is the crappiest web-development language out there, except for all the other ones. (IMG:smilys0b23ax56/default/smile.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
LamontStormstar
post
Post #37


Postmaster
*******

Group: Regulars
Posts: 2,360
Joined:
Member No.: 342



Hmmm I thought Python was faster than PHP and Perl, though I could be rembering it wrong.

Are you serious that yahoo's whole website is PHP? That's something.

Odd they also use MySQL. I thought they might use some premium service like Oracle. Or at least maybe PostegreSQL. What's everyone here think of PostegreSQL vs. MySQL?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Kelly Martin
post
Post #38


Bring back the guttersnipes!
********

Group: Regulars
Posts: 3,270
Joined:
From: EN61bw
Member No.: 6,696



QUOTE(gomi @ Mon 13th October 2008, 1:51pm) *
QUOTE(Kelly Martin @ Mon 13th October 2008, 11:43am) *
PHP is a fantastically crappy language.
Yes, it is the crappiest web-development language out there, except for all the other ones. (IMG:smilys0b23ax56/default/smile.gif)
Exactly! (IMG:smilys0b23ax56/default/smile.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
GlassBeadGame
post
Post #39


Dharma Bum
*********

Group: Contributors
Posts: 7,919
Joined:
From: My name it means nothing. My age it means less. The country I come from is called the Mid-West.
Member No.: 981



QUOTE(Kelly Martin @ Mon 13th October 2008, 1:03pm) *

QUOTE(gomi @ Mon 13th October 2008, 1:51pm) *
QUOTE(Kelly Martin @ Mon 13th October 2008, 11:43am) *
PHP is a fantastically crappy language.
Yes, it is the crappiest web-development language out there, except for all the other ones. (IMG:smilys0b23ax56/default/smile.gif)
Exactly! (IMG:smilys0b23ax56/default/smile.gif)


I'm a rank beginner compared to many of you but PHP does seem to me to have a pretty workable set of functions for query strings, sessions, accessing manipulating MySQL, sorting, encrypting and doing many website chores. Trying to do anything in object oriented fashion gives me a headache but I doubt if that is the language's fault.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Kelly Martin
post
Post #40


Bring back the guttersnipes!
********

Group: Regulars
Posts: 3,270
Joined:
From: EN61bw
Member No.: 6,696



QUOTE(GlassBeadGame @ Mon 13th October 2008, 3:10pm) *
I'm a rank beginner compared to many of you but PHP does seem to me to have a pretty workable set of functions for query strings, sessions, accessing manipulating MySQL, sorting, encrypting and doing many website chores.
PHP makes it very easy to write code that works; but PHP makes it very hard to write code that works well, and even more so to write code that works well and can be maintained. The problem with environments with low barriers to entry is that any tyro can show up, whip something half-assed together and then claim to be an expert. I think everyone here can understand how this can be a bad thing.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

-   Lo-Fi Version Time is now:
 
     
FORUM WARNING [2] Cannot modify header information - headers already sent by (output started at /home2/wikipede/public_html/int042kj398.php:242) (Line: 0 of Unknown)