Concurrency Viewer
Grounded against origin/releases/7.0 (MibServer3
ConcurrencyWorkflow/IConcurrencyWorkflow, MibMicroServices
Concurrency/ConcurrencyController.cs). Identical on releases/6.0 — the
cited files are byte-for-byte the same on both branches.
The Concurrency Viewer is the React-shell view of the Concurrency Microservice. It shows operators which other users are currently editing or viewing the same record, surfaced as a small avatar pill in the top-right toolbar of an edit page.

Related docs.
Concurrency Microservice — the service that stores and serves the concurrency data.
System Overview — Concurrency MS — role, storage model (in-memory only), failure mode.
How it works at runtime
- On opening an edit page, the React shell starts a poll loop that
pings the FrontEnd Server every
MibCmsFrontEndServerBaseConfig.UserConcurrencyPollingTime(default 10s). - The BFF forwards each poll to the Concurrency MS, sending the current user + page + record. The MS records the entry with a sliding TTL (default 4–5 minutes), then returns the list of other users currently on the same record.
- The shell renders the returned avatars in the toolbar pill.
- When the user navigates away, no explicit deregister happens on the client — but see BFF-side cleanup below, which proactively unlinks stale entries; the MS's own sliding TTL is a second, independent backstop.
This is a visibility feature, not a locking feature. Concurrent saves are still arbitrated by ETag-based optimistic concurrency in the Data API; the Concurrency MS just tells each operator who else is there.
Tracking key: per browser tab, per sub-component, permission-gated
The BFF's IConcurrencyWorkflow/ConcurrencyWorkflow
(MibServer3 · MediaiBox.Cms.FrontEnd.Workflow/MicroServices/Concurrency/ConcurrencyWorkflow.cs)
tracks state keyed by a client-generated uuid (one per browser tab/session, not per user —
the same user editing the same record in two tabs shows up as two entries) and by
(mibIndex, ComponentsEnum) — ComponentsEnum.MainComponent is the whole item, but a
component can register concurrency for a sub-component of the same item independently
(the only other ComponentsEnum value is ContentCriteria, for the content-criteria editor), so
two operators working on different parts of the same record can both show up without implying
they're colliding on the same field.
Before honoring LinkUser/RefreshUserLink/UnlinkUser, the BFF re-checks the caller's own
read permission on that media type (MibIndexAllowed →
IUserWorkflow.GetUser().MediaTypePermissions…CanRead, cached ~1 min) and returns 401 Unauthorized if it was revoked mid-session — the concurrency link itself is not a permission
grant.
BFF-side cleanup (in addition to the MS's TTL)
Every LinkUser/RefreshUserLink call updates an in-memory (uuid → lastPingTime) map on
the BFF (ConcurrencyWorkflow.cs _lastUserPing/_userRegisteredData, static, per BFF process).
Each call also triggers CheckInactiveUsers(): if more than userConcurrencyPollingTime × 5
(the maxMissedRefresh constant) has elapsed since the last sweep, the BFF walks every tracked
uuid, and for any that missed more than 5 poll cycles it proactively calls the MS's DELETE .../concurrency/v1/{mibIndex}/{component}/{mediaTypeIds} to unlink it — a background task, not
awaited by the triggering request. This means a tab that silently died (crash, network loss)
gets cleaned up from the BFF's own bookkeeping faster/more deterministically than waiting on
the MS's sliding-TTL eviction alone, but only once another poll happens to trip the check —
if all traffic stops, nothing runs this sweep until the next poll from any user on any record.
Because _lastUserPing/_userRegisteredData are static in-process dictionaries, this state
does not survive a BFF pod restart or exist across BFF replicas — behind a load balancer with
several BFF pods, each pod tracks only the pings it personally received.
Failure mode
If the Concurrency MS is unreachable, the React shell silently hides the pill. Operators can still edit; they just don't see who else is in the same record. There is no banner or error — the feature degrades silently.
Storage
The Concurrency MS holds all state in memory. On pod restart, all concurrency state is lost, then rebuilt over the next polling cycles (typically within 10 seconds). No persistent storage; no MongoDB; no SQL.
Setup
The Concurrency MS is required for this view to function. It is distributed as a Docker image from Amazon ECR. The available image tags:
873339144623.dkr.ecr.us-east-1.amazonaws.com/agile/mib-cms-microservices-concurrency
873339144623.dkr.ecr.us-east-1.amazonaws.com/agile/mib-cms-microservices-concurrency-bionic
873339144623.dkr.ecr.us-east-1.amazonaws.com/agile/mib-cms-microservices-concurrency-alpine
Sample docker-compose.yml:
version: '3'
services:
mibconcurrency:
image: 873339144623.dkr.ecr.us-east-1.amazonaws.com/agile/mib-cms-microservices-concurrency-alpine
restart: unless-stopped
ports:
- 80:80
environment:
- mibauthorizationclientconfig_default_serverurl=http://cmsauth
- mibcacheconfig_default_app=true
- MibConcurrencyConfig_default_SlidingExpirationTime=00:05:00
Configurations
MibConcurrencyConfig (server side)
<?xml version="1.0" encoding="utf-8"?>
<mibConfig>
<default>
<slidingExpirationTime>00:04:00</slidingExpirationTime>
<inMemoryExpirationScanFrequency>00:10:00</inMemoryExpirationScanFrequency>
<userIdCacheExpirationTime>00:01:00</userIdCacheExpirationTime>
</default>
</mibConfig>
| Key | Purpose |
|---|---|
slidingExpirationTime |
How long an entry lives in memory after the last update. If the user stops polling (navigates away, closes the tab), this is how long their avatar still shows up to others. |
inMemoryExpirationScanFrequency |
How often the in-memory store evicts expired entries. Tune downwards under high churn. |
userIdCacheExpirationTime |
How long the service caches the user-id → user-info lookup it performs against the Authorization Server. |
MibAuthorizationClientConfig
Required so the Concurrency MS can resolve user ids to user info (name, email, avatar) for the response:
<?xml version="1.0" encoding="utf-8"?>
<mibConfig>
<default>
<serverurl>https://auth-url</serverurl>
</default>
</mibConfig>
MibCacheConfig
Required to enable in-process caching in the MS:
<?xml version="1.0" encoding="utf-8"?>
<mibConfig>
<default>
<app>true</app>
</default>
</mibConfig>
Client-side wiring (on the BFF)
To wire the FrontEnd Server up to the MS, set on the BFF's
MibCmsFrontEndServerBaseConfig:
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<userConcurrencyServiceUrl>http://concurrency.microservice.example.org</userConcurrencyServiceUrl>
<userConcurrencyPollingTime>00:00:10</userConcurrencyPollingTime>
<userConcurrencyHealthProbeTimeout>00:00:02</userConcurrencyHealthProbeTimeout>
</default>
</mibConfig>
| Key | Purpose |
|---|---|
userConcurrencyServiceUrl |
The Concurrency MS URL the BFF talks to. |
userConcurrencyPollingTime |
How often the React shell polls. Must be lower than slidingExpirationTime so entries don't expire under steady traffic. |
userConcurrencyHealthProbeTimeout |
Short timeout for the health probe (GET /api/v2/concurrency/health). On timeout or an unavailable service the probe returns Unavailable in the body with HTTP 200, so it never blocks the shell nor logs a per-navigation error. |
If userConcurrencyServiceUrl is unset, the shell skips the pill
entirely.
See also
- Concurrency Microservice — full service docs
- System Overview — Concurrency MS — role, failure mode, storage model
- Auditing — the other "who/what/when" view in the same toolbar
MibCmsFrontEndServerBaseConfig— BFF-side configuration reference