Skip navigation links

Package net.sf.mmm.service.api

Contains the API for simple remote invocations to communicate between client and server.

See: Description

Package net.sf.mmm.service.api Description

Contains the API for simple remote invocations to communicate between client and server.

Service API

This package and it sub-packages contain the API for remote invocations. The API (and implementations) provide a solution for simple but flexible and powerful remote invocations with focus on asynchronous processing on clients (e.g. web-clients using Google Web Toolkit, native JavaFx clients, etc.).

The Problem

In order to communicate between client and server there are various decisions to make and problems to solve: For the different protocols and formats very technical solutions with a high flexibility exist. For example with JAX-RS we get code like this:
 public Amount calculateTotal( @PathParam("dispositionId") Long dispositionId, State dispositionState);
You can see that there are a lot of considerations to care about. Also such approach is leading to redundancies if you have a large amount of services. Even worse, if your client is also written in Java the calling code is not directly related to the service operation. You have to manually ensure consistency so everything fits and works together. The latter is better with JAX-WS but SOAP is also causing a lot of problems and limitations. Also during development and maintenance it is hard to trace calls from the client to the server side implementation.
Solutions like JAX-RS and JAX-WS are cool and reasonable for external and interoperable services consumed by third-party vendors. However, for internal services (services dedicated to clients or other applications within the same application landscape typically under control of the same vendor) this is causing a lot of unnecessary effort and problems. Approaches like spring-remoting make your life a lot easier but still require you to configure every service on server- and client-side. Also it does not address all the questions we listed above.

The Solution

In case you want to realize internal services then mmm-service will make your life a lot easier. Technically it is based on existing solutions like spring-remoting (HttpInvoker, hessian), GWT-RPC, and others. Conceptional it defines a generic service via which all remote invocations are send and that has to be setup and configured only once. All services you define and implement are declared via CDI and therefore automatically registered on the server side. This offers the following advantages: There are two supported styles available that you can choose from:
Skip navigation links

Copyright © 2001–2014 mmm-Team. All rights reserved.