Open topic with navigation

# Groups with More than Two Roles

You can extrapolate fault-tolerant behavior to an application with several distinct operating roles.

For example, consider an application that uses roles for graceful degradation of service. Each role subscribes to a different subset of messages by using different content matchers, and processes matching messages.

In the following diagram:

- B1 is an active role: The program processes high priority messages with matcher M1, and ignores the rest. The member with ordinal 1 operates in this role.
- B2 is an active role: The program processes medium priority messages with matcher M2, and ignores the rest. The member with ordinal 2 operates in this role.
- B3 is an active role: The program processes low priority messages with matcher M3, and ignores the rest. The member with ordinal 3 operates in this role.
- B4 is the standby role: The program does not process any messages. Any member with ordinal 4 or greater operates in this role.

  More than Two Roles, Role Behavior
  Ordinal | Role | Description | Matcher
  --- | --- | --- | ---
  1 | B1 | Actively process high priority messages | M1
  2 | B2 | Actively process medium priority messages | M2
  3 | B3 | Actively process low priority messages | M3
  4 or greater | B4 | Standby |

The following diagram shows ordinals and roles based on the number of processes running. When only one instance of application B is running, it has ordinal 1, role B1, and it processes messages with the highest priority. It does not devote any time to messages with medium or low priority.

When two instances are running, one instance, with ordinal 1, role B1, processes messages with high priority. The other instance, with ordinal 2, role B2, processes messages with medium priority. Neither devotes any time to messages with low priority.

When three instances are running, each instance processes messages with a different priority, and together they cover all the priorities. That is, one instance has ordinal 1, role B1, and processes messages with high priority. Meanwhile, the second instance, with ordinal 2, role B2, processes messages with medium priority. The third instance, with ordinal 3, role B3, processes messages with medium priority.

When four or more instances are running, the instances with ordinal greater than 3 idle in standby role B4, ready to processes messages if an instance in any of the processes in the three active roles were to become unavailable.

Tip: Notice that when the process with ordinal k becomes unavailable, all processes with ordinals greater than k shift their roles. When developing programs, design program logic to make this shift smoothly and rapidly.

More than Two Roles, Timeline

Processes Running | Process P1 | Process P2 | Process P3 | Process P4 | Process P5
--- | --- | --- | --- | --- | ---
1 | Ord=1 Role=B1 |  |  |  |
2 | Ord=1 Role=B1 | Ord=2 Role=B2 |  |  |
3 | Ord=1 Role=B1 | Ord=2 Role=B2 | Ord=3 Role=B3 |  |
4 or more | Ord=1 Role=B1 | Ord=2 Role=B2 | Ord=3 Role=B3 | Ord=4 Role=B4 standby | Ord=5 Role=B4 standby

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO FTL® - Enterprise Edition

Copyright © 2009-2024. Cloud Software Group, Inc. All Rights Reserved.