0

I am writing application in Java. It has 2 parts, server and client. I need to communicate between server and client (secure using SSL). I don't have any other non-Java app connected to server (in long future too not), so I am not dependent on someone else's API.

Most of the data will be strings, numbers, and other "common" data types.

Is it good idea to use Java Serialization to communication between server and client? Or "good way" is use SOAP / XML / RPC / REST / ... ?

I found "Hessian binary web service protocol" is it good or is it waste of time?

Thank you for help. This is my first bigger client-server app.

martin
  • 1,707
  • 6
  • 34
  • 62

1 Answers1

1

Why do you want to restrict your service to java applications? It wouldn't be easier to develop and in the future you possible have to change it to other applications be able to communicate with.

I would suggest you to build a Rest Api serializing your data with JSON. It is simple and you can find lot of information about it, and libraries which do everything automatically, almost. To serialize the information you can use libraries like Jackson and to build your Rest Api Server you can use Spring MVC, you have a simple example here.

For the client you can use Jax-Rs 2.0 .

I hope it has been helpful! Ask anything!

jantunes
  • 317
  • 1
  • 4
  • 15