Hi,
I was assigned a class work in the university to compare web
applications architectures, mainly PHP vs
Java+Hibernate+Struts/Stripes. I'll need to provide some benchmarks
for some typical web apps.
Well, I'm a bit afraid that Java may win, because of the usage of
Hibernate, which caches sql stuff in memory. The first request is
usually very slow (10 seconds or more), but following requests are
much faster.
So, do you have any suggestions for which PHP application architecture
should I discuss? Like a standard pdo-based app, with files being
generated and stored on the server, possibly bypassing php completly
on the following request (like livedocs). Use a particular PHP
framework (cake, zend, ...)? Any useful case-studies that you may have
are also welcome.
(Although I participate in the PHP development for a few years, the
websites I run have at most 1.5 million page views per month, so
performance isn't an issue, hence my lack of experience in scaling PHP
apps..)
Thanks,
Nuno
P.S.: Sorry for the off-topic, but I didn't find a better place to ask this.
Hi,
I was assigned a class work in the university to compare web
applications architectures, mainly PHP vs
Java+Hibernate+Struts/Stripes. I'll need to provide some benchmarks
for some typical web apps.Well, I'm a bit afraid that Java may win, because of the usage of
Hibernate, which caches sql stuff in memory. The first request is
usually very slow (10 seconds or more), but following requests are
much faster.
I would not be afraid of that. The question people have to solve is
not one of performance but one of scalability and maintainability.
Java tends to force people into this frame of mind to rely on one
monolithic piece if software to solve all of their problems. This
means a simple project ends up being way more complex from day one.
Moreover if their single monolithic software fails them, they have a
problem. This is the key point that Rasmus keeps saying .. what you
want is a layered approach that allows you to solve your real world
problems as they appear.
So if Java beats PHP in serving a half way complex page from a single
server in # of requests per second I am still not impressed. The
question is how long did it take to setup that server. How long will
it take until it becomes too expensive to keep adding to this one
server? What will you do for failover? etc ..
regards,
Lukas
Hi,
I was assigned a class work in the university to compare web
applications architectures, mainly PHP vs
Java+Hibernate+Struts/Stripes. I'll need to provide some benchmarks
for some typical web apps.Well, I'm a bit afraid that Java may win, because of the usage of
Hibernate, which caches sql stuff in memory. The first request is
usually very slow (10 seconds or more), but following requests are
much faster.I would not be afraid of that. The question people have to solve is not
one of performance but one of scalability and maintainability. Java tends
to force people into this frame of mind to rely on one monolithic piece
if software to solve all of their problems. This means a simple project
ends up being way more complex from day one. Moreover if their single
monolithic software fails them, they have a problem. This is the key
point that Rasmus keeps saying .. what you want is a layered approach
that allows you to solve your real world problems as they appear.So if Java beats PHP in serving a half way complex page from a single
server in # of requests per second I am still not impressed. The question
is how long did it take to setup that server. How long will it take until
it becomes too expensive to keep adding to this one server? What will you
do for failover? etc ..
Although I agree with you, my project is mainly about performance of
different web apps architectures.
Anyway, thanks for your point of view. I might use it to convince my
professor (who doesn't like PHP..) :)
Thanks,
Nuno
I think a good example of php-technology would be symfony project +
caching in memcached
it can be made to work really fast
Hi,
I was assigned a class work in the university to compare web
applications architectures, mainly PHP vs
Java+Hibernate+Struts/Stripes. I'll need to provide some benchmarks
for some typical web apps.Well, I'm a bit afraid that Java may win, because of the usage of
Hibernate, which caches sql stuff in memory. The first request is
usually very slow (10 seconds or more), but following requests are
much faster.So, do you have any suggestions for which PHP application architecture
should I discuss? Like a standard pdo-based app, with files being
generated and stored on the server, possibly bypassing php completly
on the following request (like livedocs). Use a particular PHP
framework (cake, zend, ...)? Any useful case-studies that you may have
are also welcome.(Although I participate in the PHP development for a few years, the
websites I run have at most 1.5 million page views per month, so
performance isn't an issue, hence my lack of experience in scaling PHP
apps..)Thanks,
NunoP.S.: Sorry for the off-topic, but I didn't find a better place to ask this.
--
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/
Hi!
Alexey Zakhlestin wrote:
I think a good example of php-technology would be symfony project +
caching in memcached
With symfony it is worth using Doctrine (a Hibernate-like ORM tool),
which has built-in caching possibility.
Best Regards,
Felhő