I am looking for a simplest solution to create a client-server network architecture using Spring 3 framework. The architecture woill have many clients and multiple servers. Each client can connnect to each server. Each client can define a set of services that would have to be generated during runtime by the server.
Communication protocol:
Client says hello to one of 5 servers.
Server gather its local metadata about stored data and send it to client
Client pick some of this info and send the metadata subset to server deciding which data it will need later.
Server basing on the metadata choice, picked by the client, generates dynamically services that will be made available to the client supplying him with data pointed by the requested (step 3) config (eg in form serialized JSON)
Client get the information about generated services and use it for future calls to those services.
The biggest issue is that client doesn't know nothing about server resources to be served until it receives answer and server has no services since it get request from client.
I considered Spring 3:
- HTTP Invokers
- JMS
- Netty (joined with spring)
But as far as I tried the above it's ether hard to provide the dynamic service generation requirement or the amount of code (Netty) is big.
I have rejected SOAP due to its heavy nature. On the other hand REST does not bring here as far as I know any benefits. It is just a way of serving data and it require some kind of servlet container like Tomcat as it uses HTTP. @Timmmm 's great and simple answer to REST fashion
What I am after:
- as simple as possible
- dynamic generation of services based on client choice
- keep server lightweight i.e. no additional server instance (it would be nice to eliminate tomcat; but ts not crucial)
- spring based
What technology would you recommend?
It is quiet hard to accomplish this task with the requirement of configuration based service generation during runtime.
I do NOT want to base on properties files, services must be generated on the fly based on the client request.
Thank you in advance for answers and tips.