network programming - Cant choose the right networking solution for my Java app -


i writing distributed java application make heavy use of networking, , needs fast.

let's pretend have class called widget. widgets created client-side (most swing box) need persisted server-side , shared/distributed amongst other connected clients. so, need way serialize widget instances, send them server, server manage them , update connected clients state changes in widgets interested in. (so, once widget created , sent server-side, can theoretically "pulled down" , modified other client.

performance must, must binary protocol. prefer non-blocking sockets, , very, scalable.

so i'm looking @ rmi, nio , netty feasible solutions. if understand java networking correctly, seems indicate rmi considerably slower nio. i've heard rmi lacking in scalability department. nio on other hand, gives more flexibility , considerably more complicated. netty seems have best documentation, seems slower nio , may not capable of need do.

for widget distribution, i'm looking ability send widgets on network, , fast. don't care protocols used.

anyone care share thoughts/input?

thanks!

you mentioned netty. second that. experience netty great. it's efficient library solid documentation , flexibility.

it can can imagine binary protocols, yet need, it's lightweight. scales well. i've load tested single server simple job sustaining on 10k+ request/sec 200-300 concurrent clients. on standard rack server.

there bit of learning curve, javadoc of best i've seen dealing hurdle. project in active development, , lead on project extremely responsive questions , defects.

edit: fast transfer of widgets, protocol buffers. pretty efficient serializing/de-serializing objects on wire.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -