473,887 Members | 2,304 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 1605
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
11595
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 a funciton inVB DLL Function BuildSqlWhereFromHTML(ByRef AspReq As ASPTypeLibrary.Request, _ ByRef AspSes As ASPTypeLibrary.Session) As String
72
4530
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 souls can go check it out and tell me how it renders on their platform/browser combos. I have tested it under W2K, WXP, and System 9 on a Power Mac 8600: W2K: IE5.5 and Opera 7.1 (some small issues in Opera) WXP: IE6 and NS7.1 (in IE6 a strange...
5
2461
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 nothing appears. I change the form's method to GET, then response.write the Request.QueryString items (which I can see in the URL) and it works fine. I need to use POST, as the quantity of data from the form will often exceed the limits of...
13
9672
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 assigned to a variable and output using document.write. (Note, there is no submit button or other form elements. Basically
10
3483
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 answer why ? The impact of this is that values added via javascript will never make it back to the server side code unless one does some jiggery pokery with hidden fields etc. If this is true, then I would like to understand the reason behind the...
0
1242
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 a web service that creates a thread for each request in an input document. Each thread then makes an HttpWebRequest.GetResponse call. When only one request is submitted in the input doc all is fine.
2
1357
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 current tools in xtopdf are available as both end-user command-line tools, and as a library (in both procedural and object-oriented
14
2053
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 Java applet in my case) and serve the requests when they arrive? I want to avoid loading the script for each request. In other words, can it function, in this sense, like a Java servlet?
5
8349
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 by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: for the permission of type
0
9799
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10771
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10877
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10434
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9593
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7143
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4633
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3245
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.