refactor(akka-apps): remove dead bbb-html5 -> akka-apps messages - #27
refactor(akka-apps): remove dead bbb-html5 -> akka-apps messages#27antobinary wants to merge 2 commits into
Conversation
Part of bigbluebutton#20095. The html5 client no longer publishes to redis — those calls moved to bbb-graphql-actions — so any inbound message with no remaining sender is dead code in akka-apps. Removed three, each marked "client -> apps" in bbb-common-message: PadCreateReqMsg PadUpdatePubMsg UpdatePositionInWaitingQueueReqMsg For each: the case classes in bbb-common-message, the handler trait, its mixin, the MeetingActor dispatch, the AnalyticsActor logging case, and the inbound routing in ReceivedJsonMsgHandlerActor. How these were picked. I took every message the Meteor backend ever published (105, recovered from the deleted imports/api/**/server/methods files across history), intersected with the 208 messages ReceivedJsonMsgHandlerActor still accepts, then dropped everything with a surviving sender in bbb-graphql-actions, bbb-web, bbb-common-web, akka-bbb-fsesl, bbb-shared-notes-server or the client. That leaves 5. Two of those five are NOT removed: UserConnectedToGlobalAudioMsg UserDisconnectedFromGlobalAudioMsg bbb-webrtc-sfu still sends both, from lib/audio/client-audio-consumer.js via Messaging.generateUserConnectedToGlobalAudioMessage. It lives in another repo, so a source grep here does not see it — checked against the installed component. bbb-transcription-controller v0.2.10 was checked too (it uses no pad messages). Pad creation is unaffected: akka-apps drives it itself now, through PadslHdlrHelpers.broadcastPadCreateGroupCmdMsg / broadcastPadCreateCmdMsg called from MeetingActor and PadGroupCreatedEvtMsgHdlr. PadCreateReqMsg was only the old client-initiated entry point. bbb-common-message and akka-bbb-apps both compile. The akka-apps test suite does not compile on v4.1.x-develop either way — 54 pre-existing errors in TestDataGen.scala (RegisteredUsers.create and WebcamStream signatures), identical with and without this change. The one added line in MeetingActor is scalariform re-aligning `=>` in the case block the removal shortened.
Continues the previous commit. These 26 inbound messages are still accepted by ReceivedJsonMsgHandlerActor but nothing anywhere sends them: Initial-state fetches, now served by GraphQL/Hasura instead of a request to akka-apps: GetAllPresentationPodsReqMsg, GetChatHistoryReqMsg, GetCurrentLayoutReqMsg, GetCurrentPollReqMsg, GetGroupChatMsgsReqMsg, GetGroupChatsReqMsg, GetGuestPolicyReqMsg, GetGuestsWaitingApprovalReqMsg, GetPresenterGroupReqMsg, GetScreenshareStatusReqMsg, GetWebcamsOnlyForModeratorReqMsg, GetWhiteboardAnnotationsReqMsg, IsMeetingMutedReqMsg Chat, superseded by group chat in 2018: SendPublicMessagePubMsg, SendPrivateMessagePubMsg Presenter group, feature removed in 2018: AddUserToPresenterGroupCmdMsg, RemoveUserFromPresenterGroupCmdMsg Presentation pods: CreateNewPresentationPodPubMsg, RemovePresentationPodPubMsg, SlideResizedPubMsg, PreuploadedPresentationsSysPubMsg Other: BreakoutRoomsListMsg, LockUsersInMeetingCmdMsg, EjectUserFromMeetingSysMsg, RecordAndClearPreviousMarkersCmdMsg, ClientToServerLatencyTracerMsg For each: the case classes in bbb-common-message, the handler trait, its mixin, the MeetingActor dispatch arm, the AnalyticsActor logging case and the inbound routing. Handlers whose file name did not match the message (PreuploadedPresentationsPubMsgHdlr, EjectUserFromMeetingSysMsgHdlr inside EjectUserFromMeetingCmdMsgHdlr.scala) were removed too. Also removes the 15 outbound messages these leave without an emitter, so the change does not trade one kind of dead code for another: GetAllPresentationPodsRespMsg, GetChatHistoryRespMsg, GetCurrentLayoutRespMsg, GetCurrentPollRespMsg, GetGroupChatMsgsRespMsg, GetGroupChatsRespMsg, GetGuestPolicyRespMsg, GetWebcamsOnlyForModeratorRespMsg, GetWhiteboardAnnotationsRespMsg, IsMeetingMutedRespMsg, NewPresentationEvtMsg, SendPrivateMessageEvtMsg, ServerToClientLatencyTracerMsg, PadUpdateCmdMsg, PosInWaitingQueueUpdatedRespMsg plus the helpers that built them: Polls.handleGetCurrentPollReqMsg, PresentationApp2x.processPreuploadedPresentations, the NewPresentationMsgHdlr trait, MsgBuilder.buildPosInWaitingQueueUpdatedRespMsg, and the GuestWaitingUP VO that only PosInWaitingQueueUpdatedRespMsg used. Note for bbb-pads: it still has a redis handler for PadUpdateCmdMsg (lib/redis/handler.js). Nothing has emitted that message since the client stopped sending PadUpdatePubMsg, so the handler was already unreachable; it can be dropped on the bbb-pads side separately. LayoutApp2x now declares `val liveMeeting: LiveMeeting` itself. It used to inherit that declaration from GetCurrentLayoutReqMsgHdlr, and its sibling handler traits resolve `liveMeeting` through the mixin. Verification. Candidates were taken from the messages ReceivedJsonMsgHandlerActor accepts, minus every message with a sender in this repo, in the components installed on a running 4.x server, in the bbb-graphql-middleware and bbb-webrtc-recorder Go binaries (via strings), or in bbb-transcription-controller v0.2.10, bbb-webhooks v3.6.1 and bbb-webrtc-recorder v0.14.0 at their pinned tags. A second independent pass re-checked every candidate against the Ruby recording scripts, freeswitch, jar/war contents, dynamically-built message names and git history for recently-removed senders. GetMediaGroupsReqMsg also has no sender but is deliberately kept: it is not legacy. It was added 2024-12 as GetAudioGroupsReqMsg and renamed 2025-10 when media groups were extended to cameras and screenshare, and its sibling graphql-actions mutations are live. Removing it should be confirmed with the feature author first. bbb-common-message and akka-bbb-apps compile. The akka-apps test suite does not compile on v4.1.x-develop with or without this change (54 pre-existing errors in TestDataGen.scala). Inbound messages accepted by akka-apps: 205 -> 179. Messages defined in bbb-common-message: 447 -> 406. No message that had an emitter before this PR is left without one.
5d4ec0b to
43351d1
Compare
|
Issue 1 — dead outbound messages Remove dead outbound messages from bbb-common-messageMirror of bigbluebutton#20095. That issue covered inbound (client → apps) messages with no Of 421 messages currently defined in Request/response pairs whose request side is long gone Group chat events, superseded Pads Presentation conversion progress events Other Caveats for whoever picks this up
bbb-graphql-middleware sends UserGraphqlDisconnectionForcedEvtMsg but akka-apps has no handler
akka-apps never handles it. It is not in The message is defined in
So either:
Worth a maintainer deciding which, rather than assuming. Found while working akka-bbb-apps test suite does not compile on v4.1.x-develop
Two model signatures drifted away from the test fixtures:
Also touches Impact: there is currently no automated test coverage for akka-apps — Note that |
🚨 Automated tests failed |
What this does
Closes bigbluebutton#20095 — removes the client → akka-apps messages that no longer have a
sender, and the outbound messages they leave stranded.
The html5 client stopped publishing to redis when its calls moved to
bbb-graphql-actions, and state reads moved to GraphQL/Hasura. AnythingReceivedJsonMsgHandlerActorstill accepts but nobody sends is dead code.44 messages removed.
bbb-common-messageTwo commits, so the risky part is reviewable on its own:
0da4f7574643351d1fbbInbound removed (29)
Initial-state fetches (13) — the client reads this from Hasura now:
GetAllPresentationPodsReqMsg,GetChatHistoryReqMsg,GetCurrentLayoutReqMsg,GetCurrentPollReqMsg,GetGroupChatMsgsReqMsg,GetGroupChatsReqMsg,GetGuestPolicyReqMsg,GetGuestsWaitingApprovalReqMsg,GetPresenterGroupReqMsg,GetScreenshareStatusReqMsg,GetWebcamsOnlyForModeratorReqMsg,GetWhiteboardAnnotationsReqMsg,IsMeetingMutedReqMsgChat (2), superseded by group chat in 2018 —
SendPublicMessagePubMsg,SendPrivateMessagePubMsgPresenter group (2), feature removed 2018 —
AddUserToPresenterGroupCmdMsg,RemoveUserFromPresenterGroupCmdMsgPresentation pods (4) —
CreateNewPresentationPodPubMsg,RemovePresentationPodPubMsg,SlideResizedPubMsg,PreuploadedPresentationsSysPubMsgPads / waiting queue (3) —
PadCreateReqMsg,PadUpdatePubMsg,UpdatePositionInWaitingQueueReqMsgOther (5) —
BreakoutRoomsListMsg,LockUsersInMeetingCmdMsg,EjectUserFromMeetingSysMsg,RecordAndClearPreviousMarkersCmdMsg,ClientToServerLatencyTracerMsgOutbound removed (15)
These lost their only emitter when the inbound side went, so they are removed in
the same change rather than left as new dead code:
GetAllPresentationPodsRespMsg,GetChatHistoryRespMsg,GetCurrentLayoutRespMsg,GetCurrentPollRespMsg,GetGroupChatMsgsRespMsg,GetGroupChatsRespMsg,GetGuestPolicyRespMsg,GetWebcamsOnlyForModeratorRespMsg,GetWhiteboardAnnotationsRespMsg,IsMeetingMutedRespMsg,NewPresentationEvtMsg,SendPrivateMessageEvtMsg,ServerToClientLatencyTracerMsg,PadUpdateCmdMsg,PosInWaitingQueueUpdatedRespMsgPlus the helpers that built them:
Polls.handleGetCurrentPollReqMsg,PresentationApp2x.processPreuploadedPresentations, theNewPresentationMsgHdlrtrait,MsgBuilder.buildPosInWaitingQueueUpdatedRespMsg,and the
GuestWaitingUPVO that onlyPosInWaitingQueueUpdatedRespMsgused.Verified invariant: 25 messages in
bbb-common-messagehave no emitter afterthis PR, and all 25 were already in that state on
v4.1.x-develop. No messagethat had an emitter before this change is left without one.
Notes for reviewers
LayoutApp2xnow declaresval liveMeeting: LiveMeetingitself. It inheritedthat declaration from
GetCurrentLayoutReqMsgHdlr, and its sibling handlertraits resolve
liveMeetingthrough the mixin.Pad creation is unaffected — akka-apps drives it via
PadslHdlrHelpers.broadcastPadCreateGroupCmdMsg/broadcastPadCreateCmdMsgfrom
MeetingActorandPadGroupCreatedEvtMsgHdlr.PadCreateReqMsgwas onlythe old client-initiated entry point.
bbb-pads still has a redis handler for
PadUpdateCmdMsg(
lib/redis/handler.js). Nothing has emitted that message since the clientstopped sending
PadUpdatePubMsg, so the handler was already unreachable; it canbe dropped on the bbb-pads side separately.
Deliberately NOT removed
GetMediaGroupsReqMsghas no sender either, but it is not legacy. Added2024-12 as
GetAudioGroupsReqMsg, renamed 2025-10 when media groups wereextended to cameras and screenshare; its sibling graphql-actions mutations
(
mediaGroupCreate/Destroy/Join/Leave/UpdateParticipant) are all live. Lookslike scaffolding for in-flight work — @prlanzarin should confirm before it goes.
UserConnectedToGlobalAudioMsg/UserDisconnectedFromGlobalAudioMsglookdead from this repo but
bbb-webrtc-sfusends both fromlib/audio/client-audio-consumer.js.TranscriptionProviderErrorMsg— sent bybbb-transcription-controller(
app.js:199).CheckGraphqlMiddlewareAlivePongSysMsg,UserGraphqlConnectionEstablishedSysMsg,UserGraphqlConnectionClosedSysMsg— sent bybbb-graphql-middleware(Go).How "no sender" was established
A grep of this repo is not sufficient — several of the near-misses above are sent
from other repos. Each candidate was checked against:
itself, not just handling it;
bbb-webrtc-sfu,bbb-pads,bbb-export-annotations,bbb-graphql-actions, etherpad incl.ep_redis_publisher, the Ruby recording scripts, freeswitch);unzip -p | strings;bbb-graphql-middlewareandbbb-webrtc-recorderGo binaries viastrings(substring, not anchored — Go concatenates string literals);
bbb-transcription-controllerv0.2.10,bbb-webhooksv3.6.1 andbbb-webrtc-recorderv0.14.0 at their pinned placeholder tags;to-akka-apps-redis-channel, to confirm none builds amessage name dynamically;
docs/, in case any is a documented integration point;git log -Sper message, for senders removed recently enough to be coming back.A second independent pass re-ran all of this adversarially, instructed to refute
rather than confirm. It is what rescued
GetMediaGroupsReqMsg.Testing
bbb-common-message—sbt publishM2succeeds.akka-bbb-apps—sbt compilesucceeds; only pre-existing deprecation warnings.akka-bbb-apps—sbt testdoes not compile onv4.1.x-develop, with orwithout this change: 54 identical errors in
TestDataGen.scala(
RegisteredUsers.createmissingloggedOut;WebcamStreammissinghasAudio/showAsContent/subscribers). Verified by stashing the change andre-running. Filed separately; not addressed here.
MeetingActordiff was reviewed arm by arm: multi-linecase m: X =>bodies are removed together with their
caseline. An earlier scripted attemptdropped only the
caseline and silently merged the body into the previousarm — it compiled and was wrong. Worth spot-checking in review.
Follow-ups
bbb-common-messagehave no emitter and predate this PR —separate issue.
bbb-graphql-middlewaresendsUserGraphqlDisconnectionForcedEvtMsg, whichakka-apps has never had a handler for — separate issue.
akka-bbb-appstest suite does not compile — separate issue.