BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Udi Dahan on Service-Oriented Composition

| by Jan Stenberg on Aug 03, 2014. Estimated reading time: 1 minute |

In a Service-Oriented Architecture (SOA) where client-side components for one service runs in the same process as components for other services we need to collect several logical calls into one larger physical call, Udi Dahan explains answering a question of how to avoid the high cost, in terms of client to server communication, that otherwise could be substantial.

Demonstrating how to optimize client-server round trips when using loosely coupled components both on the client-side and the server-side, Udi, an authority on service-oriented architecture and creator of NServiceBus, gives an example where an event raised on the client side, e.g. a clicked button, result in two components requiring access to their respective server component in order to get data.

Instead of a regular Ajax call each component subscribing to the event uses a client-side wrapper library to register a call-back method to be called when data is returned from the server. This library is aware of the context of the event being processed and therefore holds all requests in memory until all call-backs have been registered at which time it makes one physical call to the server with all the requests.

On the server side a corresponding library unpacks all the independent requests and invokes the corresponding server component for each request. When the result from all components has been received they are returned as one result to the client.

The client library, when receiving the response, unpacks and dispatches the individual results to each client component at which point the event has been fully handled.

Udi emphasizes that most of the code written for both client and server is transparent to this wrapper library. What’s added is a generic packing and unpacking library enabling support for client and server side composition with lots of small components doing logical calls while minimizing the actual calls made between a physical client and a physical server.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT