If You Were Building Craigslist Today...?

Drover

New member
Nov 28, 2006
369
1
0
Houston, TX
If you were building Craigslist today, exactly as is and able to handle those volumes, what programming language would be best and why?
 


ASP.NET 3.5 / VB.NET would be my choice.

Too bloated :P

I would think

PHP/MySQL
or
Rails/Perl/Python/etc


basically you'd need something very lightweight on the server hardware, and easily scalable, but able to grow. Doing something like ASP + VB.net wouldn't be that at all, not to mention the licensing hell that would create when you have to host the app on several servers.
 
According to an interview in 2008, Craiglist is mostly written in Perl.

http://broadcast.oreilly.com/2008/12/craig-newmark-interview-a-brie.html
TO: When you programmed, what did you program in?

CN: I programmed for the most part in the first year or so in Perl; and Craigslist, these days, it's pretty much all Perl. But I also learned Java which proved to be a pretty good way to make a living.

We're pretty conventional LAMP architecture, a whole bunch of Linux systems, Apache, MySQL, and Perl specifically mod_perl.

So there you have it, ideally over the years they've found Perl + Mysql to work best for them. That being said it could be done the same in PHP or Python (with mysql support) as well.
 
offhand, probably php, but there's a lot that goes into deciding the "best language" for a project.
what's the deadline? how many developers, or am i coding it alone? at "that volume", you'll need more than one server: what's your budget?

you'll find that you're balancing three variables: speed of app, cost to build, and time in development. you'll probably have to sacrafice one to get the other two; based on your response to that, you could choose the "best language."
 
PHP is proven to scale easily horizontally because of its shared nothing architecture and its lightweight nature.

.NET or Java will give you access to a pool of higher quality developers, IMO, and easier/better integration with more enterprise level tools.

Although I've never done it, extending Python with c/c++ is supposed to be easy, and I have no reason to doubt it(google uses Python extensively and I'm sure there's a lot of integrated c/c++ in their code). Python is a neat language that was developed with maintainability in mind.

Perl. Stay the fuck away from it for big, multi-person shit with a long development cycle. There is probably someone reading this who disagrees. Fuck you.

Rails. I don't know. Is it really proven to scale well? Isn't Ruby slower than a warrior n00b in the WSO section?
 
And yet thats what the current craigslist is written with. :P

A lot of big things are written in Perl, but big, multi-person, long dev cycle projects with moderate to a lot of developer turnover can become a mindfuck quicker in Perl than probably any other language.

If you enforce certain rules and people obide, it can work out without being a clusterfuck. When you're planning on doing a big project you probably want to stay away from a language who's motto is TMTOWTDI. In Perl, that's an understatement, there's often a million different ways to do it(not just one) and Perl developers notorious like taking advantage of that language perk.

OOh, if I can condense the entire domain model into one line of code the other Perl coders will think I'm such a manstud.
 
Anyone here know Java?

But I also learned Java which proved to be a pretty good way to make a living.
cmcapture8.png


cmcapture7.png


good luck bro
 
In Perl, that's an understatement, there's often a million different ways to do it(not just one) and Perl developers notorious like taking advantage of that language perk.

Course not in the 'exaggerated millions', but in PHP, Ruby, C++, Python, there's a dozen ways to do one thing. So the only perk I saw is being able to run perl as a binary, or even desktop language like Python.
 
Course not in the 'exaggerated millions', but in PHP, Ruby, C++, Python, there's a dozen ways to do one thing.

I think TMTOWTDI is speaking more to how you can do things at the expression, statement and operator levels. PHP and Perl couldn't be much more different when it comes to richness of syntax.

PHP's motto could be TMTOBIFTUH(there's more than one built-in function to use here). Try to write some obfuscated PHP or Python and then go look at some of the entries or winners for the Perl obfuscation contests in the past and compare them and you'll see what I mean.

Code:
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
Just another Perl hacker - Wikipedia, the free encyclopedia

Perl is probably one of the most expressive computer languages ever written. Larry Wall studied linguistics before he created Perl, and one of his goals in making Perl was to make a computer language to be as expressive as natural language.

He also didn't want to be hampered by the overly rational in deciding what to put into his language. He describes Perl as the first post-modern computer language, and according to Wall's definition, that at least partly means that and is held in higher regard than or; and that promotes creativity and individualism.



Wall said:


I don't want to sound like a Perl hater. Perl doesn't suck, it's awesome. But giving so much freedom to individual coders is not necessarily a good thing in big projects that will go for years with potentially many different developers.

To be fair I'm speaking from old data/knowledge. I've hardly used Perl in years. And these days everyone uses a framework for big stuff. I know Perl has some framworks and I'm sure they're good. So maybe a framework would cut down on the individualism in the application, if for no other reason, because individuals will need to write less code, or because the code they will write will be prescribed to some degree(in a framework you largely just code to pre-specified interfaces).

Good OOP practices could cut down on a lot of the potential hazard inherent in big Perl projects, because OOP puts the focus more on how objects interact with each other, through well thought out interfaces and relationships. The application is more defined by how its parts relate and interact with each other rather than by how its parts implement any given thing.

The potential of individualism is largely engineered or designed away. Inside the black box of the classes you'd still have the signatures of the individual developers who have worked on the project over the years, but their idiosyncrasies or lack of attention to clarity or to standard practices will have less of an impact on the whole.

So really, in this newer frameworked world of software, the "Perl is too expressive" argument may not hold up, because one of the main goals of frameworks is to make individual coders irrelevant. Actually the goals of a framework are usually pretty much the opposite of what Larry Wall's goals were when creating Perl. Individualism vs Corporatism(if you will).
 
Too bloated :P

I would think

PHP/MySQL
or
Rails/Perl/Python/etc


basically you'd need something very lightweight on the server hardware, and easily scalable, but able to grow. Doing something like ASP + VB.net wouldn't be that at all, not to mention the licensing hell that would create when you have to host the app on several servers.

calling .NET bloated is like complaining that a library has too many books. not to mention that .net will easily beat php performance wise in a heartbeat....
 
basically you'd need something very lightweight on the server hardware, and easily scalable, but able to grow. Doing something like ASP + VB.net wouldn't be that at all, not to mention the licensing hell that would create when you have to host the app on several servers.

Spoken like somebody that doesnt know shit about .NET development.