-
Notifications
You must be signed in to change notification settings - Fork 46
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
Native PHP extension / driver which uses fuerte and velocypack #232
Comments
@sandrokeil: this is a good idea and we also thought about that a bit. |
There exists a project lucassouzavieira/arangodb-php-driver which uses zephir. @lucassouzavieira have you compared php-cpp and zephir? If so, can you say the advantages over php-cpp? Have you think about to use fuerte as foundation? |
@sandrokeil, this is exactly the idea of the project with Zephir. The extension will work natively with PHP 7+. About PHP-CPP: I considered using it for the native driver, but Zephir seems to me a more interesting option. Anyway, the Zephir documentation is very broad and the integration with the Zend Engine API is very good. It is very easy to develop with Zephir, especially for those who already develop with PHP. It is also natively memory-safe and cross-platform.With PHP-CPP I might have to worry about interoperability between different platforms. If I had chosen PHP-CPP, I would certainly use the fuerte base. |
@lucassouzavieira Thanks for your reply.
Does this mean, that fuerte would not work with zephir? Because the docs says, you can also use any cpp library? I think, if someone works on a native PHP driver, they should rely on fuerte, because of velocypack and other features. Like node-arangodb-cxx and build an abstraction like the ArangoDB PHP lib on top of that. Any idea how we can join the work to get things done? I have created some ArangoDB types which are pretty handy, I guess. Not sure if it is useful for the official lib too? /cc @jsteemann @frankmayer You have some ArangoDB libs like ArangoDB-PHP-Core-Guzzle. You also interested in more performance and async stuff? |
@sandrokeil, I agree with you regarding that new native driver support the velocypack.
We can include C libraries in the build process. If we have a C binding for the velocypack, it can be included in the driver. Although the velocypack is written in C++, i believe it is possible to use its functions in C. Check this. In this way, we can add velocypack support in the arangodb-php-driver. The same can be done for the fuerte. In my view, it's better than rewriting a new native driver again. |
@lucassouzavieira / @jsteemann I've build a php-cpp Docker image to build the extension and I've created a arangodb-php-driver respository and it looks like the extension can be build with fuerte and velocypack. 🎉 Next step could be a velocypack and fuerte call to see if this works. Maybe we can simply port node-arangodb-cxx to PHP. |
@sandrokeil, I'll take a look at your repository. I believe that the Velocypack and other features of the fuerte can be included without problems in the repository that I have been working on. Only C binding would be required for the fuerte and velocypack projects in C++. @jsteemann, can you say something about it? What do you think about that ? |
@lucassouzavieira It would be great if this works, so I guess we can go this way. I don't know if it does matters which tool we use to build the extension. Do you know if Alpine Linux is supported? |
Simple velocypack call works. Small progress but I guess my build is ugly and I have new linking issues. |
Kudos to @martin-schilling :-) Now velocypack and fuerte are working. A collection was created, but the script is hanging. I don't know if it's a fuerte or PHP extension problem. /cc @jsteemann |
It looks like the go variant is not an option, but this PR is a game changer. 🎉 |
Are there any plans to create a native PHP >= 7.1 extension of this library to increase overall performance in PHP? Something like node-arangodb-cxx.
Have you any idea which performance gain can be expected with this or do you think it's not worth the effort?
The text was updated successfully, but these errors were encountered: