Skip to content
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: Initial migration of bbb-web APIs #19918

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

paultrudel
Copy link
Collaborator

@paultrudel paultrudel commented Mar 27, 2024

What does this PR do?

This PR makes it so that meeting state from akka-apps is used rather than the state from bbb-web to construct responses for isMeetingRunning, getMeetingInfo, and getMeetings API requests. A new application, bbb-core-api, has also been created that implements these endpoints and will implement other bbb-web endpoints such as create in the future. Communication between bbb-core-api and akka-apps is done through gRPC.

The Protobuf definitions can be found in bbb-common-grpc. Both akka-apps and bbb-core-api extract these definitions from bbb-common-grpc to generate the required Scala and Go code. For akka-apps this code is generated by sbt using the compile task. The proto-gen.sh script found in bbb-core-api will generate the required Go code. The Go code generation requires protobuf-compiler, protoc-gen-go, and proto-gen-go-grpc all installed and available on the PATH.

sudo apt-get install protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

Use the run-dev.sh script in bbb-core-api to run the Go server.

Motivation

Removal of application state from bbb-web is part of the ongoing process to consolidate application state in akka-apps. Currently requests for information about meetings comes from the internal state of bbb-web when it should instead be coming from akka-apps

This is the first step in the process of totally removing application state from bbb-web and migrating away from the bbb-web Grails API.

@antobinary antobinary added this to the Release 3.1 milestone Mar 28, 2024
Copy link
Member

@antobinary antobinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments, did not try running yet.

Note [ to self ], this needs:

  • packaging
  • bbb-conf --setip/setsecret to set the salt in the config
  • we should consider picking up overriding configs from /etc/bigbluebutton/bbb-core-api-config.yml or similar
  • Please try to include some README.MD in core-api and/or bbb-common-grpc explaining what we're looking at, how it's used, how to run as developer, some diagram you may have already.

Nice work so far!

akka-bbb-apps/build.sbt Outdated Show resolved Hide resolved
// Create a source using the returned collection of RunningMeetings.
Source.future(runningMeetingsFuture).flatMapConcat { runningMeetings: VectorMap[String, RunningMeeting] =>
// Consumers of this API can pass an optional meetingId argument indicating that the stream should begin from the corresponding RunningMeeting.
// Check if this argument has been provided. If not then use the entire collection of RunningMeetings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+++++++ Really appreciate the level of inline comments here! 👏

bbb-core-api/cmd/api/helpers.go Show resolved Hide resolved
bbb-core-api/cmd/api/helpers.go Show resolved Hide resolved
bbb-core-api/go.mod Show resolved Hide resolved
Copy link

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Copy link

sonarcloud bot commented Apr 8, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.1% Duplication on New Code

See analysis details on SonarCloud

Copy link

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
3.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants