Choosing and querying a specific Webspeed agents

Posted by Yaelh on 26-Feb-2014 09:02

I'm sure you all have  come upon a situation where the webspeed agents gets disconnected from the DB.

Wouldn't it be great to have a batch process that can run an check each agent if it is connected to all the

databases it should be connected to ?

something like this:

for each webspeed agent of service xxxxx:

   if not connected(db1)

   then do:

        kill agent / connect agent to db.

        send me an email

   end,

   if not connected(db2)

   then do:

       kill agent / connect agent to db.

       send me an email....

   end.

end.

 

All Replies

Posted by Libor Laubacher on 26-Feb-2014 09:09

You are assuming that webspeed always connects to a database, which is not the case every time. That being said, nothing is stopping you to write a small .p which will do exactly that. You can load it within the web-disp.p, so it will check whether all your databases are connected, and if not it will issue connect.

Posted by Yaelh on 26-Feb-2014 09:55

True, but from what I understand this causes heavy traffic because
This will run in every submit that
the app does.At least This is what was written in one of the knowledgebase articles.



ב-Feb 26, 2014, בשעה 16:59, Libor Laubacher <bounce-llaubach@community.progress.com> כתב/ה:

Reply by Libor Laubacher

You are assuming that webspeed always connects to a database, which is not the case every time. That being said, nothing is stopping you to write a small .p which will do exactly that. You can load it within the web-disp.p, so it will check whether all your databases are connected, and if not it will issue connect.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Sasha Kraljevic on 27-Feb-2014 08:06

To expand on what Libor said, that funcionality exists in WebSpeed for quite some time.

You should take a look at the $DLC/webspeed/doc/wshelp/framework.htm

All you have to do is to add in the broker's environment appropriate variable name and a list of databases, e.g.:

Databases=sports2000=sportsconnect.p|db1=-pf c:/databases/db1.pf

Relevant variable names are: Databases, dbFailover, DbGroup, DBObject

There is also a number of KBase entries describing their usage:

knowledgebase.progress.com/pkb_Home

Hope this helps...

Posted by Yaelh on 27-Feb-2014 09:10

Yes but once again this is like using
The if connected statment in the web-disp.p but this will cause the check to occur on every submitt  that will
add to load on traffic as explained in knowledgebase 
article that is why I wanted an outside batch.
Thanks,
Yael



ב-Feb 27, 2014, בשעה 15:56, Sasha Kraljevic <bounce-skraljev@community.progress.com> כתב/ה:

Reply by Sasha Kraljevic

To expand on what Libor said, that funcionality exists in WebSpeed for quite some time.

You should take a look at the $DLC/webspeed/doc/wshelp/framework.htm

All you have to do is to add in the broker's environment appropriate variable name and a list of databases, e.g.:

Databases=sports2000=sportsconnect.p|db1=-pf c:/databases/db1.pf

Relevant variable names are: Databases, dbFailover, DbGroup, DBObject

There is also a number of KBase entries describing their usage:

knowledgebase.progress.com/pkb_Home

Hope this helps...

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Sasha Kraljevic on 27-Feb-2014 10:01

If you read further in the same place you will see that there is another environment variable called SUPER-PROC.

If you define :

SUPER-PROC=mybatch.p

and in the mybatch.p you put the following code:

<mybatch.p code>

procedure init-batch:

   RUN my-init-batch.p .

end.

procedure run-batch-object:

   RUN my-run-batch-object.p .

end.

procedure end-batch:

   RUN my-end-batch.p .

end.

</mybatch.p code>

You will execute these procedures at the end of the specified BATCH_INTERVAL.

In other words, you can place any RUN statement that you need in one of these internal procedures and they

will get executed - therefore no need to change Progress supplied source code.

This in combination with other environment variables, should you choose not to use standard WebSpeed built-in db connectivity, will you give you exactly what you want: checking db connectivity within procedure every BATCH_INTERVAL.

I've used this to manage the session/context information cleanup within WebSpeed application.

Hope this helps...

This thread is closed