PHP Scales As Well As Java
mactari writes "Jack Herrington at the O'Reilly Network has had the audacity to claim that
both PHP and J2EE architecture... are converging on the same design [regarding scalability]. Can it be that he's disproven the idea that 'Java scales and scripting languages don't' when he says, 'The idea that PHP does not scale is clearly false at the performance level'?
Even if a little oversimplified (ignores horizontal scaling), it's an interesting comparison that takes a peek at the architecture beneath both hypes."
we use PHP here for huge web applications.. we have six servers pumping out one website and it connects to a redundant database server.
The same system in java probably would not work, and if so would take up so many resources as to be no efficient.
If you are interested in more examples of some somewhat crazy things you can do in PHP check here to see examples of using it on the commandline for ncurses (which I wrote the primary tutorials on zend.com for) and for handling sysv shared memory.
Cheers
anime+manga together at last.. in real time.
Okay, talk about asking for a flaming! I'm a PHP developer whose done a bit of Java but knows nothing about J2EE. Can someone explain how this is relevant to me, as I start looking at larger applications with hundreds, perhaps thousands of users?
Well seeing as Yahoo is switching over to php, from C no less! Plus if you want to, you could use slashdot as an example of scripted sites. Of course slashdot at random interval won't load for about 10 or 15 minutes (rarely longer).
/* oops I accidentally made a comment, sorry */
Perl seems to scale as well--it runs a very busy site I frequent with few problems.
Programmers like other professionals need to establish a sense of professional elitism. PHP is a language that just about anyone can use, and when you have something that just about anyone can do, then you won't get the big bucks.
Programmers, doctors, lawyers need to fortify their salaries with an impenetrable layer of jargon. Java has the jargon.
The end result, PHP/MySQL is what people use when they want to get a job done, Java/XML is what you use if you want to build a career.
Sun is considering removing strict typing from Java as a language requirement, since it was one of the Top 10 things that developers suggested to Sun to make the language more useful.
Strong typing is not necessary. Even Sun believes that. Sorry to disappoint you.
Storing session state in a database only works when you have a small amount of session state to store
I think developers need to commit to smaller session footprints on servers anyway. Our goal here is to have nothing but security information stored on the server - and I think that's very reasonable. Make everything else come on the request.
We see a lot fewer bugs this way, and everything becomes easier to maintain. The database can handle the login information fine (thus far at least - our applications are all very data intensive to begin with), and being in the database means session info is easy to manage.
To me, having another a session quasi-database replicated around the cluster seems like an ill-fated enterprise.
Web development, though, is like that I guess. It's always difficult to picture what works for applications different than your own. The 100,000 lookers at site A call for a different setup than 10,000 workers at site B might need.
Let's not stir that bag of worms...
If Tyranny and Oppression come to this land,
it will be in the guise of fighting a foreign enemy. -James Madison
This seems extremely unlikely. Do you have any evidence to support your claim?
I would say that the zeal and disgust is partially a marketing tactic. It's partially a way to differentiate between someone who has dabbled with and actually lives the zen of the job.
You might see a similar zeal within print-graphic designers against kids and small-business with immature corporate identity. We all know traditional printers have been hurt by the availability of cheap grapic ap's and ink-jets. We all poo-poo a bad web design when it has the hallmarks of someone who doesn't know what they are doing. When anyone and their dog can build an HTML page, you can't be indifferent about bad design when you are an experienced developer. Clients will learn there is no benefit to paying you, and they will realize that useless websites have to be the norm
We have to make those comments though, because otherwise most clients wouldn't know the difference between good work and bad work unless you point it out. And not every manager will immediately connect the dots (even with a presentation) of concepts like lowering cost by reducing bandwidth.
So you have to train yourself to stand up for what you've committed yourself to. More importantly you have to SELL what you believe. If you treat your own skills with indifference, then others will consider your skills as such. They will also put more trust in the programmer who is not just convinced, but *knows beyond a shadow of a doubt* that rolling with a particular language is the right thing to do. What else does a non-programmer have to go on? (Besides, do you expect a programmer so say... "I only work with slow, awkward languages")
memcached was written originally for Perl. It was designed for LiveJournal.com, and that's written in Perl. It has a PHP API true, but to credit it to the PHP community is a falsehood.