473,462 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to interact with a Live java process from php?

Hi,

My question is pretty much what the title describes. My situation is:
The essential task is to provide a service to web user. This service
can only be accessed from a java program on the backend, and this
program, unfortunately, is a 24/7 live process. My teammate is going
to write a php program to handle the front end request, so my question
is that, is it possible for such a design to work? If it is, how?

Any help is greatly appreciated!

Sophia

Jan 20 '06 #1
5 1588
Sophia wrote:
Hi,

My question is pretty much what the title describes. My situation is:
The essential task is to provide a service to web user. This service
can only be accessed from a java program on the backend, and this
program, unfortunately, is a 24/7 live process. My teammate is going
to write a php program to handle the front end request, so my question
is that, is it possible for such a design to work? If it is, how?

Any help is greatly appreciated!

Sophia


Your details are vague, so it's hard to answer your question.
I'll guess the "live 24/7" backend java process is a "java servlet"
running inside a jakarta-tomcat servlet server.

A jakarta servlet server is essentially a webserver, written in
the java programming language, that responds to the http protocol
(processes post and get requests) and usually, but not always,
runs on port 80.

To send get parameters to the doGet() function of the servlet,
you might use a url like:
http://yourdomain:8080/servletname/pasta/fazoole

Or, in your html page (which might be generated by php code on some
other server) you might have a form whose action handler makes a post
to the servlet, with
<form action="http://yourdomain:8080/servletname" method="post">
<input type="text" name="xyz">
<input type="submit">
</form>

.......in other words, interacting with a servlet is hardly any
different than interacting with an apache webserver.
The servlet that processes the posts and gets, in your case,
sounds like it is already written. You only need to write the
html that interacts with the servlet (or write the php that makes the html)

Servlets written in java a better suited to large complex programming
logic than php......in the minds of most java programmers anyway.
That last statement will probably generate some static on this group.
I work in both languages. And I do think there is a complexity threshold
beyond which java wins, below which php wins.

Jan 20 '06 #2
Thanks for your reply.
Sorry I was not very clear, what I meant as a 24/7 live process is a
spearate standalone java program, it needs to be running 24/7 to handle
task A(backend data processing) and task B (web user request), and both
tasks need to be handled by the same process ( for resources
conflicting reason). So in this scenario, java servelet won't
work(because it is managed by webserver). My current solution is to
have the php script communicate with the java program via unix sockets,
afterall, my problem is the classic inter-process communication.

Jan 20 '06 #3
Thanks for your reply.
Sorry I was not very clear, what I meant as a 24/7 live process is a
spearate standalone java program, it needs to be running 24/7 to handle
task A(backend data processing) and task B (web user request), and both
tasks need to be handled by the same process ( for resources
conflicting reason). So in this scenario, java servelet won't
work(because it is managed by webserver). My current solution is to
have the php script communicate with the java program via unix sockets,
afterall, my problem is the classic inter-process communication.

Jan 20 '06 #4
Thanks for your reply.
Sorry I was not very clear, what I meant as a 24/7 live process is a
spearate standalone java program, it needs to be running 24/7 to handle
task A(backend data processing) and task B (web user request), and both
tasks need to be handled by the same process ( for resources
conflicting reason). So in this scenario, java servelet won't
work(because it is managed by webserver). My current solution is to
have the php script communicate with the java program via unix sockets,
afterall, my problem is the classic inter-process communication.

Jan 20 '06 #5

"Sophia" <qu****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Thanks for your reply.
Sorry I was not very clear, what I meant as a 24/7 live process is a
spearate standalone java program, it needs to be running 24/7 to handle
task A(backend data processing) and task B (web user request), and both
tasks need to be handled by the same process ( for resources
conflicting reason). So in this scenario, java servelet won't
work(because it is managed by webserver). My current solution is to
have the php script communicate with the java program via unix sockets,
do you intent to continue to use
http://us2.php.net/manual/en/ref.sockets.php sockets? PHP has sockets
functions.
afterall, my problem is the classic inter-process communication.

Feb 9 '06 #6

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

Similar topics

1
by: Paul | last post by:
Hello, I am researching ideas for a long term project and am currently investigating Java's capability for processing live video feed. I wish to examine digital video feed in real time and do...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
0
by: Bob Sanford | last post by:
I am working with php scripting under an apache-based web service in Windows. The "allow service to interact with desktop" feature is NOT checked for this service, and I don't want it to be. But I...
9
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or ...
6
by: Ian Frawley | last post by:
Hello everyone I have written a Windows Service to monitor local and remote Processes/Applications. However I am stuck because if it is installed as a user account I cannot get it to interact...
10
by: Steve | last post by:
I want to make a web application that will run on my home server and would like to be able to have the web application interact with another, winforms application. For example, let's say I wanted...
0
by: wayne hamilton | last post by:
I'm having a problem Interacting with Command Line programs. I can read and write anything I want as long as I don't have to interact with a process once it's started. Originally I had been calling...
1
by: =?Utf-8?B?SEQ=?= | last post by:
hi, i recently bought a new laptop with vista home premium and downloaded windows live messenger but about 3 seconds after login, the program stops responding and needs to close down. I see a...
2
by: =?Utf-8?B?SnJ4dHVzZXIx?= | last post by:
I just started using Windows Live OneCare, I had been using Norton, but was unable to fix the problems I was having. I have yet been unsuccessful with OneCare as well. I keep getting the same...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
1
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
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
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.