nakama icon indicating copy to clipboard operation
nakama copied to clipboard

[Feature Request] MessagePack

Open AleksandarEri opened this issue 9 months ago • 2 comments

Is it possible to integrate within runtime a https://github.com/vmihailenco/msgpack Currently i have integrate message pack lua way but in lua when used takes about 300mb so it is not very useful

Lua one can be found here https://github.com/AleksandarEri/nakama-lua-msgpack

AleksandarEri avatar Feb 14 '25 22:02 AleksandarEri

@AleksandarEri It's possible to use whichever binary serialization format you like with Nakama. It could be MessagePack, FlatBuffers, Protocol Buffers, or others. We tend to use Protobuf because parts of Nakama itself uses it internally; you can see an example of a Protobuf definition of ours which is open-source here:

https://github.com/heroiclabs/hiro/blob/main/hiro.proto

No matter which serialization format you choose to use I think the easiest way to integrate is to use the Go server framework support in Nakama. This lets you pull the library in directly as a Go package - whereas the other server runtimes we support would need to parse the descriptor at runtime for the format and expose encode/decode functions. We're happy to review the contribution if you're interested to write the code.

novabyte avatar Feb 17 '25 18:02 novabyte