[ale] PHP vs. J2EE

Chris Fowler cfowler at outpostsentinel.com
Wed Mar 19 16:29:23 EST 2003




-----Original Message-----
From: ale-admin at ale.org [mailto:ale-admin at ale.org]On Behalf Of Jason Day
To: ale at ale.org
Sent: Wednesday, March 19, 2003 3:54 PM
To: ale at ale.org
Subject: Re: [ale] PHP vs. J2EE


On Wed, Mar 19, 2003 at 03:32:26PM -0500, Chris Fowler wrote:
> I'm looking at solving a simple problem with a simple solution.  Problem
> is that I'm not sure of what language to use.  The only benefti of J2EE
> is that I can have back end agents in Java collecting data.  Then the
> web app can communicate with the agents to get that data.  I see PHP as
> a way to insert dynamic code into a static web page that executes when
> the server loads the web page.  Is this the correct view of each.

What do you mean by "back end agents in Java collecting data"?  Do you
mean you have existing Java code that runs in a J2EE container, or do
you have an app server that has some kind of support for agents written
in Java, or something else?  I guess what I'm asking is, why must the
agents be written in Java?


Because the data is being sent from the device.  Sure, the page refresh can
go out and query
100 devices but why would you want that?  That would be too slow.  It would
be easier to
get device status from a middle man on 127.0.0.1.


>
> I really want an agent collecting data and the web interface collecting
> info from the agent.  the agent will communicate with 100 devices.  I do
> not want the PHP to have to communicate with 100 devices when a user
> hits the refresh button.  What are my options?

Can the agents dump their data into a database?  Then you can write PHP
that just hits the db.

That is a good idea.  I could write an agent in language X that would
collect data
and just dump it to a MySQL database.  Then the PHP can interpert the data
in the database.
I have PHP scripts that now display the result of nightly software build.
The software build is controlled by a Makefile and the main nightly build
script is in bourne.  Cron
then executes this script at 1:59am each day.  The results including
software is displayed
nicely by a PHP script.  Only reason PHP is invloved was to give an easy
remote way
of viewing the results of the build.


I guess a web app is more suited for historical data and not instant data.
My device send notifications back to any client that registers itself with
the device via UDP.  A web page can not receive a UDP message.  A Java
applet can but I have a full java app that does it all so the java applet
would be useless.

Sure you can query but if a page sits there all day, the data does not
change for that user until they or the page refreshes. If you set that up
for 30 seconds, that could create useless TCP traffic that is not needed.
I'm just thinking of ways to web enable an app that has been written in
Java.

--
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net

"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list