1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<title>Proposal for Service Discovery</title>
</head>
<body bgcolor="white">
<div align="center">
<h1>Proposal for <em>Service Discovery</em> Package</h1>
</div>
<h3>(0) Rationale</h3>
<p>The Discovery Component is about discovering, or finding,
implementations for pluggable interfaces.
It provides facilities intantiating classes in general,
and for lifecycle management of singleton (factory) classes.
</p>
<p>
Fundamentally, Discovery locates classes that implement a given Java interface.
The discovery pattern, though not necessarily this package,
is used in many projects including JAXP (SaxParserFactory and others)
and commons-logging (LogFactory).
By extracting this pattern, other projects can (re)use it
and take advantage of improvements to the pattern as Discovery evolves.
</p>
<p>
Discovery improves over previous implementations
by establishing facilities for working within managed environments.
These allow configuration and property overrides without appealing
to the global System properties (which are scoped across an entire JVM).
</p>
<h3>(1) Scope of the Package</h3>
<p>
This is not indended to be a replacement to be used strictly by the user, but rather
a replacement to be used directly by projects. Use by the user is also reasonable,
but limited due to 'keeping this simple'. In particular, there is no configuration
for this discovery service, it relies soley on usage patterns.
</p>
<p>
Given a java.lang.Class parameter 'package.Class' that represents a
fundamental service as either an interface, an abstract class
(or even a regular class), find an implementation of that class:
<ul>
<li>Look for system property named 'package.Class', the value of which is the
name of an implementation.</li>
<li>Look for a 'local' property named 'package.Class'...</li>
<li>Attempt JDK 1.3+ style discovery</li>
<li>Attempt to load a default implementation</li>
</ul>
In all cases, verify that the discovered implementation <b>implements</b>
'package.Class'.
</p>
<p>
The package should :
<ul>
<li>Have an API which should be as simple to use as possible</li>
<li>Be based on usage patterns, not specific configuration file</li>
<li>Represent proper discovery & class-loading principles</li>
<li>Be reasonably portable across JDK levels (1.1.8+?)</li>
</ul>
</p>
<h3>(1.5) Interaction With Other Packages</h3>
<p><em>Services</em> relies on:
</p>
<ul>
<li>Java Development Kit (Version 1.1 or later)</li>
<li>[by design] Nothing Else, particularly anything that would be classified as a 'service'.</li>
</ul>
<h3>(2) Required Jakarta-Commons Resources</h3>
<ul>
<li>CVS Repository - New directory <code>discovery</code> in the
<code>jakarta-commons-sandbox</code> CVS repository.</li>
<li>Initial Committers - The list is provided below. </li>
<li>Mailing List - Discussions will take place on the general
<em>dev@commons.apache.org</em> mailing list. To help list
subscribers identify messages of interest, it is suggested that the
message subject of messages about this component be prefixed with
[discovery].</li>
<li>Bugzilla - New component "discovery" under the "Commons" product
category, with appropriate version identifiers as needed.</li>
<li>Jyve FAQ - New category "discovery" (when available).</li>
</ul>
<h3>(4) Initial Committers</h3>
<p>The initial committers on the Service Discovery component shall be:</p>
<ul>
<li>Richard A. Sitze</li>
<li>Costin Manoloche</li>
<li>Craig R. McClanahan</li>
</ul>
</body>
</html>
|