in reply to Is perl scalable?

They all seemed to think that JAVA (insert silence) was God, and superior to all languages. Their main point was that java only spawned one process and could handle hundreds of users and that perl, on the other hand, could not.

Eh, this was a Unix Fundamentals class, wasn't? I've given Unix Fundamentals classes, and what we do it stuff like browsing the file system, looking at files, editing them, commands like cd, ls, more, cat, vi, grep, find. We talk about in/output redirection, pipes, exit status, awk, sed. A natural environment for perl.

What's the deal about processes? If I start a perl program, I start a single process. If I start a Java program, I start a single process. Now, they may claim a perl process is taking lots of memory, but so is your typical Java program. What they mean by "a Java program could handle hundreds of users" is beyond me. You aren't writing operating systems in your Unix Fundamentals class, I hope?

In my professional opinion, I find that Java *doesn't* scale. It's wasting too much memory - many applications come with their own Java run-time enviroment (because the "write once, run everywhere is a blatant lie"), and a handful of Java run-time environments quickly consume all the memory available, even if it's 2 Gb. Now, Perl doesn't scale well either, it's also memory hungry. With Perl it isn't so much the run-time environment (although that still isn't memory friendly), but the amount of memory data takes.

Mind me, I'm not saying Java is a bad language. It certainly does have its merits. It's syntax isn't complex, and not as rich as Perls. It has strong typing, and for a lot of programmers, Java is a better language than Perl. It keeps you further away from the idiosyncrasies of Unix. This is sometimes a good thing - but try to make a Java program that pays attention to environment variables. If I have to choose between Java and Perl, I can make that decision based on many criteria. For some criteria, Perl will win. For some, Java will win. But scalability isn't a criterium for which Java will be a clear winner (they both lose ;-)).

If something really has to scale, with all other things equal, C is the only logical choice.

Abigail

Replies are listed 'Best First'.
Re: Re: Is perl scalable?
by demerphq (Chancellor) on Dec 06, 2002 at 19:25 UTC
    If something really has to scale, with all other things equal, C is the only logical choice.

    lisp?

    :-)

    --- demerphq
    my friends call me, usually because I'm late....

      Perhaps not. Yahoo is replacing Lisp in it's Yahoo Store software for speed. (And I suspect to ease future coding.)
      Paul Graham is "Mr. Lisp" so I assume the Lisp code was implemented very efficiently. There's still some Perl in the Store Manager though!.

      -Lee

      "To be civilized is to deny one's nature."

        Actually, Graham worked with the CLISP implementation, which is not exactly noted for being the fastest one around. It's quite possible that Yahoo would have been able to get the results they wanted speedwise by switching to a more suitable implementation of Common Lisp. (For example, type and optimization declarations are ignored, even now, by CLISP.) And while Graham is obviously a very good and respected Lisp programmer (I think I'd stop short of calling Mr. Lisp, though), even he's going to have a problem working around something like that. It would have been interesting to see how it fared if Yahoo had chosen instead to port it to something like Allegro CL, Lispworks, or CMUCL.