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

Ladybird+SQLServer: Migrate server launch to Core::IPCProcess::spawn #24398

Closed
wants to merge 1 commit into from
Closed

Ladybird+SQLServer: Migrate server launch to Core::IPCProcess::spawn #24398

wants to merge 1 commit into from

Conversation

abuneri
Copy link
Contributor

@abuneri abuneri commented May 21, 2024

Just saw an inconsistency in how SQLServer and RequestServer were being spawned, and since they are both singleton processes they should be able to be launched the same way. The newer strategy also allowed for some cleanup in how SQLServer handles client connections.

sqlserver-localstorage.mp4

@abuneri abuneri requested a review from trflynn89 as a code owner May 21, 2024 06:30
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label May 21, 2024
Both SQLServer and RequestServer are singletons; however,
launch_sql_server_process() was still using an older spawn strategy
that performs manual forking instead of the new higher level
process spawn abstraction in LibCore. This opened up a few areas
for simplification: No longer passing the PID file to SQLServer,
and no longer using MultiServer explicitly to manually handle new
client connections, as the AK::IDAllocator helper can auto create
new client IDs
@abuneri
Copy link
Contributor Author

abuneri commented May 21, 2024

LibWeb CI for this Pull Request seems to stall on LibWeb tests. Running them locally seems to work fine, I've resubmitted a few times now, so not sure what else to try 🤔

@trflynn89
Copy link
Member

trflynn89 commented May 21, 2024

RequestServer isn't really a singleton process, we just happen to only launch one. But if another app wants to use RequestServer, it will be able to launch its own, rather than re-use Ladybird's instance.

SQLServer does use a singleton process approach on purpose. If we launch Ladybird and the sql REPL, then we do want them talking to the same SQLServer process.

@abuneri
Copy link
Contributor Author

abuneri commented Jun 1, 2024

Ah I see, my conversation here lead me to believe they both were singletons and therefore should share the same launching mechanism.

Thanks for the clarification!

@abuneri abuneri closed this Jun 1, 2024
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Jun 1, 2024
@abuneri abuneri deleted the sqlserver-process-spawn-launch-migration branch June 1, 2024 00:53
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.

2 participants