java - Libgdx GWT WebSocket Object Serialization -


background: i'm working on side-project (game) goals of learning libgdx (using javascript/html5 deployment) , figuring out client/server communication in environment (a seemingly unpopular combination).

network communication: coming kryonet background (and since kryonet incompatible gwt), have landed on gwt-web-sockets-1.0.0 (a java gwt wrapper javascript websockets) network communication (which perfect me since i'm comfortable in java).

with use of gwt-web-sockets-1.0.0 library can communicate client -> server using follwing native call:

enter image description here

problem: skeptical of scalability of above send() method. kryonet serializes classes , supports sending respective serialized instances (ex: sending player instance). above implementation, i'm given work sending data type string. have found js wrapper implementation sksamuel in implements practically same thing gwt-web-sockets-1.0.0 except takes 1 step further , adds binary support.

question: ideally, i'd able implement similar kryonet - serializing , sending objects natively through java (gwt-compatible). if isn't possible, i'm guessing next best solution add layer above described send(string data) and/or send(byte[] data) methods network communication. perhaps send(serializer.convert(data)) -- data player object converted either string or byte[] expected argument of native send() method) compatible gwt.

as always, can provide.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -