1

So far I've coded two example/just-for-fun server side apps: one, in PHP, would rely on Apache for handling multiple simultaneous requests, and the other, in Java Standard Edition -using sockets-, could only interact with one client at a time, and if I wanted more, I should implement threading (I didn't - too lazy).

Now I want to get involved in a more serious project. This API lets me choose either PHP or Java Enterprise Edition, which I have never used. It seems to require to install and configure an actual server before running anything.

So do you have to implement concurrency yourself for your J2EE program or that's what Glassfish/etc do? Am I doing a wrong assumption if I say 'you don't have to implement request/response threading in PHP'?

ps - English is not my first language. If there's any particularly ambiguous statement please tell me.

deprecated
  • 5,142
  • 3
  • 41
  • 62
  • Are you talking about number of concurrent users or issues arising from concurrency when editing data? – calumbrodie Jun 23 '11 at 14:49
  • I did not quite understand what you were trying to say, but here's a question related to threading with php: http://stackoverflow.com/questions/209774/does-php-have-threading – jous Jun 23 '11 at 14:49
  • @kissmyface - users/connections. @jous OK, so PHP doesn't even have threading so I'll assume you don't take multiple users into account when coding your PHP program. – deprecated Jun 23 '11 at 14:53
  • 1
    With PHP, concurrency is handled by the web server. You write your scripts around a single request. This also means that you don't have any resource pooling. – datasage Jun 23 '11 at 15:59

1 Answers1

2

from a developer point of view, you must understand concurrency. But in general you do not have to deal with it in an explicit way. The apache php module and the Java EE application server provide concurrent requests for you.

But: If you never implemented a Java EE application before, don't do it in a 'customer' project without other Java EE-skilled colleagues. The learning curve is far too steep. If it is for yourself to learn sth. I would recommend using Java EE.

So if you have a tight timeline and a customer in your neck, start with php. For small projects there may be more drawbacks in a Java EE application.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Wintermute
  • 1,521
  • 1
  • 13
  • 34