Controlling Execution of TIBCO ActiveMatrix BusinessWorks Services

Process starters

Process starters create process instances to handle incoming events.

Flow Limit:

Limits the number of process instances created by a process starter. This allows you to control the flow of processing so that incoming events are no longer accepted when the limit is reached.

Process instances

When the process definition is executed, it is known as a process instance.

Process instances consume memory and CPU resources on your system. Depending on the available machine resources, you may only be able to run a limited number of process instances concurrently.

Process instances typically remain in memory as long as they are executing an activity.

If the process instance is waiting for an incoming event (for example, a Wait for Adapter Message activity), the process instance can be paged out to disk and resumed later after the event arrives.

New process instances are paged out to disk until there is available memory and resources to accommodate them.

MaxJobs:

Specifies the maximum number of process instances that can concurrently be loaded into memory.

Activation Limit:

Can be used to specify that a process instance loaded into memory must remain there until it completes, process instance should not be paged out to disk until it completes.

ActivationLimit is applied when MaxJobs property is set to a value > 0.

if you set Max Jobs to 5, the process engine can only keep 5
process instances in memory. Any process instances created once the maximum is reached must be paged out to disk.

Disadvanteges

Specifying a value for Max Jobs causes the process engine to incur some overhead for managing the paging of process instances to and from disk. If you have sufficient system resources and do not expect incoming events to exceed the limits of your system, consider specifying Max Jobs as 0.

This allows the process engine to create an unbounded number of process instances and eliminates the overhead of paging.

Process engine

Process execution is controlled by the process engine.

The process definition is executed by a TIBCO ActiveMatrix BusinessWorks process engine. A process engine creates instances of process definitions. When the process definition is executed, it is known as a process instance.

When a process engine reaches the specified Flow Limit, it is placed in a FLOW_CONTROLLED state. In this state, the process engine can continue executing existing process instances, but new process instances are not allowed.

Incoming messages can then be directed to another process engine. A process engine will resume creating new process instances once a sufficient number of its current process instances have completed. Typically a process engine comes out of the FLOW_CONTROLLED state when the number of process instances completed is approximately half of the value specified for the Flow Limit property.

How to deploy JMS Topic Subscriber & JMS Queue Receiver?

Imagine that ; Process A has a timer activity.

Process B has a JMS Queue Receiver activity.

Process C has a JMS Topic Subscriber activity.

These processes are to be deployed on 2 machines and configured to operate in fault-tolerant and load-balanced mode.

To achieve this configuration you should take these two steps:

Bundle the JMS Topic Subscriber and Timer in one EAR file and deploy it in fault-tolerant mode.

Put the JMS Queue Receiver in its own EAR and deploy it twice.

How to receive data from an EMS Topic and send it to an EMS Queue?

Imagine that a TIBCO Business Works process must be deployed that gets input from an EMS topic and sends data to an EMS queue.

The topic and queue names must contain a token used for migrating between Test and Production environments. The system admin must be able to purge the EMS topic and EMS queue from within the TIBCO Administrator.

These two steps should be taken to create a TIBCO Administrator domain to meets these requirements:

1-) The EMS server should be added to the domain using the Domain Utility.

2-) A global variable should be used for migrating between environments.

Container Stack

Container Stack Layers:

Limitations of Docker:

  • Docker is only aware of the containers running on the machine it runs on
  • Horizontal scaling in Docker does not exist
  • Docker does not repair applications which become unhealty and cannot

Virtual Machines vs Containers:

Hardware Node with 4 apps:

Comparison of Virtual Machines and Containers:

A WM reserved for 1 App

Containers available for more apps

How to throttle HTTP Receiver incoming HTTP requests?

Today, I would like to mention about an issue that I faced at work. In our system an HTTP Receiver is overloaded. And I wanted to throttle the number of incoming HTTP requests.

To do this ; I followed to steps:

I used the bw.plugin.http.server.maxProcessors property,

after that I set the FlowLimit for the particular process.