Work towards #56: Splitting up the README
I did the job and splitted up the readme, hopefully everything was splitted correctly...
This commit is contained in:
27
service-locator/index.md
Normal file
27
service-locator/index.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
layout: pattern
|
||||
title: Service Locator
|
||||
folder: service-locator
|
||||
categories: pattern_cat
|
||||
tags: pattern_tag
|
||||
---
|
||||
|
||||
**Intent:** Encapsulate the processes involved in obtaining a service with a
|
||||
strong abstraction layer.
|
||||
|
||||

|
||||
|
||||
**Applicability:** The service locator pattern is applicable whenever we want
|
||||
to locate/fetch various services using JNDI which, typically, is a redundant
|
||||
and expensive lookup. The service Locator pattern addresses this expensive
|
||||
lookup by making use of caching techniques ie. for the very first time a
|
||||
particular service is requested, the service Locator looks up in JNDI, fetched
|
||||
the relevant service and then finally caches this service object. Now, further
|
||||
lookups of the same service via Service Locator is done in its cache which
|
||||
improves the performance of application to great extent.
|
||||
|
||||
**Typical Use Case:**
|
||||
|
||||
* when network hits are expensive and time consuming
|
||||
* lookups of services are done quite frequently
|
||||
* large number of services are being used
|
Reference in New Issue
Block a user