Re: where do you store app wide data?
From: worzel (asda_at_sdarta.com)
Date: 01/06/05
- Next message: Luigi Donatello Asero: "Name of the day in different languages."
- Previous message: Sam Crawford: "Re: OT: Laptop Computer Needed"
- In reply to: Wayne: "Re: where do you store app wide data?"
- Next in thread: Wayne: "Re: where do you store app wide data?"
- Reply: Wayne: "Re: where do you store app wide data?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 6 Jan 2005 11:03:16 +0800
re:
> But it still uses and insane amount of RAM. It really doesn't matter
> if the code runs at C speed if it uses 5 times as much ram, right?
Again, not sure where you get this idea from? If you are saying that an
instance of the JVM itself is a memory hog (which you seem to be) then I
would have to say you are quite wrong. A JVM instance is actually
configurable with respect to memory and it is also capable of shriniking and
growing itself when required. Its a very sophisticated peice of software and
uses memory very efficiently.
The comment 'uses and insane amount of RAM' is plain wrong - particularly if
you are talking relative to a modern machine. If you are saying the JVM
process is larger than the PHP process - thats a different story.
> You know the only way to prove that is to build a Java application and
> PHP application and see which is faster..
Only really need proof when something is in doubt :) Besides, its not a
comparison worth making. I dont thinkJava folk see PHP as much in the way of
competition right now - PHP is not really considered the way to go for
anything more than a small business website (to many peoples minds - not
neccasarrily mine).
> Since I've never done Java web development -- what exactly do you
> store in the application state anyway?
Anything and everything really. If the data is to persist across the life
span of an applications, it goes in app scope. If it is to be persisted for
good, it goes in a file or a database. App scope just keeps things in RAM
for fast access, including complex data type and objects such as object
caches, connection pools, or just simple counters if you like. The strength
(and the difference to what you suggested earlier) is that it all happens in
RAM and no file or DB access is required. Also, it is just plain simple to
do.
It's nice to be able to use the dot for
> concatination.
Are you kidding! It drives me nuts! I think I would even prefer Oracles '||"
concatentaion operator over a tiny little dot.
Thanks for the feedback on Python - I just inherited a book on it. First
glace it seems absolutely awsome -clean, simple and easy to learn. Popular
too. As you say though, in the world of web apps that we live in it seems to
be yet to come of age. I was amazed to learn that it is used to do game
programming and animation and stuff - I had no idea it was as widely
accepted and popular as it is.
re:
-- I'd use it over Perl anyday.
I would rather brush my teeth with a used toilet brush and then gargle with
the toilet water than use Perl, so thats not saying much..
"Wayne" <not@here.com> wrote in message
news:48kot01gfgtc1usulk4bbjrsm73n6evja4@4ax.com...
> On Wed, 5 Jan 2005 19:54:23 +0800, "worzel" <asda@sdarta.com> wrote:
>
>>Not sure about the speed claims you make. It may be that you are just not
>>familiar enough with modern java jit compilers to realise that java runs
>>at
>>speeds equivalent to C code - theres pretty much nothing in it these days.
>
> But it still uses and insane amount of RAM. It really doesn't matter
> if the code runs at C speed if it uses 5 times as much ram, right?
>
>>Also, Java apps tend to be physically just much bigger and more
>>ambitious than a PHP app is likely to be - as you say, enterprise
>>solutions,
>>but thats the shher size of the app not the java code being particulalry
>>slow.
>
> The size of the app my be larger but Java applications memory
> requirements are almost always much higher than the average native
> application, for example.
>
>>A nicely
>>designed jsp/servlet app built with a 'PHP' and equivalent code would be
>>faster, or as fast, as the PHP version.
>
> You know the only way to prove that is to build a Java application and
> PHP application and see which is faster..
>
>>The PHP guy will write a no nonsense 'get it done' app that will generally
>>run much quicker than a java web app.
>
> You make the case that Java is as fast as compiled C code. PHP
> certainly isn't that fast but it does spend most of it's execution
> time inside compiled C code. The only time your going to notice speed
> issues with PHP is if you are doing complicated calculations -- most
> of the time PHP is just calling out to C functions.
>
> Most of the speed issues with PHP involve the compilation step and
> accessing the class files themselves -- this is can elimated with a
> bytecode cacher.
>
>>Maybe not 'NEED', but it sure is a convenience and a hard habit to kick if
>>you come from java or cf. I suppose I can get by without it.
>
> Since I've never done Java web development -- what exactly do you
> store in the application state anyway?
>
> (ASP also has an application state but it's so restricted that it's
> absolutely useless -- they pretty much recommend you don't use it)
>
>>And it has so many advantages
>>over the PHP approach in many situations. (and of course, the reverse is
>>true)
>
> Fair enough.
>
>>I just cant stand doing
>>'myObject->myMethod()' instead of 'myObject.myMethod()' and all those
>>other
>>clunky ugly other PHP weird arse things!
>
> You get used to it. It's nice to be able to use the dot for
> concatination. The syntax isn't that weird -- it comes from C++... oh
> wait maybe that does make it weird... ;)
>
>>Whats your take on Python by the way? I only ask because it has been
>>cropping up a hell of a lot lately in the circles I move in and the
>>bookshops here (west australia) are suddenly filled with Python books.
>
> I've taken a cursory look at Python. Read the documentation,
> installed it, etc. It looks to be a great *general purpose* language
> -- I'd use it over Perl anyday.
>
> So far as it's usage for building web applications, it seems a bit
> lackluster. And is has a reputation, even from it's developers, as
> being slow -- How it compares to PHP in that regard, I don't know.
>
- Next message: Luigi Donatello Asero: "Name of the day in different languages."
- Previous message: Sam Crawford: "Re: OT: Laptop Computer Needed"
- In reply to: Wayne: "Re: where do you store app wide data?"
- Next in thread: Wayne: "Re: where do you store app wide data?"
- Reply: Wayne: "Re: where do you store app wide data?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|