-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
MongoDB Support #138
Comments
I'm not aware of any implementation on Amp directly, but there's https://github.com/jmikola/react-mongodb which is based on ReactPHP and thus fully compatible with Amp v2. That package is marked as experimental, but maybe it helps. |
@kelunik , unfortunately it doesn't work with php7 and new mongodb php driver. |
Hmm. Well, judging by the react-mongodb library, it should be pretty easy to write your own driver for this using amp. If there is interest, I also may prototype such a basic library in a couple of hours. |
@bwoebi , please note that react-mongodb is based on a legacy php mongo extension for BSON processing which is not supported in PHP7, new mongodb extension is much sleeker, it provides BSON serialization and some low level features, but it lacks Asynchronous Queries support, there's a PHP library that is based on the new extension which implements all mongodb features. What do you think about prototyping a basic amp driver which would be compatible with the mongo php library, so it could be used together in amp based apps? |
https://github.com/jmikola/react-mongodb is really just a proof of concept for executing basic queries and commands asynchronously. It only depends on the legacy extension for BSON encoding and decoding, but that could be trivially changed to use the new extension's functions and classes. I would not expect the PHP library to be usable atop any async PHP driver. That said, it lacks many of the essential features you'd need in a driver. TLS connections, authentication, As a side note, https://github.com/mongofill/mongofill implements the legacy driver's BSON API in pure PHP if you were looking to bootstrap a new async driver without any extension dependency. |
Closing this issue, the possible options have been mentioned. Another option is to build a driver based on |
Re-opening. Introduced the |
Hi! Thanks for a great effort making php async!
Is mongodb supported? If so can you give an example of its usage?
The text was updated successfully, but these errors were encountered: