 |
Among the school children
A couple of weeks ago I was giving a talk on enabling (pattern) asset consumability at an IBM hosted best practices conference down in Palisades, New York. The talk was scheduled to be at the end of the day so I knew my audience brains would be fried and overload by technical content by this time. Also, the title of my talk enabling (pattern) asset consumability would make the best of us yawn. So I decided on a different tack here, I am still not sure how successful it was, since only a handful of poor souls made it to my talk, but here it is anyway. Recently I have read two excellent book on speech giving. The first is Give Your Speech, Change the World and the second on is Make to Stick. Now where there first book is excellent in detailing how to actually give presentation, the second book excels in detailing how to make your messages, in those presentations, stick to your audience. So for my talk I decided I would shake things up and open with a poem in a effort to exercise the right side of my their brains. The poem titled "Among the school children" from one my favorite poets W. B Yeats. Now this poem is long over 8 stanzas, so I just focused on one of the stanzas, here it is: Plato thought nature but a spume that plays
Upon a ghostly paradigm of things;
Solider Aristotle played the taws
Upon the bottom of a king of kings;
World-famous golden-thighed Pythagoras
Fingered upon a fiddle-stick or strings
What a star sang and careless Muses heard:
Old clothes upon old sticks to scare a bird. Here Yeats is examining the philosophies of some of the worlds famous philosophers from Plato to Pythagoras, yet with all their knowledge and insights, they all still withered and died away. In his later poetry, Yeats uses this recurring theme of a scarecrow to symbolize his own mortality. Here from the same poem: Better to smile on all that smile, and show
There is a comfortable kind of old scarecrow.
As I said I am not sure how successful this technique was, my audience of five just was enough to swing it either way, but I would certainly be interested to know of other unconventional speech giving techniques that you have used in the past that have worked? We will be publishing a paper on this talk soon and will post the link as soon as it becomes available.
Categories
: [ asset | asset-based-development | patterns | poem | poetry ]
Apr 16 2008, 04:56:36 PM EDT
Permalink
|
A common message
Last month I did some service modeling work for a well known insurance company in the US. After five years of helping customers with SOA this particular company was very mature in terms of their cultural alignment between their business and IT stakeholders and was also adopting some of the best practices and patterns around SOA enablement.
A little background, this company is typical of so many other Fortune 500 companies in that the business struggles with it silo-ed nature, that has been built up over decades. Two simple silos within this organization are the personal and commercial insurances lines, both offering insurance products to different customer bases.
SOA is all about aligning the business with the IT and for this to happen they have to all speak a common language. To help understand this better lets take a simple analogy of the worlds favorite organization the United Nations. Now I am not privy to the internal working of the UN but I do know that it employs a lot of interpreters to interpret from one language to another. Take the example of an interpreter working for the French ambassador. This interpreter will need to be able to interpret from French to Chinese, from French to English, etc or to whatever the native language of the person the ambassador is talking with. This is clearly a very stressful job for the interpreter. Now lets pretend that I have been put in charge of the UN and have decreed that from now on the common international language will be Irish (this would be a complete disaster by the way, as Irish is notoriously a very difficult language with needlessly complicated grammar and syntax, I know this because I spent 14 painful years of in school learning it). Now all the interpreters need to know is how to convert from their host language to Irish and back again.
Scaling this up to the enterprise, let us examine three best practices around a enterprise common message model: - The first best practice is simply to have one. The business and the IT need to agree upon an enterprise message format, or lingua franca across the organization. Thus what was traditionally a silo-ed organization in terms of personal and commercial insurance (each has a difference via of what a customer/party is) could now start to share service based on a common understanding about what what was a claim, a policy or indeed a customer/party. This really is not news to anyone starting to mature in the SOA space, however, the next best practice is a bit trickier.
- The second best practice is not to build this enterprise common message model yourself. This can not be overstated. Building a enterprise strength common message model in a big job. To get a sense as to how big, consider IBM Insurance Application Architecture or IAA models. Now I am not here to plug these models, but they have been built up over ten years worth of experience, of practitioners, in the insurance industry. As a result these models are highly normalized and contain some of the best patterns and lessons learned and are what I would consider a mature enterprise model. There are many other enterprise strength message models out there such as ACORD, SID (telco), STAR (automotive) . One also needs to differentiate between industry standard models and priority models and here again I want to outline a best practices in terms of their usage. Industry standard model such as ACORD have been debated and agreed upon by concerned parties within an industry vertical, these models are there typically to level the playing field and provide a good, typically flat, model structure to enable B2B exchanges between companies in that particular business vertical. Priority models on the other hand such as IAA and IBM Information FrameWork Service Models (IFW), are highly normalized models, and are there to provide a company with core differentiation within the marketplace. The best practices then become to use a priority model internally within the organization, to define the internal services and as a lingua franca for the messaging infrastructure and then to use one or more industry standard models to define services that are exposed external to the organization and typically involved in B2B exchanges and delegate to the message infrastructure to convert between them.
- Finally the enterprise message model must be managed and governed. New versions of these message model are being released all the time as new markets and opportunities arise and your company needs a coherent and consistent way of managing this change. Let us go back to our UN example and imaging that the Irish language was continuously changing (it is not, the Irish language in a considered a dead language), think of the nightmare for the interpreters having to continuously learn a new version of the common language.
For those you foolish enough to want to learn Irish, to champion the cause of having the UN adopt it as a common international language, if refer you to Des Bishop web site
Slán go fóill...
Categories
: [ common-message-models | information | information-management | message | message-model | message-models | pattern | patterns | reusable-assets | soa ]
Apr 15 2008, 11:08:29 AM EDT
Permalink
|
SOA information as a service pattern specifications
Guenter Sauter et al have three excellent SOA information as a service pattern specifications papers on data federation, data consolidation, and data cleansing. You can find these three papers on developerWorks:
-
Data federation pattern: The data federation pattern virtualizes data from multiple disparate information sources. The pattern creates an integrated view into distributed information without creating data redundancy while federating both structured and unstructured information. This article describes the federation of structured information (data) with a focus on the SOA context. This pattern specification helps data and application architects make informed decisions on data architecture and document decision guidelines.
-
Data consolidation pattern: The data consolidation pattern specification helps data and application architects make informed architectural decisions and improve decision guidelines. In this article you will see how you can apply the pattern in the SOA context. The primary business driver for the data consolidation pattern, also referred to as the data population pattern, is to gather and reconcile data from multiple data sources before this information is needed. To do so, it extracts data from one or more sources, transforms that data into the desired target format, and loads it into some persistent data target. The prepopulation of a persistent target is a key differentiator between this pattern and the data federation pattern.
-
Data cleansing pattern: The data cleansing pattern specifies rules for data standardization, matching, and survivorship that enforce consistency and quality on the data it is applied against. The data cleansing pattern validates the data (whether persistent or transient) against the cleansing rules and then applies changes to enforce consistency and quality. In this article, you learn to apply the data cleansing pattern within a Service-Oriented Architecture (SOA) context. This pattern specification helps you, as a data or application architect, to make informed architectural decisions and to improve decision guidelines.
Categories
: [ architecture | assets | information | information-as-a-service | information-management | patterns | reusable-assets | soa | software-patterns ]
Apr 12 2008, 10:45:39 AM EDT
Permalink
|
Services-based enterprise integration patterns made easy
A new artilce from Dr. Waseem Roshen, in the series titled: Services-based enterprise integration patterns made easy, appeared today on dW SOA and Web services zone. Here is the abstract:
This series of articles explains services-based enterprise integration patterns in an easy-to-understand, step-by-step way. In this installment, Part 1 of the series, you learn about the two earliest integration patterns—data sharing only and remote procedure call (RPC)—which help introduce the concepts of service provider and service consumer, platform independence, and connectivity. Exploring RPC helps you get familiar with the basic steps necessary for two applications to share functionality. This article also includes a general description of the concepts of loose coupling, code reuse, and layering and componentization. Part 2 of the series will continue the discussion of the early patterns, while Parts 3 and 4 cover the Service-Oriented Architecture (SOA)-based integration patterns, including examples.
Categories
: [ integration | integration-patterns | pattern | patterns | soa ]
Apr 10 2008, 02:35:58 PM EDT
Permalink
|
The asset graveyard
One of my favorite movies of all time is Sergio Leone spaghetti western classic: The Good, The Bad and the Ugly. Part of the appeal of this movie is the simplicity of the plot; at its heart it is, a treasure hunt, with the three main characters, the good, the bad and the ugly hunting for confederate gold. Between them they know the location of the treasure, buried in a grave in a cemetery, yet only their combined knowledge will lead them to the prize. Towards the end of the film the Ugly a character called Tuco, played by Eli Wallach, comes upon the graveyard, called Sad Hill, and here in one of cinema truly great moments, backed by a unforgettable score, he begins his frantic and haphazard search for the grave of Arch Stanton.
What is impressive about this scene is the sheer scale and size of the graveyard itself, a conservative estimate would put it at over 2000 graves, arranged in a circular fashion. Tuco starts from the center of Sad Hill, where the graves are oldest, and works his way outward initially in concentric circles but soon his search becoming more haphazard as he despairs at the magnitude of the task. Finally, after a dizzy and Groundhog Day like scene of multiple graves passing by he come upon the grave of Arch Stanton, only to find it devoid of any gold, indeed all that remains is a rotting corpse.
Today, this story is echoed in ever IT projects I have ever been a part of, one of my favorites is from within my own group in IBM. It should be noted here that our team is geographically dispersed so although we talk on the phone regularly,we do not get the chance to chew the fat at lunch or around a water cooler. A good friend and colleague of mine on our team, lets call him Bob, was leading the engineering of one the first SOA service registry for an automotive customer in California. One requirement the customer had for the service registry that it performs within certain limits. Unknown to Bob, our group has tackled a very similar problem a couple of years earlier on another engagement. We realized the importance of this work and created a number of assets around it. These assets feel under the broad classification of the requester side caching pattern of which we created pattern specifications, pattern implementation, pattern documentation (including, dW articles, flash movies and a detailed case study). A full listing of all of these and other pattern asset related articles can be found on my home page.
Bob unaware of the previous asset work we had done in this space and having I am sure ran in circles around his own repository graveyard a number of times, he did what any other good architect would do, he started from scratch and reengineered the exact same asset as we had two years earlier.
Just like Tuco desperately searching Sad Hill for the confederate gold, Bob too faced the same dilemma, in fact I have witness that same dilemma on every IT engagement and software project I are involved in. I dare say that this dilemma is not evenexclusive to IT but that you will find the exact same problem is almost every human endeavor whether it be an engineer building a rocket to put a man on mars to a lawyer drafting claims for a patent application, How do we provide the right assets,the content, to help solve the problem at hand, the context.In other words, how do we automate a context to content mapping to suggest the best assets to our architects, engineers, lawyers to help them?
Categories
: [ asset-based-development | assets | pattern | patterns | soa ]
Apr 07 2008, 11:16:13 AM EDT
Permalink
|
IBM Redbook on Strategic Reuse with Asset-Based Development
A good friend of mine Lee Ackerman let me know last week that a IBM have just publicly released a draft of a new Redbook, titled: "Strategic Reuse with Asset-Based Development".
The book is available from: http://www.redbooks.ibm.com/redpieces/abstracts/sg247529.html?Open
The Redbook is structured as follows:
Part 1. Introduction
- Chapter 1. Introduction to Asset-Based Development
- Chapter 2. ZYX Electronics case study
- Chapter 3. Tools in support of Asset-Based Development
- Chapter 4. Introduction to the IBM Rational Unified Process
- Chapter 5. Asset-Based Development and Asset Governance Rational Method Composer plug-ins
- Chapter 6. Value, impact and return on investment
Part 2. Reusable Assets
- Chapter 7. Adopting Asset-Based Development
- Chapter 8. Configure your asset repository
- Chapter 9. Produce reusable assets
- Chapter 10. Consume reusable assets
- Chapter 11. Manage reusable assets
Part 3. Service Assets in an SOA
- Chapter 12. Introduction to service assets
- Chapter 13. Producing service assets
- Chapter 14. Consuming service assets
- Chapter 15. Managing service assets
Part 4. Patterns
- Chapter 16. Introduction to patterns
- Chapter 17. Produce: model-to-text pattern implementations
- Chapter 18. Produce: model to model
- Chapter 19. Produce: packaging for deployment
- Chapter 20. Consuming pattern implementations
- Chapter 21. Managing pattern implementation assets
Part 5. Appendixes
- Appendix A. Rational Asset Manager: installation and administration
- Appendix B. Integrating Asset-Based Development into a process
- Appendix C. Additional material
Categories
: [ asset-based-development | assets | pattern | patterns | soa ]
Mar 30 2008, 04:23:39 PM EDT
Permalink
|
Pattern (reusable) assets classification
Reusable software assets represent significant IP in terms of lessons
learned from previous engagements and can to address both functional
and non-functional requirement (e.g. a performance non-functional
requirement could be addressed using the requester side caching pattern
asset). However, because assets are not currently cataloged against
meaningful criteria, such as functional and or non-functional
requirement, they are often not leveraged or reused effectively by
architects to help make more consistent architectural decisions.
The importance of Architecture in an SOA can not be overstated. Yet
when it comes to making architectural decisions in our software labs or
on engagements there is often no consistency, tractability or
accountability in terms of the decisions made. These architectural
decisions are driven by non-functional requirements (e.g. performance,
transactionality, tractability, scalability, etc).
Assets such as software patterns assets are often represented by many
assets such as a pattern specification and/or pattern
implementations and these assets are often hard to locate because of
this lack of consistent and meaningful cataloging. Also the knowledge
and use of a asset, such as an industry model asset is often local to a
particular practitioner or architect. This leads us to a situation both
in software development labs and more importantly on field engagement
where is no consistency way of consuming assets and leveraging lessons
learned to achieving architectural consistency traceability and
accountability.
Below is a meta model that shows how reusable assets can be used to
create a solution and goes into more detail and classification around a
particular type of reusable asset: the software pattern reusable asset.

Categories
: [ assets | content | context | pattern | patterns | reusable-assets | soa ]
Mar 19 2008, 06:50:27 PM EDT
Permalink
|
The value of applying the canonical modeling pattern in SOA
Today the IBM Information management people published another articles in a series called The Information perspective of SOA design. This article is titled The value of applying the canonical modeling pattern in SOA. Here is the abstract from that paper:
Discover the approach and value of canonical modeling in SOA design. See how the canonical data models can be aligned in SOA with canonical message models. In this fourth article in the "Information Aspect of SOA Related Design" series, learn about the concept's underlying data and message modeling regardless of the technology and tool choices. A future article in this series describes how various IBM® software products can be used to implement the concepts described here.
If you have any questions or suggestions, feel free to contact the authors of the articles in this series
Brian Byrne, John Kling, David McCarty, Guenter Sauter, Harald Smith, and Peter Worcester.
Categories
: [ canonical-modeling-pattern | pattern | patterns | reusable-assets | soa ]
Mar 17 2008, 10:35:32 AM EDT
Permalink
|
The requester side caching pattern implementation specification
developerWorks, SOA and Web services zone has just published the paper, on the requester side caching pattern implementation specification. Part 1 of this article series provided an overview of the requester side
caching (RSC) pattern specification, which can help you make and document design decisions
around the cache and policies. In this second installment in the series, examine the requester side caching pattern
implementation specification, a bridge between the human readable pattern
specification from the Gang of Four and the pattern implementation that can be used
in a development environment to automate the application of the pattern. From this
implementation specification, you have the freedom to create numerous
implementations.
Readers can find the article here: The requester side caching pattern implementation specification
Categories
: [ architecture | assets | cache | caching | patterns | performance | reusable-assets | soa | software-patterns ]
Mar 13 2008, 02:50:21 PM EDT
Permalink
|
The many buckets problem
As I mentioned in my previous post one of the problems that we run into with mapping context to content is the multi bucket problem. Consider the
following. At home I organize all
my clothes into buckets.
Each bucket has a
different item of clothing in it e.g. one bucket
contains all my shoes; another bucket contains all my pants; yet
another bucket
has all my jackets.
How let's imagine
for a moment that these are very sophisticated buckets.
These buckets have the ability to classify all of the items contained
within as
well as matching items together. For example my shoe bucket has the
ability to
classify all of my shoes by color and size as well as matching all of
my left
shoes with their corresponding right shoes. To top it off these buckets
have a shinny
panel on the front that gives me detailed information about any item in
the
bucket. So with my bucket of shoes I can see from the front panel all
the information
that i need about a certain shoe, such as when I bought it, how often I
have
worn it etc.
This
is all fine and
dandy, but I run into a problem when for
example I am invited out to a work related cocktail party. Since this
is my
first cocktail party I am unsure about what to wear and would like to
be able
to say to all my clothes buckets, please give me an ensemble to make me
look
good for this cocktail party. My clothes buckets I am sure will look
back
blackly at me, with the shinny digital displays, beeping nervously as I
start
to frantically root through one bucket after another to try and put
together
some vestige of an outfit that will make me presentable at the cocktail
party.
This simple story
serves to illustrate the problems inherent in any
repository based information management system. However, there are a
couple of
lessons to be learned from this simple analogy.
- No one
bucket can be responsible for management relationships between the
items in its bucket and the items in another bucket as the would
quickly be unmanageable for all but the smallest number of bucket items
- I could put all my clothes into one
bucket and call it a clothes bucket, however by treating all of clothes
as just generic clothes items I lose a lot of flexibility I has in the
multi bucket scenario.
Categories
: [ assets | content | context | pattern | patterns | reusable-assets | soa ]
Feb 25 2008, 08:56:45 AM EST
Permalink
|
Enabling asset consumability
I live a charmed life where my wife and I get to drive to work
together. The drive is about 40 minutes
from where we live to where we both
work in Cambridge Boston. Because
of all of this quality time we often
get to talk about what we are doing.
So one day last week I was trying
to explain to her some of my ideas
around mapping of 'context to content'. My
wife does not suffer my nonsense
easily and told me that this
statement made no sense to her.
In an effort to explain I gave her
a driving analogy since we were
already is an automobile.
Behind the wheel of a car I am
in a driver context and in
this context I need access to
driver related information and tooling such
as my speed, the condition of my
engine, weather conditions, a GPS device, road
conditions, including this particular
road's speed limit (i.e. the car's context) etc.
This is an example of 'context to content'.
I am in a driver context and I
need access to the driver relevant and related content.
As a Software developer or a consultant
on an engagement I am again in a
certain context. The context is now
given by the scope of the project
and the functional and non-functional
requirements for that particular
project. This context can also
be mapped to content to better
help me do my job. For example on insurance
project there may be a functional
requirement around creating
a claims system. Here the
functional requirement can be mapped to reusable software assets such
as
an insurance UML model of a
claim system. A nonfunctional
requirement on the other hand such
as a transactional claims system can maps to another type
of reusable software asset such as
a software pattern assets to help
me made consistent architectural
decisions.
The question now becomes how we do automate this context to content
mapping for developing software in a consistency manner to allow
better consumabitity of reusable asset
such as models and patterns?
The problem with implementing such
a vision is that we quickly run into
what I call the two bucket problem.
But more about that in my next
blog entry .
Categories
: [ asset-consumability | assets | consumability | content | context | pattern | patterns | reusable-assets | soa ]
Feb 21 2008, 09:58:41 AM EST
Permalink
|
The Information perspective of SOA design
Today the IBM Information management people announced that today the
first of 7 articles in a series called The
Information perspective of SOA design. This article was published on developerWorks.
The series explains the role of Information Management in SOA design
primarily to a technical audience (and in particular architects) and
focuses on three areas
- data semantics and in particular Business Glossary + Industry
Models
- data structure / canonical data model and in particular RDA +
Industry Models (+ RSA)
- data quality analysis and in particular Information Analyzer
The first article that is now published gives an overview of those
three areas, how they fit in SOA and Information as a Service etc.
Subsequent articles then introduce for each area first the pattern
(i.e. a product independent description of concepts, value, etc.) and
then the IBM technology. The remaining articles will be published in a
2 week schedule, i.e.
If you have any questions or suggestions, feel free to contact the
authors of the articles in this series
Brian Byrne, John Kling, David McCarty, Guenter Sauter, Harald Smith,
and Peter Worcester
PS. This is also the top story of the week on the Information
Management home page on developerWorks:
http://www.ibm.com/developerworks/db2
Categories
: [ information-management | pattern | soa ]
Jan 25 2008, 10:07:06 AM EST
Permalink
|
The requester side caching pattern implementation specification (part 2)
In this two part blog we will examine the requester side caching
pattern implementation specification. This implementation specification
is a bridge between the human readable pattern specification (e.g.
pattern specifications found in the book on Design pattern from the
Gang of Four) and a pattern implementation that can be used in a
development environment to automatic the application of the pattern.
From this implementation specification we have the freedom to create
numerous implementation.
In this second part we will also go into more detail on the
Java code
that a pattern implementation would need to generate if and when these
parameters are bound.
The transformation implemented for this pattern will extend or reuse
the UML to Java transformation.
Service
The AcceleratedService UML class created during
pattern instantiation expands to a Java class that
implements the Service interface. The constructor of this
class will take as argument a service of type
Service as argument. The class will also have a private
member, service of type Service that is
instantiated by the constructor to the 'slow' original service
implementation.
Another member of the AcceleratedService class is the
cache of type Map. The operations generated in
AcceleratedService are operations defined in IService.
In addition, we will have a method to retrieve the
cache, getCache(), that returns the cache implementation
object.
getItem
The getItem pattern parameter expands into an operation in the AcceleratedService
class that mirrors its
name and signature. This operation takes a 'key' as input and returns
an Item as output. The
implementation of this method is fully specified during the UML to Java
transformation phase. In the
fragment below, the method body contains the following variable values:
Item: the return type of the original getItem method.
ItemKey: the argument (that corresponds to the key value) of
the original getItem method in the service.
public Item getItem(ItemKey itemKey) { Item item = (Item)this.cache.get(itemKey); if (item == null) item = this.service.getItem(itemKey); return item; }
|
getItems
The getItems pattern parameter expands into an operation in the
AcceleratedService class that mirrors its
name and signature. The signature of this operation is arbitrary and
this can contain any number of
parameters and parameter types. The return type of this operation must
be a List JDK collection type.
The implementation of this method is fully specified during the UML to
Java transformation phase. In the
fragment below, the method body contains the following variable values:
List: the return type class.
arguments: the argument list of the original getItems method
in the service.
ItemKey: the key class/type of the Item class. This value is
identified in the argument list of the getItem() pattern parameter.
Item: the item class/type. This value is identified as the
return type of the getItem() pattern parameter.
. public List getItems(arguments) { List keys = this.getItemKeys(arguments); Iterator iterator = keys.iterator(); List list = new ArrayList(); while (iterator.hasNext()) { ItemKey key = (ItemKey) iterator.next(); Item item = this.getItem(key); list.add(item); } return list; }
|
getItemKeys
The getItemKeys pattern parameter expands into an operation in the
AcceleratedService class that
mirrors its name and signature. The signature of this operation is
arbitrary and this can contain any
number of parameters and parameter types. The return type of this
operation must be a List JDK
collection type. The implementation of this method is fully specified
during the UML to Java
transformation phase. In the fragment below, the method body contains
the following variable values:
List: the return type class.
arguments: the argument list of the original getItems method
in the service.
public List getItems(arguments) { List keys = this.service.getItemKeys(arguments); return keys; }
|
Users are expected to properly select Qualifiers of getItemKeys, it
is recommended that 'Ordered'
Qualifier is selected while others de-selecte d, in order to generate a
method that expresses multiplicity of
return parameter in term of 'java.util.List'.
changeItemKey Parameter
The changeItemKey pattern parameter expands into a specific argument
(corresponding the key) of an
operation changeItem in the AcceleratedService class. The changeItem
operation mirrors the changeItem
method declared in the Service interface. The implementation of this
method is fully specified during the
UML to Java transformation phase. The method fragment below contains
the following variables:
Arguments1: zero or more arguments of the original changeItem
method that precede the changeItemKey
argument.
changeItemKey: the argument that corresponds to the
changeItemKey parameter.
Arguments2: zero or more arguments of the original changeItem
method that follow the changeItemKey
argument.
public changeItem(Arguments1, changeItemKey, Arguments2) { this.service.changeItem(Arguments1, changeItemKey, Arguments2); this.cache.remove(changeItemKey); }
|
Clustering Parameter
As explained earlier, the clustering parameter effects the kind of
cache implementation used by the
AcceleratedService. Based on the value of clustering, the
implementation of Map will be either an inmemory
cache, i.e., class Cache if clustering is false, or class
DistributedCache if clustering is true.
If clustering is true, the getCache() of the AcceleratedService
will look like:
public Map getCache() { com.ibm.websphere.cache.DistributedMap map = null; try { javax.naming.InitialContext ic = new javax.naming.InitialContext(); Object obj = ic.lookup("services/cache/EmployeeCache"); if (obj != null) { map = (com.ibm.websphere.cache.DistributedMap) javax.rmi.PortableRemoteObject .narrow(obj, com.ibm.websphere.cache.DistributedMap.class); System.out.println("successfully retrieved a map"); } } catch (Exception e) { System.out.println("failed to retrieve a map"); e.printStackTrace(); } return map; }
|
If clustering is false, a class, Cache that
implements the Map interface is generated with an
prepackaged
code template. The getCache() of the AcceleratedService
will look like:
public Map getCache() { Map map = new Cache(size, timeout); return map; }
|
Cache size Parameter
If clustering is true, the cacheSize parameter
expands into the cacheSize value in the properties file
used
by the underlying WebSphere caching implementation
(cacheinstances.properties). If clustering is false,
the cacheSize parameter expands into the workingSetSize value in the
Custom cache implementation,
InMemoryCache.
timeOut Parameter
If clustering is true, the cacheSize parameter expands into the
cacheSize value in the properties file used
by the underlying WebSphere caching implementation
(cacheinstances.properties).
Armed with the pattern implementation specification a pattern
implementation can now be authored
using the RSA pattern engine. The output of this authoring process is
an eclipse plug-in that can be used
in RSA to automate the application of the requester side caching (RSC)
pattern to a model.
The approach
to using this pattern follows the model-driven development approach of
instantiating the pattern
parameters to specific UML model elements of the service or interface.
Once the pattern parameters are
bound, additional UML elements such as the cache and the cache-aware
service proxy are automatically
created. A UML-to-Java transformation, invoked on the resulting model,
will generate the resulting Java
implementation artifacts. This implementation also allows the user to
chose between a custom (in
memory) user-defined cache or the WebSphere Platform dynamic cache. If
the user chooses the latter,
the pattern transformation will automatically generate configuration
files to be used with dynacache. To
see this pattern in action in RSA the reader is referred to the follow
article that details how to use the
RSA
requester side caching (RSC) pattern implementation.
The read can also find a detailed study of the
life cycle requester-side caching (RSC) pattern.
Categories
: [ cache | pattern | performance | soa ]
Dec 07 2007, 01:26:32 PM EST
Permalink
|
The requester side caching pattern implementation specification (part 1)
In this two part blog we will examine the requester side caching
pattern implementation specification. This implementation specification
is a bridge between the human readable pattern specification (e.g.
pattern specifications found in the book on Design pattern from the
Gang of Four) and a pattern implementation that can be used in a
development environment to automatic the application of the pattern.
From this implementation specification we have the freedom to create
numerous implementation.
In this first part we will focus of the pattern parameters that need
to be identified and the use cases for binding these pattern
parameters. In part two we will go into more detail on the lava code
that a pattern implementation would need to generate if and when these
parameters are bound.
Introduction
In a previous article we have detailed the
pattern specification of the requester side caching pattern.
A number of implementations of the requester side caching (RSC) pattern
can now be created based
upon the pattern specification. This pattern could be implemented by
hand coding but typically any
implementation should provide some level of automation for applying the
pattern. The follow three
examples showcase different ways that this pattern specification can be
implemented:
- A manual implementation (hand coding) that uniquely tailors the
design and the implementation for
each situation.
- An executable program that automates the application of the
pattern in the context of a larger
model-driven based development project (e.g., in the context of IBM's
Rational Software Architect).
- An aspect-based implementation: aspect-oriented programming can
be used to implement the
caching as a cross cutting concern and can be a simple and useful
mechanism for developing
applications. This approach would work if aspect-oriented expertise is
already available in the
organization.
However, before authoring a pattern, a pattern implementation
specification must first be created.
Background
The requester side caching pattern is one of mediating the
interaction between one or more clients and
one or more data providers. The mediation consists of holding data
items that have been produced by the
provider(s) and using them to support requests from the client(s). The
purpose of the mediation is to
speed up and/or reduce the cost of access to the data. This is a very
general pattern that has many
variations to meet different design goals and issues. The pattern
should make it easy for a developer to
make design decisions and also to provide a basis for documentation
about design decisions made around
the cache and policies.
There are a number of issues that must be addressed in any pattern
variation. They are:
- Style of access (visible to the client; hidden from the client)
- Item identification (client provided domain key; explicit, well
defined key space; computed
from data items etc.)
- Populating the cache with data items (on cache misses; on cache
misses but with some
anticipatory population; fully pre-populated)
- Cache capacity and capacity management (unlimited with respect to
the set of data items;
easily exceeds to working set of the clients; marginal with respect to
the working set of
clients)
- Tolerance for data staleness (must be exact; can be slightly out
of date; accuracy of the data
is a performance concern, not a logical concern)
- Management of data volatility (unchanging data; rarely changing
data; rapidly changing data)
- Topology of deployment (single instance; multiple coordinated
instances; multiple
independent instances)
The requester side caching pattern will facilitate accelerating
service operations via caching. The
cache used can be an in-memory, custom cache provided by the pattern
itself or the WebSphere
runtime's caching mechanism (i.e., Dynacache). The runtime cache can be
in memory or
distributed. One of the goals of this pattern is to make it easy for
the developer to
programmatically use our runtime caching mechanisms.
This pattern currently assumes that the service operations exposed
to the requester include
methods for
- retrieving objects from the service provider based on a selection
criteria,
getItems(criteria)
- retrieving the keys that uniquely identify the objects based on
selection criteria,
getItemKeys(criteria)
- retrieving a single object based on a key value,
getItem(key)
- making changes to objects based on key value,
changeItem(...,
key, ...)
If operations such as getItemKeys(criteria) and changeItem(key,
...) are not available, one
proposal is to have some kind of a facade that will sit between this
caching pattern and the
service interface where these operations will be inserted.
References
WebSphere Dynamic Cache: Improving J2EE application performance, IBM
Systems
Journal, Vol 43, No 2, 2004.
Requirements
The following is a list of design requirement for the requester side
caching pattern:
- The implementation will generate UML model elements as a result
of applying the pattern.
- The generated source code should be error free and capable of
being executed. Exceptions
may be thrown if code marked up with a mandatory 'TODO' has not been
updated
accordingly by the user.
- This pattern must allow for at least two choices in the caching
implementation.
- The pattern should also allow for cache configurations that
include cache population,
management of data volatility, cache capacity management and item
identification.
- The pattern should make it easy for a developer to make design
decisions and also to provide
a basis for documentation about design decisions made around the cache
and policies. The
transformation is also constrained by the caching implementations
provided by the
WebSphere platform, but we will also provide custom caching skeleton
code.
Design
Constraints
The design and implementation of this pattern will be constrained by
the pattern and
transformation authoring functions of Rational Software Architect 6.x
and 7.x.
Design
Artifacts
Pattern Name
Requester side cache
Overview Diagram
The pattern UI will represent this pattern with the following
overview diagram.
Group
The pattern will be defined in the following group:
SOA Patterns
Pattern Type
An instance of this pattern is of the UML2 element type
Collaboration.
Short Description
The Requester side caching pattern provides an accelerated
implementation of operations that
retrieve information from a service provider. The pattern provides
options for cache
implementations and caching policies.
Search Keywords
The following keywords will be defined for the pattern to assist the
client with locating the
desired pattern:
- SOA Patterns
- Caching
- Service requester
Pattern Parameters
Service
- Short Description: The interface/class that contains the
operation that we want to accelerate
- Type: Interface/Class
- Multiplicity: 1
- Parameter Dependency: none
- Default Value: none
- Keyword: none
getItem
- Short Description: The operation on the service
interface/class that is used to get a single item given an item key.
- Type: Operation
- Multiplicity: 1
- Parameter Dependency: this parameter depends on Service
- Default Value: none
- Keyword: none
getItemKeys
- Short Description: The operation on the service
interface/class that is used to get keys given
a set of criteria. Note that this operation is essential to be able to
implement the accelerated
version of the service.
- Type: Operation
- Multiplicity: 1
- Parameter Dependency: this parameter depends on Service
- Default Value: none
- Keyword: none
getItems
- Short Description: Short Description: The operation on the
service interface/class that is used to get items given
a set of criteria.
- Type: Operation
- Multiplicity: 1
- Parameter Dependency:depends on Service, getItemKeys and
getItem
- Default Value: none
- Keyword: none
changeItemKey
- Short Description: The parameter in the change item
operation that corresponds to the key
of the item.
- Type: Parameter
- Multiplicity: 0..* (if change item is specified then this
parameter is required)
- Parameter Dependency: none
- Default Value: none
- Keyword: none
Cache Size
- Short Description: The size of the cache. The size of the
cache can be specified as an integer
or the character * to denote a unlimited cache.
- Type: LiteralInteger
- Multiplicity: 0..1
- Parameter Dependency: none
- Default Value: 500
- Keyword: none
Clustering
- Short Description: Boolean value: true implies the
underlying topology is clustered, false
implies the underlying topology is not clustered.
- Type: LiteralBoolean
- Multiplicity: 1
- Parameter Dependency: none
- Default Value: true
- Keyword: none
timeOut
- Short Description: The time out value (measured in milli
seconds) after which an item has to
be evicted from cache. If this parameter is not specified a time out
eviction policy is not used.
- Type: LitrealInteger
- Multiplicity: 0..1
- Parameter Dependency: none
- Default Value: -1
- Keyword: none
The derived parameters from the above listed pattern parameters are:
ItemKey class that can be derived as
the argument of the getItem operation, Item class that can be derived
from the return parameter of the
getItem operation, changeItem() method that can be inferred from the
changeItemKey, i.e., its owning
operation.
Use
cases
The actions denoted below occur only at the time the argument is
supplied to the pattern parameter.
After that, the argument may change irrespective of the constraints of
the pattern definition.
Pattern Interactions
Service Parameter
Supply an argument to the parameter
- Add the 'Accelerated' keyword to the argument if the keyword does
not exist.
- Create a new class in the same package as the argument.
- The name of the generated class is going to be the name of the
argument prepended with
the string 'Accelerated'.
- The generated class will realize the argument if the parameter is
an interface.
- The generated class will provide implementations for all of the
arguments operations if
the parameter is an interface. If the parameter is a class, the
generated class simply
inherits the operations.
- The generated class will provide implementations for the
constructor (where Service is
the name of the argument)
AcceleratedService ( service : Service )
- The generated class will have a directed private association to
the argument called
service
- The generated class will have a have a public getter method for
the instance member
service.
- The generated class will have a directed private association to a
Map interface.
- The generated class will have a have a public getter method for
the instance member
Map.
- If the clustering parameter is set to false, the constructor
creates a cache object of type
Cache that is an implementation of the
Map interface
which supports get, put, remove
and clear operations.
- If the clustering parameter is set to true, the constructor (
AcceleratedService)
gets a cache
object of type DistributedCache that is an implementation of the Map
interface. The
operations of this class are again the same as declared in Map.
Supply the default argument to the parameter
Remove an argument from the parameter
- Undo what we did before, in particular remove the newly created
class and the associated to the
IService parameter.
However do not remove the Map
interface if it is being referenced by any
other modeling element
Replace the parameter argument
- Default to the framework semantics of removing the current
argument and supplying the new
argument.
Pattern reapply
- Default to the framework semantics of removing the current
argument and supplying the new
argument.
getItem Parameter
- This argument is only referenced during the UML to Java code
transformation.
getItems Parameter
- This argument is only referenced during the UML to Java code
transformation.
getItemKeys Parameter
- This argument is only referenced during the UML to Java code
transformation.
Change Item Key Parameter
- This argument is only referenced during the UML to Java code
transformation.
Cache size Parameter
- This argument is only referenced during the UML to Java code
transformation.
Clustering Parameter
- This argument is only referenced during the UML to Java code
transformation.
timeOut Parameter
- This argument is only referenced during the UML to Java code
transformation.
The derived parameters from the above listed pattern parameters are:
ItemKey class that can be
derived as
the argument of the getItem operation,
Item class that can be
derived
from the return parameter of the
getItem operation, changeItem() method that can be
inferred from the
changeItemKey, i.e., its
owning
operation.
Categories
: [ cache | performance | soa ]
Nov 27 2007, 09:03:59 AM EST
Permalink
|
|
 |
|