Php client write bytes data can not be read with other language?


#1

As document http://www.aerospike.com/docs/guide/data-types.html said: the bytes type should be supported in any language.

However, I noticed the php client use a different way to wrap the binary bytes to the Class 'Aerospike\Bytes'. This bytes data can not be read by other languages since the serializer for the wrapped object is php.

So how can I put bytes data using the php client and read with other language clients?


#2

we just want to put raw binary bytes which should be supported by the document.

Another question is how to read the bytes data written by other languages? Or is it currently not supported in the php-client to read/write bytes data type from other language? I noticed in Golang client or Java client, both have the particleType enum:

// Server particle types. Unsupported types are commented out.
NULL    = 0
INTEGER = 1
FLOAT   = 2
STRING  = 3
BLOB    = 4
// TIMESTAMP       = 5
DIGEST = 6
// JBLOB  = 7
// CSHARP_BLOB     = 8
// PYTHON_BLOB     = 9
// RUBY_BLOB       = 10
// PHP_BLOB        = 11
// ERLANG_BLOB     = 12
// SEGMENT_POINTER = 13
// RTA_LIST        = 14
// RTA_DICT        = 15
// RTA_APPEND_DICT = 16
// RTA_APPEND_LIST = 17
// LUA_BLOB        = 18

Does the php-client support the BLOB?


#3

That’s a bug. It should treat anything wrapped in the \Aerospike\Bytes class as raw blob (particle type 4). Please open it as a bug in the aerospike/aerospike-client-php repo on GitHub.


#4

I already opened the issue on GitHub

https://github.com/aerospike/aerospike-client-php/issues/99

Hope it can be fixed soon. Thank you.


#5

i can’t find @Vincent_Lee’s issue in this link: https://github.com/aerospike/aerospike-client-php/issues/99 it’s fixed, right?


#6

@Nguyen_Thong That has been fixed for the new PHP 7 client.


#7

@rmarks thank for you support!