Inter-service communication
All FaceKom runtime edges that are proven in source. Four transports carry inter-process/inter-service traffic:
- RabbitMQ (AMQP, via mq
ConnectionPool) — the primary backbone between vuer_css (CSS, customer side) and vuer_oss (OSS, operator side + DB owner), and between OSS’s own 7 processes. RPC (request/reply), work-queues (point-to-point durable), and pub/sub (fanout). - HTTP REST — vuer_oss → vuer_cv only (
fetchPOST/GET tohttps://<cv-host>/api/v1|v2/...). - Socket.IO — vuer_css ↔ browser/kiosk (the WebRTC signaling + UI realtime channel).
- Janus WebRTC signaling — vuer_oss → Janus Gateway (JSON-over-WebSocket via janus-api). CSS does not talk to Janus.
Branch basis
OSS verified against local
devel(git show devel:<path>); CSS verified againstorigin/devel(no localdevelref); CV against localdevel. Both vuer_oss and vuer_css working trees were checked out on customization branches, so every queue/event name below is from thedevel-line core, not a partner branch.
mq queue/exchange semantics (from mq)
getRPCClient(name)/getRPCServer(name)→ RPC over a durable named queuename+ per-call reply queue, correlationId-matched (RPCServer.ts:94-113,RPCClient.ts:128-159).getQueueClient(name)/getQueueServer(name)→ point-to-point durable work queue namedname(QueueClient.ts:11-37,QueueServer.ts:36-50).getPublisher(name)/getSubscriber(name)→ fanout exchangename, each subscriber gets an exclusive auto-delete queue (Publisher.ts:54-58,Subscriber.ts:86-102). The string passed to these is the queue/exchange name on the wire. Producer = client/publisher; consumer = server/subscriber. An edge exists only where one process registers the client/publisher and another registers the server/subscriber for the same name.
1. RabbitMQ — RPC endpoints (request/reply)
| Queue name | Producer (RPC client) | Consumer (RPC server) | Purpose | Source |
|---|---|---|---|---|
rpc-create-customer | CSS server.js:116 | OSS server.js rpc-create-customer | Create/register a customer | vuer_oss server.js; vuer_css server.js:116 |
rpc-customer-portal-data | CSS server.js:117 | OSS rpc-customer-portal-data | Fetch customer portal data | vuer_oss/css server.js |
rpc-jwt-auth | CSS server.js:118 | OSS rpc-jwt-auth | JWT-based auth of a customer/session | vuer_oss/css server.js |
rpc-get-customer | CSS server.js:119 | OSS rpc-get-customer | Read a customer record | vuer_oss/css server.js |
rpc-waiting-room | CSS server.js:120 | OSS rpc-waiting-room | Waiting-room state/ops | vuer_oss/css server.js |
rpc-videochat-oss | CSS server.js:121 (+ socket videochat.js:18) | OSS rpc-videochat-oss | Videochat room join + room data | vuer_oss server.js; vuer_css server/socket/events/videochat.js:18 |
rpc-callback-request | CSS server.js:122 | OSS rpc-callback-request | Request-callback submission | vuer_oss/css server.js |
rpc-openhours | CSS server.js:123 | OSS rpc-openhours | Opening-hours lookup | vuer_oss/css server.js |
rpc-openhours-calendars | CSS server.js:124 | OSS rpc-openhours-calendars | Opening-hours calendars | vuer_oss/css server.js |
rpc-partner-service | CSS server.js:125 | OSS rpc-partner-service | Partner-specific service calls | vuer_oss/css server.js |
rpc-custom-content | CSS server.js:126 | OSS rpc-custom-content | Custom/branded content | vuer_oss/css server.js |
rpc-selfservice-actions | CSS server.js:127 | OSS rpc-selfservice-actions | Self-service flow actions | vuer_oss/css server.js |
rpc-selfservice-upload | CSS server.js:128 | OSS rpc-selfservice-upload | Self-service file upload | vuer_oss/css server.js |
client-gate | CSS server.js:129 | OSS client-gate | ClientGate SAML/IdP gate | vuer_oss/css server.js |
background-room-export | CSS server.js:130 and OSS server.js (client) | OSS background.js:174 (server) | Room export job | vuer_oss background.js:174; vuer_css server.js:130 |
background-self-service-room-export | CSS server.js:131 and OSS server.js (client) | OSS background.js:175 | Self-service room export job | vuer_oss background.js:175; vuer_css server.js:131 |
rpc-system-check | CSS server.js:132 | OSS rpc-system-check | System-check / diagnostics | vuer_oss/css server.js |
rpc-jwt-kiosk-auth | CSS server.js:133 | OSS rpc-jwt-kiosk-auth | Kiosk JWT auth | vuer_oss/css server.js |
rpc-kiosk-alive-check | CSS server.js:134 (+ socket ping.js ping:oss) | OSS rpc-kiosk-alive-check | Kiosk/OSS liveness (checkOssStatus) | vuer_oss server.js; vuer_css server/socket/events/ping.js |
rpc-media-content | CSS server.js:135 | OSS rpc-media-content | Media content lookup | vuer_oss/css server.js |
rpc-identification-router | CSS server.js:136 | OSS rpc-identification-router | Identification routing | vuer_oss/css server.js |
rpc-device-compatibility-check | CSS server.js:137 | OSS rpc-device-compatibility-check | Device compatibility check | vuer_oss/css server.js |
rpc-appointment | CSS server.js:138 | OSS rpc-appointment | Appointment booking | vuer_oss/css server.js |
rpc-selfservice-v2 (cond: flow+selfService) | CSS server.js:142 | OSS server.js rpc-selfservice-v2 | Self-service v2 actions | vuer_oss/css server.js |
rpc-device-change (cond) | CSS server.js:148 | OSS server.js rpc-device-change | Device-change flow | vuer_oss/css server.js |
rpc-document-upload (cond: documentUpload) | CSS server.js:156 | OSS server.js rpc-document-upload | Document upload | vuer_oss/css server.js |
rpc-document-delete (cond) | CSS server.js:157 | OSS server.js rpc-document-delete | Document delete | vuer_oss/css server.js |
rpc-customer-documents (cond) | CSS server.js:158 (marked “Never used”) | OSS server.js rpc-customer-documents | Customer documents list | vuer_css server.js:158 (TODO comment); vuer_oss server.js |
rpc-flow-documents (cond) | CSS server.js:159 (marked “Never used”) | OSS server.js rpc-flow-documents | Flow documents | vuer_css server.js:159; vuer_oss server.js |
rpc-presentation (cond: presentationMode) | CSS server.js:163 | OSS server.js rpc-presentation | Presentation-mode ops | vuer_oss/css server.js |
css-ping | OSS server.js (client cssPing) | CSS server.js:84 (server) | OSS→CSS liveness ping | vuer_oss server.js; vuer_css server.js:84 |
rpc-system-oss | OSS server.js (client systemOss) | CSS server.js:85 (server) | OSS→CSS system status | vuer_oss server.js; vuer_css server.js:85 |
kiosk-document-scan (cond: documentScanner) | OSS server.js (client documentScan) | CSS server.js:89 (server) | OSS→CSS kiosk document-scan request | vuer_oss server.js; vuer_css server.js:89 |
rpc-transport-css | OSS server.js (TransportCss RPC client) | CSS server.js:217 (TransportCss RPC server) | OSS→CSS transport/media-signaling RPC | vuer_oss server.js; vuer_css server.js:217 |
rpc-transport-oss | CSS server.js:216 (TransportOss RPC client) | OSS server.js (TransportOss RPC server) | CSS→OSS transport/media-signaling RPC | vuer_css server.js:216; vuer_oss server.js |
OSS-internal RPC (between OSS’s own processes)
| Queue name | Producer (RPC client) | Consumer (RPC server) | Purpose | Source |
|---|---|---|---|---|
convert-ping | OSS server.js (convertPing) | OSS convert.js:59 | Liveness ping to converter daemon | vuer_oss server.js, convert.js:59 |
cron-ping | OSS server.js (cronPing) | OSS cron.js:113 | Liveness ping to cron daemon | vuer_oss server.js, cron.js:113 |
background-ping | OSS server.js (backgroundPing) | OSS background.js:171 | Liveness ping to background worker | vuer_oss server.js, background.js:171 |
media-ping | OSS server.js (mediaPing) | OSS media.js:84 | Liveness ping to media server | vuer_oss server.js, media.js:84 |
storage-ping | (registered server) | OSS storage.js:52 | Liveness ping to storage worker | vuer_oss storage.js:52 |
background | OSS background.js:178 (client) | OSS server.js (BackgroundRPCServer) | Background→main RPC | vuer_oss background.js:178, server.js |
background-reports | OSS server.js (reports) | OSS background.js:172 | Report generation | vuer_oss server.js, background.js:172 |
background-archive | OSS server.js (archive) | OSS background.js:173 | Archive jobs | vuer_oss server.js, background.js:173 |
background-recognition (cond: ocr/config) | OSS server.js (recognition) | OSS background.js:182 | Face/document recognition jobs | vuer_oss server.js, background.js:182 |
rpc-xml-report (cond: xmlReport) | OSS server.js + cron.js:122 (clients) | OSS background.js:187 (server) | XML report | vuer_oss server.js, cron.js:122, background.js:187 |
rpc-xlsx-report (cond: xlsxReport) | OSS server.js (xlsxReport) | OSS background.js:192 | XLSX report | vuer_oss server.js, background.js:192 |
cronManager (cond: features.cronManager) | OSS server.js (cronManager) | OSS cron.js:117 | Cron management | vuer_oss server.js, cron.js:117 |
flow-autoclear (cond: flowClear+flow.autoClear) | OSS cron.js:127 (client) | OSS server.js (FlowAutoClearRPCServer) | Flow auto-clear | vuer_oss cron.js:127, server.js |
integration-log (cond: integrationLog.enabled) | OSS server.js (integrationLog) | OSS integrationLog.js:48 | Encrypted integration-log sink | vuer_oss server.js, integrationLog.js:48 |
Cross-service RPC: OSS → e-sign
| Queue name | Producer | Consumer | Purpose | Source |
|---|---|---|---|---|
rpc-esign:external (cond: esign.active) | OSS server.js + background.js:200-202 (EsignApi RPC client) | esign_oss (external e-sign service) | E-signature API calls | vuer_oss server.js, background.js:196-203 |
rpc-esign:externaluses a dedicated queue connection whenesign.queueConnectionnames a pool connection thatconnectionPool.hasConnection(...); otherwise the default connection (server.js,background.js:196-203). The consumer (esign service) lives in another repo — see esign_oss.
2. RabbitMQ — work queues (point-to-point, durable)
| Queue name | Producer (queue client) | Consumer (queue server) | Purpose | Source |
|---|---|---|---|---|
queue-feedback | CSS server.js:193 | OSS server.js (FeedbackQueueServer) | Customer feedback submission | vuer_css server.js:193; vuer_oss server.js |
queue-videochat-oss | CSS server.js:194 (+ socket videochat.js:12,17) | OSS server.js (VideoChatOssQueueServer) | Videochat events CSS→OSS (join/leave) | vuer_css server.js:194, server/socket/events/videochat.js:12,17; vuer_oss server.js |
queue-customer-history | CSS server.js:195 | OSS server.js (CustomerHistoryQueueServer) | Customer history events | vuer_css server.js:195; vuer_oss server.js |
queue-webrtc-log | CSS server.js:196 | OSS server.js (WebRTCLogQueueServer) | WebRTC log events | vuer_css server.js:196; vuer_oss server.js |
queue-clienterror-log | CSS server.js:197 | OSS server.js (ClientErrorLogQueueServer) | Client-side error log | vuer_css server.js:197; vuer_oss server.js |
queue-customer | CSS server.js:198 | OSS server.js (CustomerQueueServer) | Customer events | vuer_css server.js:198; vuer_oss server.js |
queue-selfservice-events | CSS server.js:199 | OSS server.js (SelfServiceEvents, cond flow+selfService) | Self-service events CSS→OSS | vuer_css server.js:199; vuer_oss server.js |
queue-selfservice-v2 | CSS server.js:200 | OSS server.js (SelfServiceV2QueueServer, cond) | Self-service v2 events CSS→OSS | vuer_css server.js:200; vuer_oss server.js |
css-client-ping-result | CSS server.js:201 | OSS server.js (CssClientPingResult) | Client ping-result report CSS→OSS | vuer_css server.js:201; vuer_oss server.js |
kiosk-queue-document-scan (cond: documentScanner) | CSS server.js:205 | OSS server.js (KioskDocumentScanQueueServer) | Kiosk document-scan store CSS→OSS | vuer_css server.js:205; vuer_oss server.js |
queue-transport-oss | CSS server.js:211 (TransportOss queue client) | OSS server.js (TransportOss queue server) | CSS→OSS media-transport messages | vuer_css server.js:211; vuer_oss server.js |
queue-transport-css | OSS server.js (TransportCss queue client) | CSS server.js:212 (TransportCss queue server) | OSS→CSS media-transport messages | vuer_oss server.js; vuer_css server.js:212 |
queue-service-bus | OSS server.js (ServiceBusQueueClient) | CSS server.js:172 (ServiceBusQueueServer) | OSS→CSS service-bus events | vuer_oss server.js; vuer_css server.js:172 |
queue-waiting-room | OSS server.js (WaitingRoomQueueClient) | CSS server.js:173 (WaitingRoomQueueServer) | OSS→CSS waiting-room updates | vuer_oss server.js; vuer_css server.js:173 |
queue-videochat-css | OSS server.js (VideochatCssQueueClient) | CSS server.js:174 (VideoChatCssQueueServer) | OSS→CSS videochat events | vuer_oss server.js; vuer_css server.js:174 |
queue-selfservice-css | OSS server.js (SelfServiceCssQueueClient, cond) | CSS server.js:175 (SelfServiceCssQueueServer) | OSS→CSS self-service events | vuer_oss server.js; vuer_css server.js:175 |
queue-selfservice-v2-css | OSS server.js (SelfServiceV2CssQueueClient, cond) | CSS server.js:179 (SelfServiceV2CssQueueServer, cond) | OSS→CSS self-service v2 events | vuer_oss server.js; vuer_css server.js:179 |
OSS-internal work queues
| Queue name | Producer (queue client) | Consumer (queue server) | Purpose | Source |
|---|---|---|---|---|
queue-convert | OSS server.js (convert) + storage.js:62 | OSS convert.js:63 (ConvertQueueServer) | Push recordings for transcoding | vuer_oss server.js, storage.js:62, convert.js:63 |
queue-storage | OSS server.js (storage) + cron.js:131 (clients) | OSS storage.js:56 (StorageQueueServer) | Move media between storages (e.g. S3) | vuer_oss server.js, cron.js:131, storage.js:56 |
queue-job-status-change | OSS server.js (JobStatusChangeQueueClient) | OSS server.js (JobStatusChangeQueueServer) | Job status-change events | vuer_oss server.js |
queue-selfservice-cron (cond) | OSS cron.js:135 (client) | OSS server.js (SelfServiceCron queue server) | Self-service cron jobs | vuer_oss cron.js:135, server.js |
queue-room-cron (cond: roomAutoCloseHours) | OSS cron.js:139 (client) | OSS server.js (RoomCron queue server) | Room auto-close cron | vuer_oss cron.js:139, server.js |
queue-convert-state | (produced by converter pipeline) | OSS server.js (ConvertStateQueueServer) | Convert-state updates | vuer_oss server.js |
queue-storage-state | (produced by storage worker) | OSS server.js (StorageStateQueueServer) | Storage-state updates | vuer_oss server.js |
queue-convert-state/queue-storage-state: only the queue server (consumer) is registered inserver.js; the matching producer is the convert/storage worker writing back state. The reverse direction (queue-convert,queue-storage) has the explicit client registrations shown above.
3. RabbitMQ — pub/sub (fanout exchanges)
| Exchange name | Publishers | Subscribers | Purpose | Source |
|---|---|---|---|---|
settings-change | OSS server.js, convert.js:67, cron.js:146, background.js:210, media.js:91, integrationLog.js:49 | OSS server.js, convert.js:71, cron.js:157, background.js:221, media.js:98 | Broadcast settings changes to all OSS processes | vuer_oss server.js, convert.js, cron.js, background.js, media.js, integrationLog.js |
customer-key | OSS server.js, cron.js:145, background.js:209, media.js:90 | OSS server.js, cron.js:156, background.js:220, media.js:97 | Broadcast customer encryption-key events | vuer_oss server.js, cron.js, background.js, media.js |
background-process (cond: backgroundProcess) | OSS server.js, cron.js:150, background.js:214 | OSS server.js, cron.js:161, background.js:225 | Broadcast background-process lifecycle | vuer_oss server.js, cron.js, background.js |
These three are OSS-internal fanout (all six OSS processes register the same publisher+subscriber so a state change in one propagates to all). No CSS subscriber is registered for them.
4. HTTP — vuer_oss → vuer_cv (REST)
Only OSS calls CV over HTTP. CV ( vuer_cv) is a leaf: it exposes Falcon REST under
/api/v*(fronted by nginx;/wsfor streaming) and makes no outbound FaceKom calls. There is no HTTP from CSS to OSS — that path is entirely RabbitMQ.
OSS builds the base URL as ${config.cv.httpProtocol||'https'}://${host} and calls with fetch (POST JSON or GET), using an https.Agent({ rejectUnauthorized: config.cv.rejectUnauthorized ?? true }).
- Vision APIs (
server/cv/visions/*viaVuerCVService): host from each entry ofconfig.hosts.cvs(array; per-hostkey/cert/caTLS). Instantiated incustomization/customization.js:79-86(cv:setuphook → oneVuerCVServiceper host). Base URL set atVuerCVService.js:24(vuerCVBaseUrl), passed into vision APIs atVuerCVService.js:40. - OCR / MRZ / face-recognition engines (
server/ocr/engines/*,server/faceRecognition/engine/*): host fromconfig.hosts.cv(single string), base URL atVuerCVOCRRecognition.js:17,VuerCVMRZDetector.js:17,VuerCVFaceRecognitionEngine.js:23.
| Endpoint (method) | Producer (OSS caller) | Consumer (CV route) | Purpose | Source |
|---|---|---|---|---|
POST /api/v1/face-compare | OSS FaceCompareApi.js:26, VuerCVFaceRecognitionEngine.js | CV app_http.py:70 FaceCompareResource | Compare two faces (cosine distance) | vuer_oss server/cv/visions/faceComparision/FaceCompareApi.js:26; vuer_cv app_http.py:70 |
POST /api/v1/face-detect | OSS FaceDetectionApi.js:67, VuerCVFaceRecognitionEngine.js | CV app_http.py:69 FaceDetectResource | Detect faces in an image | vuer_oss server/cv/visions/faceDetection/FaceDetectionApi.js:67; vuer_cv app_http.py:69 |
POST /api/v1/face-draw | OSS VuerCVService.js:257, VuerCVFaceRecognitionEngine.js | CV app_http.py:71 FaceDrawResource | Draw face markers on image | vuer_oss server/service/VuerCVService.js:257; vuer_cv app_http.py:71 |
POST /api/v1/reference-face-extract | OSS FaceExtractionApi.js:59, VuerCVService.js:412 | CV app_http.py:72 ReferenceFaceExtractResource | Extract reference face | vuer_oss server/cv/visions/faceExtraction/FaceExtractionApi.js:59; vuer_cv app_http.py:72 |
POST /api/v1/face-gender-age | OSS VuerCVService.js:466 | CV app_http.py:73 FaceGenderAgeResource | Gender/age estimation | vuer_oss server/service/VuerCVService.js:466; vuer_cv app_http.py:73 |
POST /api/v1/mrz | OSS MRZDetectionApi.js:23, VuerCVMRZDetector.js:40, VuerCVService.js:358 | CV app_http.py:68 MrzResource | Read passport/ID MRZ | vuer_oss server/cv/visions/mrzRecognition/MRZDetectionApi.js:23, server/ocr/engines/VuerCVMRZDetector.js:40; vuer_cv app_http.py:68 |
POST /api/v1/document-ocr | OSS VuerCVOCRRecognition.js:71, VuerCVService.js:321 | CV app_http.py:78 DocumentOcrResource | Templated document OCR | vuer_oss server/ocr/engines/VuerCVOCRRecognition.js:71; vuer_cv app_http.py:78 |
POST /api/v2/document-warp | OSS VuerCVOCRRecognition.js:46, VuerCVService.js:286 | CV app_http.py:82 DocumentWarpResourceV2 | Warp/dewarp document | vuer_oss server/ocr/engines/VuerCVOCRRecognition.js:46; vuer_cv app_http.py:82 |
POST /api/v2/document-recognition | OSS DocumentRecognitionApi.js:25 | CV app_http.py:79 DocumentRecognitionResourceV2 | Document classification/recognition | vuer_oss server/cv/visions/documentRecognition/DocumentRecognitionApi.js:25; vuer_cv app_http.py:79 |
POST /api/v1/barcode | OSS BarcodeDetectionApi.js:21 | CV app_http.py:76 BarCodeResource | Barcode decode | vuer_oss server/cv/visions/barcodeDetection/BarcodeDetectionApi.js:21; vuer_cv app_http.py:76 |
POST /api/v1/barcode-detect | OSS BarcodeDetectionV2Api.js:29 | CV app_http.py:77 BarCodeDetectResource | Barcode localization | vuer_oss server/cv/visions/barcodeDetectionV2/BarcodeDetectionV2Api.js:29; vuer_cv app_http.py:77 |
POST /api/v1/sharpness | OSS SharpnessDetectionApi.js:27, VuerCVService.js:378 | CV app_http.py:75 SharpnessResource | Image sharpness estimation | vuer_oss server/cv/visions/sharpnessDetection/SharpnessDetectionApi.js:27; vuer_cv app_http.py:75 |
POST /api/v1/card-integrity-check | OSS VuerCVService.js:503 | CV app_http.py:88 CardIntegrityCheckResource | ID-card integrity check | vuer_oss server/service/VuerCVService.js:503; vuer_cv app_http.py:88 |
POST /api/v1/image-upload | OSS VuerCVService.js:194, VuerCVOCRRecognition.js:27, VuerCVMRZDetector.js:26, VuerCVFaceRecognitionEngine.js | CV app_http.py:67 ImageUploadResource | Upload an image (returns id for later calls) | vuer_oss server/service/VuerCVService.js:194; vuer_cv app_http.py:67 |
GET /api/v1/image-download | OSS VuerCVService.js:223, VuerCVFaceRecognitionEngine.js | CV app_http.py:74 ImageDownloadResource | Download a processed image | vuer_oss server/service/VuerCVService.js:223; vuer_cv app_http.py:74 |
GET /api/v1/ping | OSS VuerCVService.js:110 (health check, every diagnostic.cvPingIntervalMs), VuerCVFaceRecognitionEngine.js | CV app_http.py:66 PingResource | CV server liveness/health | vuer_oss server/service/VuerCVService.js:110; vuer_cv app_http.py:66 |
The CV image flow is two-step: OSS
POST /api/v1/image-uploadreturns an image id, then vision/OCR endpoints are called with that id (e.g.face-comparesends{firstImageId, secondImageId},FaceCompareApi.js:33-36). CV caches frames in Redis (appcache.py, TTL ~60s) — see vuer_cv.
CV routes that exist but no OSS caller was found in source (devel):
/api/v3/document-recognition,/api/v3/document-warp,/api/v1/document-types,/api/v1/ocr,/api/v1/background-mask,/api/v1/kaptcha-decoder,/api/v1/card-warp,/api/v1/status(app_http.py:80-89). Listed for completeness; not asserted as live OSS→CV edges.
HTTP/WebSocket streaming — vuer_oss → vuer_cv /ws
Separate from REST, OSS opens a WebSocket to CV for streaming CV tasks (PAD, liveness, document/face/barcode/mrz/etc. on a video stream):
| Channel | Producer | Consumer | Purpose | Source |
|---|---|---|---|---|
wss://<cv-host>/ws (JSON frames) | OSS VuerCVWebSocket.js:41 (new WebSocket(url)), driven by VuerCVSession/VuerCVListenerSession | CV WS workers app_websocket.py:109-114 (port 40082+worker, nginx upstream /ws, max_conns=1) | Streaming CV tasks; init msg carries taskType selecting a CV task | vuer_oss server/cv/VuerCVWebSocket.js:20,41,77, server/cv/VuerCVSession.js:149-161; vuer_cv app_websocket.py:56-61,109-114, nginx_vuer_cv_docker.conf.j2:36-37 |
- URL:
${config.cv.wsProtocol||'wss'}://${host}/ws(VuerCVWebSocket.js:20). - Messages are
JSON.stringify({type, payload})(VuerCVWebSocket.js:98). CV validates the init message againstjsonschemas.websocket.init-messageand dispatchestaskTypeviataskMap(app_websocket.py:58-61). - This is the streaming sibling of the REST API; both target the same CV host.
5. Socket.IO — vuer_css ↔ browser/kiosk
CSS runs a Socket.IO 4 server (server/socket/socket-server.js, behind nginx /socket.io → 127.0.0.1:10082). On each connection it applies a fixed list of event modules (socket-server.js:18-36): client, then events/{auth, pagevisit, lobby, waiting-room, echotest, ping, videochat, videochat.presentation, videochat.customerDataChange, videochat.validation, videochat.signature, webrtclog, mobile, selfservice, selfservice-v2, flow} — plus any pushed by callHooks('socket', modules). Handlers register client.on('<event>') (inbound) and reply/emit <event> (outbound, often to the room peer).
This is the WebRTC signaling channel for the customer browser. SDP offer/answer and ICE candidates between the browser and the operator's media are exchanged as
videochat:senderPeer:*/videochat:receivingPeer:*events here, then bridged to OSS over the RabbitMQ transport pair (§2), and OSS drives Janus (§6). The browser does not signal Janus directly.
Representative events (verified; not exhaustive):
| Event | Direction | Handler | Purpose | Source |
|---|---|---|---|---|
auth:auth | browser → CSS | events/auth.js | Authenticate the socket/session | vuer_css server/socket/events/auth.js |
ping:server | browser → CSS | events/ping.js | Round-trip latency to CSS | vuer_css server/socket/events/ping.js |
ping:client / pingClient | browser → CSS → peer | events/ping.js | Latency to the other room member | vuer_css server/socket/events/ping.js |
ping:distance | browser → CSS | events/ping.js | Report measured distance/latency | vuer_css server/socket/events/ping.js |
ping:oss | browser → CSS (→ OSS via rpc-kiosk-alive-check) | events/ping.js | Check OSS status from kiosk | vuer_css server/socket/events/ping.js |
join-waiting-room | browser → CSS | events/waiting-room.js | Enter the waiting room | vuer_css server/socket/events/waiting-room.js |
echotest:start / echotest:candidate / echotest:message | browser → CSS | events/echotest.js | Janus echotest signaling (system-check) | vuer_css server/socket/events/echotest.js |
echotest:jsep | CSS → browser | events/echotest.js | Echotest SDP answer | vuer_css server/socket/events/echotest.js |
videochat:join | browser → CSS | events/videochat.js:16 | Join videochat (CSS calls rpc-videochat-oss + queue-videochat-oss) | vuer_css server/socket/events/videochat.js:16-18 |
videochat:senderPeer:init / :start / :candidate | browser → CSS | events/videochat.js | Customer→operator WebRTC: SDP offer + ICE candidates | vuer_css server/socket/events/videochat.js |
videochat:receivingPeer:candidate | browser → CSS | events/videochat.js | Operator→customer WebRTC: customer ICE for the receiving peer | vuer_css server/socket/events/videochat.js |
videochat:receivingPeer:start / :stop | CSS → browser | events/videochat.js | Receiving-peer SDP (relayed from Janus listener jsep) | vuer_css server/socket/events/videochat.js; OSS server/transport/session/RoomTransportSession.js:976,1007 |
videochat:chat:message | browser ↔ CSS | events/videochat.js | In-call text chat | vuer_css server/socket/events/videochat.js |
videochat:selfMute / :highContrast / :localVideoTrackStatus / :remoteUserHoldMedia | browser ↔ CSS | events/videochat.js | In-call media/UI state | vuer_css server/socket/events/videochat.js |
videochat:screen:resize / :deviceorientation | browser → CSS | events/videochat.js | Viewport/orientation reporting | vuer_css server/socket/events/videochat.js |
videochat:camera:get:values / :set:value / :revert:default / :values:complete | browser ↔ CSS | events/videochat.js | Camera control protocol | vuer_css server/socket/events/videochat.js |
videochat:close | browser ↔ CSS | events/videochat.js | End videochat | vuer_css server/socket/events/videochat.js |
videochat:invite / videochat:flow:change / videochat:promptSmsToken | CSS → browser | events/videochat.js | Operator-driven prompts/flow changes | vuer_css server/socket/events/videochat.js |
videochat:screenshot:remote / :guide:show / :guide:hide | CSS → browser | events/videochat.js | Operator-triggered screenshot guidance | vuer_css server/socket/events/videochat.js |
documentScan:result (in) / documentScan:send:id (out) | browser ↔ CSS | events/videochat.js | Kiosk document-scan exchange | vuer_css server/socket/events/videochat.js |
redirect | CSS → browser | events/videochat.js | Force client navigation | vuer_css server/socket/events/videochat.js |
disconnect | (socket lifecycle) | events/videochat.js, waiting-room.js, echotest.js | Cleanup on disconnect (videochat triggers queue-videochat-oss.leave) | vuer_css server/socket/events/videochat.js:7-13 |
Additional event modules (
videochat.presentation,videochat.customerDataChange,videochat.validation,videochat.signature,pagevisit,lobby,mobile,selfservice,selfservice-v2,flow,webrtclog) register their ownclient.on(...)events in the same pattern; only the high-traffic videochat/auth/ping/waiting-room/echotest events were enumerated from source here. See "Unverified / gaps".
OSS also runs a Socket.IO server (
server/socket/, port:10080) for the operator console (operator browser ↔ OSS). The task scope is CSS↔browser; the OSS operator socket events were not enumerated here.
6. Janus WebRTC signaling — vuer_oss → Janus Gateway
OSS is the only FaceKom node that signals Janus, using janus-api (JSON-over-WebSocket, subprotocol janus-protocol). The media bridge lives in server/transport/session/RoomTransportSession.js.
| Channel | Producer | Consumer | Purpose | Source |
|---|---|---|---|---|
wss://... Janus signaling (webrtc.janusServers.<name>.url) | OSS JanusService.getJanusInstance({url}) → new Janus(...) | Janus Gateway (videoroom/streaming/echotest plugins) | Session create + plugin attach + SDP/ICE relay for the videoroom | vuer_oss server/service/JanusService.js:57-63; config config/dev.json:357-360 (url: wss://localhost:8989) |
Janus Admin API (webrtc.janusServers.<name>.adminUrl, subprotocol janus-admin-protocol) | OSS room-inspector / janus-api JanusAdmin | Janus Gateway admin | Session/handle introspection | vuer_oss server/room-inspector/*, config config/dev.json:360 (adminUrl: wss://localhost:7989); janus-api src/JanusAdmin.js |
Signaling flow proven in RoomTransportSession.js:
this.janus = serviceContainer.service.janus.getJanusInstance(janusConfig)thenthis.janus.connect()(:905-910).- Attaches
VideoRoomPublisherJanusPlugin(pluginName janus.plugin.videoroom, display'customer') for the customer’s outbound feed (:929-930). - Attaches
VideoRoomListenerJanusPlugin(ptype subscriber) for the operator/remote feed (:967-1012). - Customer SDP offer →
videoRoomPublisherJanusPlugin.configure(data.jsep)(:1032); customer ICE (videochat:senderPeer:candidate) → publisher.candidate(...)(:1041-1048). - Operator/remote ICE (
videochat:receivingPeer:candidate) →videoRoomListenerJanusPlugin.candidate(...)(:250-255). - Listener
jsep→ sent back as{type: 'videochat:receivingPeer:start', message: jsep}(:975-976,:1006-1007) → over the transport queues to CSS → to the browser asvideochat:receivingPeer:start.
@techteamer/janus-api demuxes Janus async messages (event/webrtcup/hangup/media/slowlink/detached/error/ack/success/keepalive) back to the owning plugin handle (Janus.js:220-398). janus-api also munges SDP: filters H.264 profiles and (when webrtc.janusConfig.filterDirectCandidates) strips host/srflx candidates to force TURN relay (SdpHelper.js; passed at RoomTransportSession.js:929,1005). See janus-api.
Janus recording post-processing is local, not a network edge: OSS
server/convert/JanusConvertProcess.js:52shells out to thejanus-pp-recCLI to convert.mjrrecordings (consumed viaqueue-convert→ converter daemon). TURN/STUN credentials are minted byTurnPasswordServicein both OSS and CSS fromwebrtc.turn.secret(not Janus signaling).
7. End-to-end videochat media path (synthesis)
Browser ──Socket.IO──> CSS ──RabbitMQ──> OSS ──WebSocket(janus-api)──> Janus Gateway
(videochat:*) (queue/rpc- (RoomTransportSession (videoroom plugin:
videochat-oss, + JanusService) publisher/listener)
transport pair)
<─Socket.IO── CSS <──RabbitMQ── OSS <──WebSocket──────────────┘
(videochat:receivingPeer:start = listener jsep)
- Browser↔CSS: §5 Socket.IO
videochat:*events. - CSS↔OSS: §1/§2
rpc-videochat-oss+queue-videochat-*(room join/leave/events) andqueue-transport-*+rpc-transport-*(the SDP/ICE-bearing transport messages). - OSS↔Janus: §6 janus-api WebSocket.
- In parallel, OSS↔CV: §4 HTTP/WS for face/document/PAD CV on the captured media.
Unverified / gaps
- Socket.IO events: enumerated
client.on(...)/emit(...)forclient,auth,ping,waiting-room,echotest, andvideochatfrom source. The other 10 event modules (videochat.presentation/.customerDataChange/.validation/.signature,pagevisit,lobby,mobile,selfservice,selfservice-v2,flow,webrtclog) were confirmed to be loaded (socket-server.js:18-36) and follow the same pattern, but their individual event names were not transcribed. - OSS operator Socket.IO (
server/socket/,:10080): out of task scope (CSS↔browser); not enumerated. queue-convert-state/queue-storage-stateproducers: only the consumer (queue server) registration was read inserver.js; the producing call sites in the convert/storage pipeline were not located line-by-line.rpc-esign:externalconsumer: lives in esign_oss; only the OSS client side was verified here.- CV routes without an OSS caller (
/api/v3/*,/api/v1/{document-types,ocr,background-mask,kaptcha-decoder,card-warp,status}): listed fromapp_http.pyfor completeness, not asserted as live edges. - Exact
webrtc.janusServershost list andhosts.cvsvalues are deployment config (dev.json shipswss://localhost:8989/ emptyhosts.cv); production values come from partner config / Spring Cloud Config. - Customization branches may add/override event modules and queue participants via
callHooks('socket'|'queue', ...); this doc reflects thedevelcore only. See customization-architecture.
Sources
Files actually read (via git show <ref>:<path> / git grep, read-only; OSS ref devel, CSS ref origin/devel, CV ref devel):
- vuer_oss:
server.js(setupQueue, full),convert.js,cron.js,background.js,media.js,integrationLog.js,storage.js(queue registrations);server/cv/CVApi.js,server/cv/VuerCVWebSocket.js,server/cv/VuerCVSession.js,server/cv/visions/faceComparision/FaceCompareApi.js;server/service/VuerCVService.js,server/service/JanusService.js;server/ocr/engines/VuerCVOCRRecognition.js,server/ocr/engines/VuerCVMRZDetector.js,server/faceRecognition/engine/VuerCVFaceRecognitionEngine.js;server/transport/session/RoomTransportSession.js;server/convert/JanusConvertProcess.js;customization/customization.js(cv:setup);config/dev.json(hosts/cv/janus blocks). Plusgit grepfor all/api/v*endpoints acrossserver/cv,server/ocr,server/faceRecognition,server/service/VuerCVService.js. - vuer_css:
server.js(queue registrations, full grep);server/socket/socket-server.js;server/socket/events/{ping,auth,waiting-room,echotest,videochat}.js;server/socket/client.js;server/socket/events/dir listing;server/service/TurnPasswordService.js(grep, to confirm CSS has no Janus client). - vuer_cv:
app_http.py(routes),app_websocket.py(init/taskType/port),nginx_vuer_cv_docker.conf.j2(/ws,/api). - Orientation (cross-checked, then independently re-verified): mq, vuer_oss, vuer_css, vuer_cv, janus-api.
- Git:
git -C <repo> for-each-ref / rev-parse / ls-tree / show / grep(read-only).