-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(subscriptions): skip bullmq
for WS subs, push all WS subs thru one Redis channel
#4585
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
bullmq
job for WS subscriptionsbullmq
job for WS subscriptions, push all subscriptions through one Redis channel
c502153
to
d0e144e
Compare
bullmq
job for WS subscriptions, push all subscriptions through one Redis channelbullmq
for WS subs, push all WS subs thru one Redis channel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is clean.
- Minor, some commented out code
- What is the case for multiple websocket connections sharing a
Subscription
? I guess it's neat that we support it, I just didn't think it was something that would be possible. Maybe if the Subscription id is in localStorage, and you have multiple tabs open?
} | ||
|
||
function subscribeWsToSubscription(ws: ws.WebSocket, subscriptionId: string): void { | ||
let wsSet = subToWsLookup.get(subscriptionId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Is it allowed to use the same Subscription
on multiple websocket connections? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically allowed by the spec, and Currently our client doesn't support it but it shouldn't be hard to add support for it in the future. I kinda left it open more for other client implementers / to be more FHIR spec-compliant
} | ||
const wsSet = subToWsLookup.get(subscriptionId) as Set<ws.WebSocket>; | ||
wsSet.delete(ws); | ||
if (wsSet.size === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever
Quality Gate passedIssues Measures |
Updating sample HL7 bot to include ADT-08 messages (#4591)Dependency upgrades 2024-05-27 (#4593) feat: enable unit testing subscription criteria (#4581) feat(fhircast): properly respond to `unsubscribe` request (#4590) Fixes #4576 - Windows 1252 character encoding (#4594) refactor(subscriptions): skip `bullmq` for WS subs, push all WS subs thru one Redis channel (#4585) Added fhirpath test data (#4598) Fix several fhirpath functions taking `other` Atom and implement subsetOf & supersetOf (#4601) Use nested transactions with stronger isolation (#4583) Support Database SSL config from Env (#4597) Parse ADT example (#4596) Better PATCH error messages (#4607) Respect AccessPolicy.resource.{readonlyFields,hiddenFields} in ResourceForm (#4588) Fix IAM policy resource strings (#4603) Fixes #4440 - backslash escaped commas in search values (#4609) Fixes #4147 - formatSearchQuery with _include:iterate (#4610) Fixes #4462 - configurable Bot AuditEvent.outcomeDesc max length (#4612) Fixes #4531 - choice-of-type definitions and getExtensionValue() (#4611) Allow Bot to return Binary (#4595) Remove spurious console.warn (#4616) Fixed flaky repo tests (#4618) Fixes #4617 - replace Google QR code API (#4619)
Updating sample HL7 bot to include ADT-08 messages (#4591)Dependency upgrades 2024-05-27 (#4593) feat: enable unit testing subscription criteria (#4581) feat(fhircast): properly respond to `unsubscribe` request (#4590) Fixes #4576 - Windows 1252 character encoding (#4594) refactor(subscriptions): skip `bullmq` for WS subs, push all WS subs thru one Redis channel (#4585) Added fhirpath test data (#4598) Fix several fhirpath functions taking `other` Atom and implement subsetOf & supersetOf (#4601) Use nested transactions with stronger isolation (#4583) Support Database SSL config from Env (#4597) Parse ADT example (#4596) Better PATCH error messages (#4607) Respect AccessPolicy.resource.{readonlyFields,hiddenFields} in ResourceForm (#4588) Fix IAM policy resource strings (#4603) Fixes #4440 - backslash escaped commas in search values (#4609) Fixes #4147 - formatSearchQuery with _include:iterate (#4610) Fixes #4462 - configurable Bot AuditEvent.outcomeDesc max length (#4612) Fixes #4531 - choice-of-type definitions and getExtensionValue() (#4611) Allow Bot to return Binary (#4595) Remove spurious console.warn (#4616) Fixed flaky repo tests (#4618) Fixes #4617 - replace Google QR code API (#4619)
No description provided.