Skip to content

Commit 7c80e46

Browse files
committed
Change wording in Apache Geode API Extensions chapter of the Reference Documentation on the purpose of the module and the Apache Geaode API extensions.
1 parent 0b1fa7d commit 7c80e46

File tree

1 file changed

+15
-46
lines changed

1 file changed

+15
-46
lines changed

spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,21 @@
66

77

88
The Spring Boot for {geode-name} (SBDG) project includes the `org.springframework.geode:apache-geode-extensions` module
9-
to make using {geode-name} {apache-geode-javadoc}[APIs] tolerable and useful. While this module is relatively new, it
10-
contains several API extensions already.
11-
12-
{geode-name}'s {apache-geode-javadoc}[API] is quite convoluted with many design problems:
13-
14-
1. Non-intuitive, complex interfaces that contradict industry standard terms.
15-
(e.g. https://javadoc.io/static/javax.cache/cache-api/1.1.1/javax/cache/Cache.html[`Cache`]
16-
vs. {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`]).
17-
2. APIs with an excessive footprint and no sensible https://en.wikipedia.org/wiki/Abstract_data_type[ADTs] resulting in
18-
too many overloaded methods with loaded method signatures (e.g. {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`]).
19-
3. Lingering deprecations causing excess baggage.
20-
4. Use of public fields exposing internal state, violating encapsulation, making it difficult to uphold invariants.
21-
5. Useful functionality hidden behind so called "internal" APIs that should be public.
22-
6. Utility/Helper classes containing functionality that should be part of the types on which the Utility class operates
23-
(e.g. {apache-geode-javadoc}/org/apache/geode/cache/partition/PartitionRegionHelper.html[`PartitionRegionHelper`]).
24-
7. Incorrect use of _Checked_ `Exceptions`
25-
(e.g. {apache-geode-javadoc}/org/apache/geode/cache/IncompatibleVersionException.html[`IncompatibleVersionException`]).
26-
8. Inconsistent behavior across different methods of configuration: API vs. `cache.xml` vs. _Cluster Configuration_
27-
using _Gfsh_.
28-
9. APIs closed for modification, yet offer no option for extension thereby violating the
29-
https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle[_Open/Closed Principle_].
30-
10. In general, poor _Separation of Concerns_ (e.g. `Region`), violating many of the
31-
https://en.wikipedia.org/wiki/SOLID[SOLID] principles.
32-
11. Components (e.g. `Pool`) that are difficult to test properly: {geode-name} often incorrectly refers to implementation
33-
classes rather than interfaces leading to `ClassCastExceptions` and violation of the _Program to Interfaces_ principle.
34-
12. Excessive use of `static` initializer blocks making {geode-name} difficult to test.
35-
13. Untimely shutdown and release of resources that run interference when writing _Integration Tests_.
36-
37-
This list goes on making {geode-name}'s APIs difficult and confusing to use at times, especially without prior knowledge
38-
or experience. Users very often get this wrong and it is the main reason why Spring's APIs for {geode-name} are so
39-
invaluable; they can help you do the right thing!
40-
41-
Let's consider a few examples.
42-
43-
The one and only cache implementation (`GemFireCacheImpl`) implements both the `ClientCache` and `Cache` interfaces.
44-
A `ClientCache` instance is created by client applications to access and persist data in a {geode-name} cluster. On the
45-
contrary, a _peer_ `Cache` instance is created by server-side applications serving as peer members of the {geode-name}
46-
cluster and distributed system to manage data. Both incarnations result in an instance of `GemFireCacheImpl`, yet a
47-
cache cannot be both a client and a peer. But, you would never know this by introspecting the cache instance.
48-
49-
The {apache-geode-javadoc}/org/apache/geode/Delta.html[`Delta`] interface, {apache-geode-javadoc}/org/apache/geode/Delta.html#hasDelta--[`hasDelta()`]
50-
method, is another point of confusion. If there is no delta, why send the object in its entirety? Presumably there are
51-
no changes. Of course, there is a reason but it is not immediately apparent why given the lack of documentation.
52-
53-
Spring in general, and SBDG in particular, shield users from design problems as well as changes to {geode-name}'s APIs
54-
that could adversely affect your applications when integrating with {geode-name}. Spring's APIs provide a layer of
9+
to make the use of {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more
10+
effective. While this module is relatively new, it contains several, necessary API extensions already.
11+
12+
The {geode-name} {apache-geode-javadoc}[API] is quite complex and difficult to use properly, especially without prior
13+
knowledge or experience to do so. Users very often get things wrong and is the main reason why Spring's APIs
14+
for {geode-name} are invaluable; they lead users to do the right thing, first and foremost, to begin with!
15+
16+
However, this module and its extensions do not simply exist to only help users use {geode-name}'s APIs more effectively.
17+
In fact, with Spring's abstractions, it should not be necessary to use {geode-name} APIs at all, e.g. like when using
18+
the Spring Cache Abstraction for caching or the the Spring Data Repository abstraction for DAO developement. This module
19+
exists and is necessary primarily because it enables Spring for {geode-name} in many capacities do what it needs to do
20+
along with working around the complexities and limitations of {geode-name} APIs in a Spring and application context.
21+
22+
In general, Spring shields users from design problems as well as changes in 3rd party library APIs, which could
23+
adversely affect your Spring applications when integrating with these libraries. Spring's APIs provide a layer of
5524
indirection along with enhanced capabilities (e.g. Exception translation).
5625

5726
TIP: Spring Data for {geode-name} (SDG) also {spring-data-geode-docs-html}/#apis[offers] some relief when using

0 commit comments

Comments
 (0)