473,513 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request for input : What makes most sense in *your* PHP environment?

Dear all,
although being a user of PHP and other scripting-languages for years, I
have not taken part in any large projects based on PHP. Thus, I don't
really know how real PHP-applications are deployed out there. This
posting is a request for input from professional PHP-users and
architects with experience from designing PHP applications.

My company makes a toolkit for developing WebServices. This toolkit is
typically used to expose an API to existing applications. i.e. exposing
(parts of) an existing application as a WebService. The server-part of
this toolkit is implemented in Java and currently requires the
user-application also to be implemented in Java (running inside a
container of the users choice or standalone, if desired). The toolkit
can generate client-code for PHP - see http://www.smodl.org/ if you're
interested in more details.

One of our goals is to make the server-part of our toolkit work in a
LAMP stack, allowing the user-application to be written in e.g. PHP.
Running it on a MS platform with IIS and PHP may be a secondary result,
but it is not the primary goal. We would, for obvious reasons, like to
re-use the proven server-part of the toolkit, which is written in Java.
This suggests using some way to bridge PHP and Java. I understand that
such bridges exists, but first there is the question of architecture :
How should these components interact?

These are the three different scenarios we are currently investigating
:

Scenario 1 : Let a servlet-container (e.g. Tomcat) be the front-end of
the WebService, running the toolkit server-part as a servlet. The
servlet would perform toolkit-tasks and then call the appropriate
methods in the user-application written in PHP. I imagine the SAPI
module would handle this. Pro : SAPI seems to be recommended on php.net
as a robust and efficient solution. Con : replacing apache as the
front-end might not be desireable?

Scenario 2 : Let a http-server (e.g. Apache) be the front-end of the
WebService, primarily invoking a PHP-script. This PHP-script would
bridge to the toolkit server-part to perform toolkit-tasks, and then
call the appropriate methods in the user-application. The PHP-Java
bridge should be able to handle this. Pro : Apache remains the
frontend, user-control over the primary entry-point. Con :
availability, stability and performance of the PHP-Java bridge?

Scenario 3 : Let a http-server (e.g. Apache) be the front-end of the
WebService, primarily invoking a cgi-bin. The cgi would essentially
wrap the standalone toolkit server-part which would perform toolkit
tasks and then call the appropriate methods in the user-application
written in PHP. The SAPI module should be able to handle this. Pro :
Apache remains the frontend, SAPI seems to be recommended as robust and
efficient solution on php.net. Con : startup-time?

As briefly indicated above, these scenarios have different pros and
cons. But which one makes most sense and would fit most seamlessly into
your PHP production-environment? Have I possibly missed some obvious
points? Or are there other scenarios which would make more sense?

Thanks in advance for your time!

Best regards,
- Bjarne

Jan 17 '07 #1
2 1589
Bjarne wrote:
although being a user of PHP and other scripting-languages for years, I
have not taken part in any large projects based on PHP. Thus, I don't
really know how real PHP-applications are deployed out there. This
posting is a request for input from professional PHP-users and
architects with experience from designing PHP applications.
My gut reaction would be to keep them quite seperate - or at least have the
PHP running in the front end rather than the back end. But a quick browse
through the comments on the PHP/Java integration page
(http://uk.php.net/manual/en/ref.java.php) suggests that both methods of
direct integration are far from stable/fast.

So I would go with scenario 3; combining well understood, stable and
scalable methods for implementing Java and for implementing PHP.

I'm not quite clear why the user application has to be written in Java
unless the toolkit becomes part of the runtime.

C.

Jan 17 '07 #2
Hello!
(http://uk.php.net/manual/en/ref.java.php) suggests that both methods of
Nuke this link. There's no java support since php 5.0, they have
removed the experimental php 4 java extension but kept the web page.

But running the java bridge from Zend or from sourceforge.net within
Geronimo or Apache/Tomcat is quite fast and very reliable.

Jan 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11574
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
72
4407
by: B McDonald | last post by:
http://www.galtsvalley.com Hi all. I've recently made some major stylistic changes to my site and now it is essentially a new design with some new CSS plumbing. I am hoping that a few hardy...
5
2441
by: Paxton | last post by:
I created an html email containing a form whose method is POST. The form is posted to an asp page for processing, but no values are retrieved. So I response.write all the Request.Form fields, and...
13
9586
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
10
3449
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
0
1225
by: Brad Wood | last post by:
<environment> Consuming a web service from a VS2005 beta 2 test harness on WinXP. Web service built with VS2003 running on my machine with IIS 5X set to use ASP.NET 1.1 </environment> I have...
2
1327
by: vasudevram | last post by:
Hi all, I had created this open source project - xtopdf - http://sourceforge.net/projects/xtopdf - some time ago. It's a toolkit to help with conversion of other file formats to PDF. The...
14
2021
by: DavidNorep | last post by:
I do not know PHP, consider to write a CGI with this technology and have the following question. Is it possible to invoke a PHP script and let it endlessly wait for requests from a website (a...
5
8279
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.