Multiple ABL Apps in PASOE

Posted by Riverside Software on 07-Dec-2015 08:57

Hi,


It seems that as of 11.6 it's possible to have multiple ABL applications in a single PAS instance, and I'd like to know if this is safe to use, at least from a development perspective from now. If a dev environment has 3 AS and 2 webspeed brokers, each one having their own DB connection, propath and connect/actiate procedures, can we replace them with a single Tomcat instance with 5 different webapps, and the following configuration (in openedge.properties):

[AppServer]

 applications=apsv1,apsv2,apsv3,web1,web2

[apsv1]

 webApps=webapp1

# And so on for each ABL application...

# Then apsvX only enables APSV transport, and webX only enables WEB transport

# Finally, multiple session managers are defined

[AppServer.SessMgr.apsv1]

 agentStartupParam=-db /path/to/db1

 agentLogFile=/path/to/apsv1.log

[AppServer.Agent.apsv1]

 propath=/path/to/app1

# And so on for each ABL application...

Starting the PAS instance with this configuration starts 5 _mproapsv, and I can see that each application has the right propath and DB connections, but I'm wondering if this is the right way to work with multiple ABL applications.

All Replies

Posted by David Cleary on 07-Dec-2015 11:34

This is exactly how it is supposed to work and is supported.
 
Dave
 

Posted by Riverside Software on 07-Dec-2015 11:47

Thanks David. Just one thing I fail to understand (from my Tomcat background) : what is the point of having ABL applications span multiple Tomcat webapps ? To my mind, a tomcat webapp is isolated from the others, but ABL apps can be declared on multiple Tomcat webapps. Is there a document or schema which specify the 1:1 or 1:n relations between webapps / ABL apps / Session manager / Agents ?

Is there also a whitepaper on how to set-up WebSpeed applications in a "modern" way, meaning without taking care of the legacy webspeed issues ?

Posted by David Cleary on 07-Dec-2015 12:41

A PASOE instance contains 1 or more ABL applications.
 
An ABL Application consists of one or more Web Applications that share a common session manager.
 
A session manager manages one or more multi-session agents.
 
As far as WebSpeed goes, using the new object model is what you do if you do not care about legacy WebSpeed issues. In PDSOE, you create a new ABL WebApp project and add web handlers.
 
Dave
 

Posted by Peter Judge on 07-Dec-2015 13:32

Thanks David. Just one thing I fail to understand (from my Tomcat background) : what is the point of having ABL applications span multiple Tomcat webapps ? To my mind, a tomcat webapp is isolated from the others, but ABL apps can be declared on multiple Tomcat webapps. Is there a document or schema which specify the 1:1 or 1:n relations between webapps / ABL apps / Session manager / Agents ?

One instance (host:port)
 
HAS one or more (java) webapps
/ROOT
/ServiceOne
/ServiceTwo
 
AND
Has one or more ABL application
 
The names of the ABL apps are in the openedge.properties file.
Each ABL  application lists the webapps that allow acess to it.
 
From an openedge.properties file I have lying around :)
 
[AppServer]
    allowRuntimeUpdates=0
    applications=mediaresource
    collectMetrics=1
    statusEnabled=1
 
[mediaresource]
    webApps=ROOT,SportsSvc
 
 
This says that the instance has a single ABL application – mediaresource – which has two webapps (ROOT and SportsSvc).
 
An ABL application is defined by having a session manager which means it has one or more multi-session agents. Each abl application has its own db connection(s) and PROPATH.
 
Reasons to have multiple WebApps might be to have separate security spaces (ie <instance>/Public might have anonymous access and <instance>/Private might use LDAP or OERealm authentication).

Is there also a whitepaper on how to set-up WebSpeed applications in a "modern" way, meaning without taking care of the legacy webspeed issues ?

That's a good suggestion.
 
What kinds of issues do you mean?
 
 
 
 

Posted by Riverside Software on 07-Dec-2015 14:06

Thanks Peter and David

> An ABL application is defined by having a session manager which means it has one or more multi-session agents. Each abl application has its own db connection(s) and PROPATH.

> Reasons to have multiple WebApps might be to have separate security spaces (ie <instance>/Public might have anonymous access and <instance>/Private might use LDAP or OERealm authentication).

Will have another look tomorrow morning, but for example the startup parameters are defined in the session manager (the -db parameter) while propath is defined in the agent properties.

For a classic appserver (only exposing .p, no REST or SOAP), do you have an example on how security can be applied differently on two different webapps ? If they both share the same propath and db connection, how can security be applied differently ? I have to admit I didn't spend a lot of time on security for now, so that may be a stupid question!

>> Is there also a whitepaper on how to set-up WebSpeed applications in a "modern" way, meaning without taking care of the legacy webspeed issues ?

> That's a good suggestion.

> What kinds of issues do you mean?

Just trying to gather initial requirements to develop / deploy WebSpeed applications using PASOE, so perhaps looking for the holy grail :-)

Posted by Michael Jacobs on 07-Dec-2015 17:13


Consider a case where the web application has an interactive UI that uses form based login sessions for internal users and also supports RESTful data services that use stateless client requests accessible by external partners.   Two web applications work nicely to ensure the user authentication, HTTP session management, and user accounts operate independently under different security rules.

Mike J.

Posted by Gareth Vincent on 11-Feb-2016 05:16

Hi,  How does one control the starting and stopping of one ABL application under a PAS instance.  Lets just say I want to add an additional ABL application while the instance is running... is this possible and can you then startup this ABL application without stopping and starting the PAS instance

Posted by Satya Prasad on 11-Feb-2016 06:40

You are allowed to add additional ABL applications when instance is running. But, You need to re-start the PAS instance after the deployment.
 
Thanks,
Satya
 

Posted by Gareth Vincent on 11-Feb-2016 06:56

That is unfortunate, since we often setup new production environments during the day.  It really doesn't make sense to shut down the entire PAS instance to bring another customer online.  I know its possible to control this with many PAS instances but that defeats the point from a recourse point of view.

Posted by Irfan on 11-Feb-2016 07:15

For a use-case like this, I would consider having a load-balancer in the the front and then manage my production PASOE intances by deploying and enabling required ABL Applications.

As for my knowledge we cannot deploy a new ABL Application without restarting the PAS Instance, but will see if there is any workaround

Posted by Gareth Vincent on 11-Feb-2016 07:31

This does sound like an option but maybe not ideal.  I would like to see if there is another workaround.  

Posted by Gareth Vincent on 11-Feb-2016 07:36

On this topic, how many ABL applications are recommended for an PAS instance before spawning a new instance?  what would the general recommendation be for say 100 ABL applications? Are there any case studies with regards to these numbers?

Posted by Peter Judge on 11-Feb-2016 08:22

The relationships are as such
- 1 instance has 1 or more ABL applications
- 1 instance has 1 or more webapps (URLs)
- 1 ABL application has 1 or more webapps
- 1 webapp (URL) has 1 and only 1 ABL application
 
I would say the quantities depend on a number of factors
- on a developers machine, I'd say one instance with many ABL applications (as long as there are no URL conflicts)
- if you want to be able to scale instances out under a load balancer, then I'd have only one ABL application per instance
- if you are a SaaS provider, you may have one ABL applications per customer and have 1 or more customers per instance (depending on what they pay for)
 
- if you want to be able move an instance easily from Dev -> test -> prod  the fact that you can zip an entire instance and deploy tends to indicate one ABL application per instance. Some of this depends on how you configure your ABL applications. The default PROPATH for an ABL application is $CATALINA_BASE/webapps/<webappname>/WEB-INF/openedge + $CATALINA_BASE/openedge + $DLC/tty which means that ALL ABL applications share a common base propath  ($CATALINA_BASE is the instance's root/top folder) with specialised paths per webapp.  I like the concept of having a whole 'customer application' zippable in the instance directory, so I'd use that default PROPATH or something quite similar. You can, of course, change your PROPATH so that there's no shared entries.
 
I don't know of any case studies done on configs/loads in an instance.
 
 

Posted by Irfan on 11-Feb-2016 08:30

In theory, we can deploy as many ABL Applications we want inside a PASOE Instance depending on its memory. But in practice, we have to configure it such a way that it is manageable. It would depend on the client load, availability and many other factors. So even if we do a case study on that, it would be particular to a specific kind of application.

Posted by David Cleary on 11-Feb-2016 08:34

Deploying a new web application will not automatically start the web application because we have disabled that for security reasons. There probably is a way to configure Tomcat to allow this. We do allow you to start and stop a web application (an ABL application is one or more Web Applications) that is already deployed.
 
If you have Tomcat Manager installed, the you can do a tcman disable. If you do not, it can be done though JMX. This shuts down the transports, but not the session manager, which can be shared among web apps.
 
We also have an API to bounce the agent process without taking down the server. This will allow you to reset any static or singleton r-code a session may have loaded. You need oemanager installed to access this through REST, or use JMX. Once you have made your changes, you can start the webapp up by doing a tcman enable.
 
Dave
 

Posted by Michael Jacobs on 11-Feb-2016 08:48

If the disablement of web application auto deployment does not violate any of your security policies, you can enable it:

pasman config -I <instance-name> psc.as.autodeploy=true

Mike J.

Posted by David Cleary on 11-Feb-2016 09:02

Mike,
 
Unfortunately, Tomcat and tcman tailoring fight over the deployment. Tomcat will start the context while tailoring is still being done. However, after tailoring is done, you can reload the context and it seemed to work after that.
 
Dave
 

Posted by Gareth Vincent on 24-Feb-2016 03:08

Thanks for the feedback.  After spending quite some time playing around with PASOE there are a few tips I would like to share for those that don't know.  Firstly you can monitor and manage the PAS instance with mbeans which is a plugin to Jconsole ($DLC/jdk/jconsole).  

I discovered this by stumbling across a Power Point presentation that David Cleary compiled.  It took me a while to figure out how to get mbeans to talk to PASOE so I thought I would share.  Firstly you need to enable a feature called JMXLifecycle by executing the following tcman command:  ./tcman.sh feature JMXLifecycle=on  or you can edit the server.xml file directly.  

After enabling the feature you can then use jconsole to connect to a remote or local process with the following string:  service:jmx:rmi://10.3.12.16:10002/jndi/rmi://10.3.12.16:10001/jmxrmi.  The port numbers are the psc.as.jmxserver.port and the psc.as.jmxregistry.port under the advanced tab of the property configuration of the pas instance.  the default login and password is jmxadmin:jmxadmin

One of the concern I had was if you are running multiple ABL applications under one instance and you wish to shutdown one of the databases how will this effect the session manager and would you be able to bring up the DB again and re-attach the agents.  It turns out this was not a problem.  After shutting down then bringing up one of the DB's the agents re-attached after the first client request.

There also seems to be a bug in OE Mangement if you try and enable "collect metrics" under the APSV Transport properties.  For some reason it doesn't save the new config.  As a work around I was able to enable this by editing the openedge.properties file directly and simply add the collectMetrics=1 parameter under .APSV

Posted by Satya Prasad on 25-Feb-2016 02:42

For the last issue:
 
I have tested with 11.6 FCS, Using  OE Management I am able to edit and save the “collect metrics” parameter of APSV transport configuration successfully. Can you please check with another PAS instance whether are you able to  duplicate it or not.
 
Thanks,
Satya
 

Posted by Gareth Vincent on 01-Mar-2016 01:40

Hi Satya, i've tested this on Linux and Solaris, both have the same issue whereby I can't save the "collect metrics" parameter of the APSV transport.   The other issue I have is when you go to connections under one of the ABL applications it lists connections from all ABL applications and not just the one i'm trying to query.

Gareth

Posted by Darren Parr on 14-May-2016 16:03

I'm a bit new to this so apologies. This looks amazing. Does anyone know if support for managing the separate session data in OE management/explorer is on the cards.

I note that OE explorer only currently allows for configuration of the root webapp session etc.

-Darren

Posted by Matt Baker on 15-May-2016 11:53

multi-web app support in OEE and OEM does work, but its a bit limited in a few ways.  There currently isn't a way to create a new one or delete an existing one from with the UI.  If you do add one to the properties file, OEE will fully support its configuration, viewing agent/session state and various metrics.  The other limitation is in OEM; some of the graphs and alerts don't support the needed configuration to support multiple web apps.

This thread is closed