I'm currently working on an online Java game.I am not an experienced game programmer, having only worked with web applications, so far. Currently, I am building the messaging system between the client and the server, and I came across a big "what if".
Currently, the messaging system uses a custom solution and Java NIO with sockets, but it got me wondering: what if it fails? What if I have to change it all to some other system?
I decided that I should abstract the network layer of my engine, and if someday I need to change it, I'll swap the adapter. Then came two more problems; how would I abstract a network layer, and of course, is it worth the trouble? Will it be a waste of time?