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?
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?
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.
I already opened the issue on GitHub
https://github.com/aerospike/aerospike-client-php/issues/99
Hope it can be fixed soon. Thank you.
@Nguyen_Thong That has been fixed for the new PHP 7 client.
1 Like
@rmarks thank for you support!