basho / riak-php-client

PHP clients for Riak
Apache License 2.0
160 stars 69 forks source link

Move focus onto PB interface [JIRA: CLIENTS-83] #70

Closed kuenishi closed 9 years ago

kuenishi commented 10 years ago

As we are moving our focus onto PB interface in Java, Ruby client, PHP will be like them. C client is coming up and up, the future of Riak PHP client would be a small and thin C extension of the C client.

So my question is:

hazen commented 10 years ago

Kota -

Sounds like we'll have to keep HTTP in the Python client for the moment to keep customers happy, but it is being removed from all others. Ruby, Java and C going forward will no longer have HTTP support. Erlang will keep HTTP for testing. We'll probably wrap the C client with PHP.

Does that help answer your questions?

kuenishi commented 10 years ago

Thank you for those informations - Yes, I knew those approaches on other languages. I wanted to ask what PHP client users thinks (good! or "boo!") on our issue.

Darkflib commented 10 years ago

HHVM will be an edge case that will be left without official library support if the non-extension library is dropped.

seancribbs commented 10 years ago

@Darkflib What is required to support HHVM? Does it not have an extension API?

Darkflib commented 10 years ago

It does... but it isn't compatible with the existing PHP Engine extension API.

https://github.com/facebook/hhvm/wiki/Extension-API

seancribbs commented 10 years ago

@Darkflib Ok, that's not surprising. Would there be an easy way to write parallel extensions?

Darkflib commented 10 years ago

@seancribbs Honestly, I don't know.

The extensions interfaces aren't really my areas of expertise - I'm mostly a deployment engineer with a strong Sysadmin/PHP dev background. :(

https://github.com/facebook/hhvm/wiki/Extensions -- you might be able to get some hints from the 4 extensions listed on that page, but I am out of my depth on this one.

Edit: Also... https://github.com/facebook/hhvm/tree/master/hphp/runtime/ext https://github.com/facebook/hhvm/tree/master/hphp/system/php

Darkflib commented 10 years ago

@seancribbs This looks promising: https://github.com/facebook/hhvm/tree/master/hphp/runtime/ext_zend_compat

If you want to compile your existing zend extension against HHVM, you can use these headers. The runtimes are similar enough that we can just map the macros to our data structures and it mostly works.

kuenishi commented 10 years ago

@Darkflib Thank you for feedback. We'll try to support HHVM if it's feasible enough.

bachpedersen commented 10 years ago

If your doing an extension, do a proper OO extension pretty please :+1:

christophermancini commented 9 years ago

At the moment, the priority for this library is to rewrite it for Riak 2.x with consideration for making it easy to extend. By default it will support the HTTP API mainly because PB libraries for PHP are still very immature and often require a 3rd party PHP extension which cannot be managed via Composer.

The hopes of making the library extensible is that you could extend the ApiInterface and write your own Api client to connect to the PB interface or whatever interface Riak supports in the future.

Also, there is no current plans for a C extensions in the forseeable future.