[openroad-developer] OR Server
Bodo Bergmann
Bodo.Bergmann at ingres.com
Fri May 30 02:11:23 PDT 2008
Dan,
wrapping an OpenROAD client as a Windows service as Kim describes is one
possible solution.
Another one is to use External User Events sent from the OR server app
to the
OR client app (e.g. "svcclient.img") running on the server machine:
The OR client app (basically a ghostframe) is connected to the same
(shared) OR server app.
The OR Server app contains procedures to:
- accomplish business function of the service
"polls a DB table every to see if there are any records to process,
does some simple SQL if there is work to be done"
It will write the status of the service into global variables within
the server app.
The svcclient will call it regularly (after the delay).
- start your service - CALL SYSTEM 'w4glrun svcclient.img';
- stop the service - by sending an external event to the running
svcclient
using 3GL procedure IIW4GL_SendUserEvent()
The svcclient app has registered itself for the external event
and just closes itself, when the event is received.
- get status of the service -
Just return the values from the according global variables
- trigger other functionality to be executed asynchronously by the
service
Use external events for this type of tasks.
Then you can have another client with a userframe that calls the
procedures in the server app
to start/stop or get status of the service.
Best regards,
Bodo.
Bodo Bergmann | Sr. Software Engineer | Ingres Germany GmbH | Ohmstr. 12
| 63225 Langen | GERMANY | +49 6103 9881 0
-----Original Message-----
From: openroad-developer-bounces at lists.ingres.com
[mailto:openroad-developer-bounces at lists.ingres.com] On Behalf Of Kim
Ginnerup
Sent: Thursday, May 29, 2008 8:59 PM
To: David Tondreau; openroad-developer at lists.ingres.com
Subject: SV: [openroad-developer] OR Server
Hi Dan
If I understand what you want you a client that can sit in the
background doint what ever needed exactly as you do in your userframe
now.
Lets call that your service.
We have done this several times.
Build an application that can run in a ghost frame.
Let this very small frame be timer controlled by the userevent as you
have done.
But let it connect to an OpenROAD Server for all the SQL processing and
business logic.
This will make your the sevice client very small, because you only need
it to wake up and invoke some methods in the appserver.
This should work like a charm.
Now you need a way to get the service client to run on a server as a
real service.
We have done this on windows using srvany.exe
With this program you can wrap your OpeROAD client service as an
NT-service.
Now you can start and stop it as all other services.
If you wan a small OpenROAD client to control the service You can write
a small eclient.
This eclient connects to the same appserver as you service client.
This makes it possible to start and stop your service.
just make a system call with a net start | stop "your service"
You can also use the appserver to query the service to see if it is
alive.
In your service client you add another userevent that on regular basis
write a timestamp in the Appserver
You eclient can query this stamp to see if it is alive.
This may seem complicated, but you should eb able to make a POC in less
than half a day.
The srvany can be a bit complicated to understand, but it is not that
bad after you have done it once.
use the "sc" command to insall and configure the service.
regards
Kim
________________________________________
Fra: openroad-developer-bounces at lists.ingres.com
[openroad-developer-bounces at lists.ingres.com] På vegne af David
Tondreau [david.tondreau at ingres.com]
Sendt: 29. maj 2008 19:47
Til: openroad-developer at lists.ingres.com
Emne: [openroad-developer] OR Server
Hello!
I've got a relatively simple OR application that is one piece of our
overall SOA interface architecture. It polls a DB table every .X sec to
see if there are any records to process, does some simple SQL if there
is work to be done then goes back to the .X sec wait. I currently manage
the wait loop by using the delay attribute of the SendUserEvent command.
I initially had it running as a ghost frame but converted it to a user
frame so I can stop and start it via a GUI as well as set some runtime
options on the fly for debugging purposes.
This process needs to be running exclusively (one instance per DB) and
we'd like for it to execute within the scope of a server and not an
active Windows user session. The functionality I'm looking for is to
enable different clients to inquire about as well as control the status
of the process (stop, start, is it running?) . I initially thought this
might be a candidate for the OR app server but after reading the
documentation it looks to me that the OR server is not geared toward
this type of scenario - it doesn't seem that you can initiate a
perpetual looping process/service that has no active client session
attached to it. Having to use a simple client to do the initial start of
the process isn't a problem. Our scenario is that you would start the
process somewhere then disconnect while it continues to execute until
told otherwise, possibly by a completely different client session.
We're interested in the app server concept for a couple of reasons but
primarily because this will ultimately be a 'back room' process that
shouldn't need an active Windows user session context to continue to
execute under and can respond to commands/inquiries from different
remote clients within the scope of one executing instance.
Is my conclusion about the app server correct? Using java/tomcat, etc is
an option for us but we're trying to avoid that route if possible.
Likewise it needs to be DBMS agnostic.
Thanks in advance for any suggestions or ideas you may be able to offer,
Dan
*Dan McOdrum| Sr. Principal Architect |** Infor** | office: 610.407.8025
| cell: 484.431.5400 | email: **daniel.mcodrum at infor.com*
<mailto:daniel.mcodrum at infor.com>**
_______________________________________________
openroad-developer mailing list
openroad-developer at lists.ingres.com
http://lists.ingres.com/mailman/listinfo/openroad-developer
_______________________________________________
openroad-developer mailing list
openroad-developer at lists.ingres.com
http://lists.ingres.com/mailman/listinfo/openroad-developer
More information about the openroad-developer
mailing list