Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Client - Server Communication Approach?

Basically I need a bidirectional client-server communication (Java) where the client calls methods on the server, but also needs to get "callbacks" if certain events in the server occur. The methods theirselves have quite complex input and output parameters and lateron it would be nice to include authentication to the system. Which approach would fit my requirements? I already build a prototype with RMI, but I read that there exists a number of problems especially for "callbacks" when the c/s are in different networks. Additionally I would like to avoid JAX related technology, becuase of my complex data structures in the parameters.

like image 376
WorstCase Avatar asked Nov 13 '22 20:11

WorstCase


1 Answers

Have you thought about using JMS. Within this architecture, server and client will register to a queue or topic and are able to send messages to each other. This enables sych and async application behaviour.

Please have a deeper look into JMS here:

http://java.sun.com/developer/technicalArticles/Ecommerce/jms/index.html

And a really nice implementation is ActiveMQ:

http://activemq.apache.org/

like image 183
powerMicha Avatar answered Dec 29 '22 09:12

powerMicha