Concern: How to design a distributed service?

I have a major concern nowadays when trying to design distributed services that are consumed by the UI.
Imagine that you want to abstract as much as you can thinking of a View. This View consumes a distributed service that can fail to work under a lots of different situations. The most common failure: The connection cannot be established / is lost.
The view can be aware of those problems and try to recover from a failure, for example, warning the user and attempting to reconnect. But, then we totally break the abstraction! we start to think of it as a connected service.
What can we do? Should we put every method call in a try-catch block and a add reconnection loop?
It seems very ugly to me.
How to proceed?
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s