proggR Posted May 26, 2010 Share Posted May 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/ Share on other sites More sharing options...
trq Posted May 26, 2010 Share Posted May 26, 2010 What makes you believe JSP is any quicker than PHP? Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/#findComment-1063373 Share on other sites More sharing options...
proggR Posted May 26, 2010 Author Share Posted May 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/#findComment-1063712 Share on other sites More sharing options...
Mchl Posted May 26, 2010 Share Posted May 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/#findComment-1063736 Share on other sites More sharing options...
xylex Posted May 26, 2010 Share Posted May 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/#findComment-1063738 Share on other sites More sharing options...
proggR Posted May 27, 2010 Author Share Posted May 27, 2010 Good to hear. Thank you everyone. I'll probably stick to PHP then. Even if JSP were more efficient my lack of experience with it would likely produce ineffeicient code when all is said and done. Time to do some data modelling I suppose Quote Link to comment https://forums.phpfreaks.com/topic/202913-ajax-heavy-site-php-or-jsp/#findComment-1063961 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.