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

Better Async support #24

Open
CodeLieutenant opened this issue May 5, 2022 · 1 comment
Open

Better Async support #24

CodeLieutenant opened this issue May 5, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed v2 Will be implemented in version 2
Milestone

Comments

@CodeLieutenant
Copy link
Member

Currently there is no way to use Cassandra Driver in non-blocking event loops, while Future can be used for async non-blocking actions, Futures cannot be used in EventLoop (ReactPHP, Swoole, etc).

Cassandra CPP Driver uses LibUV, with some refactoring this could be made to work with other userland implementations of EventLoops

@CodeLieutenant CodeLieutenant added enhancement New feature or request help wanted Extra attention is needed v2 Will be implemented in version 2 labels May 5, 2022
@CodeLieutenant CodeLieutenant self-assigned this May 5, 2022
@CodeLieutenant CodeLieutenant added this to To do in CassandraDriver May 5, 2022
@CodeLieutenant
Copy link
Member Author

After some digging through old Jira issues, I found something very interesting PHP-208, the way how to approach the issue of event loops (libuv, libevent, reactor->swoole). Basically all of those event loops rely on FDs (unix file descriptors) to do the efficient kernel polling.

Using unix socket as channel it the way to solve Async problem, but this needs to have least amount of overhead, the best way I found so far, is to use socketpair syscall and callback in Future.

@CodeLieutenant CodeLieutenant added this to the v2.0.0 milestone Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed v2 Will be implemented in version 2
Projects
Status: To do
Development

No branches or pull requests

1 participant