Jump to content

Recommended Posts

I wasn't sure if this should go here or the other server software section but I'll leave that up to the mods.

I'm in the early stages of designing a website that will rely a lot on AJAX for real time data. So far I've just been doing the HTML/CSS and haven't done any scripting, even client side.

I'm wondering if with a site like this where I will need users to be able to respond immediately to data received via AJAX if it would be in my interest to learn JSP or if PHP will be fast enough to handle all the data. Once everything is setup and running, if I follow through with the idea, I expect anywhere from a few hundred to a few thousand live users at any given time. I've worked with Java quite a bit and will actually be getting Java, primarily Java for web, training at work within the next few weeks so learning JSP shouldn't be too hard. I already have Tomcat running on a flash drive to be able to work on the site at work and at home.

I'm just wondering if someone has any experience with both and can let me know if there would be a noticeable difference between PHP and JSP performance-wise. PHP would be easiest for me but JSP shouldn't be too bad, it would just take a little longer to build which I'm fine with.

 

 

Anyway, that was longer than it needed to be.

Thanks in advance for any help.

 

Link to comment
https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/
Share on other sites

Because its compiled?

I don't really know. I've read some places that its faster and others that there's no difference. I've yet to find anyone that has benchmarked either to say conclusively one way or the other.

Do you not think it is? Is there any real benefit to JSP then? Like does it handle AJAX connections or database connections any better than PHP? If not I could get started on scripting a lot sooner.

I'm interested to here if anyone knows pros and cons of each.

 

Neither PHP nor JSP handle AJAX (HTTP in fact) connections. Their respective Web servers do that. As far as database connectoins, they both use compiled drivers, so there should not be much difference.

The biggest difference can be in data processing, but if all you do is fetch a query, put it into array, display for AJAX to fetch, there's not much work to do anyway.

I expect anywhere from a few hundred to a few thousand live users at any given time.

 

That's really not that big of a load.  At those levels, if you do run into performance issues, how the system is compiled or the socket support efficiency or the like is going to be way down on the list of where the bottlenecks are.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.