Skip to content

Commit d63c37b

Browse files
authored
docs: architecture (#331)
1 parent 06853db commit d63c37b

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

aws_advanced_python_wrapper/host_list_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class RdsHostListProvider(DynamicHostListProvider, HostListProvider):
144144
# cluster IDs so that connections to the same clusters can share topology info.
145145
_cluster_ids_to_update: CacheMap[str, str] = CacheMap()
146146

147-
_executor: ClassVar[Executor] = ThreadPoolExecutor(thread_name_prefix="AuroraHostListProviderExecutor")
147+
_executor: ClassVar[Executor] = ThreadPoolExecutor(thread_name_prefix="RdsHostListProviderExecutor")
148148

149149
def __init__(self, host_list_provider_service: HostListProviderService, props: Properties):
150150
self._host_list_provider_service: HostListProviderService = host_list_provider_service
@@ -474,7 +474,7 @@ def identify_connection(self, connection: Optional[Connection]) -> Optional[Host
474474
:return: a :py:class:`HostInfo` object containing host information for the given connection.
475475
"""
476476
if connection is None:
477-
raise AwsWrapperError(Messages.get("AuroraHostListProvider.ErrorIdentifyConnection"))
477+
raise AwsWrapperError(Messages.get("RdsHostListProvider.ErrorIdentifyConnection"))
478478

479479
driver_dialect = self._host_list_provider_service.driver_dialect
480480
try:

aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# limitations under the License.
1515

1616

17-
AuroraHostListPlugin.ProviderAlreadySet=[AuroraHostListPlugin]Another dynamic host list provider has already been set: {}.
18-
1917
AuroraPgDialect.HasExtensionsTrue=[AuroraPgDialect] has_extensions: True
2018
AuroraPgDialect.HasTopologyTrue=[AuroraPgDialect] has_topology: True
2119

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Architecture
2+
3+
<div style="center"><img src="../images/architecture_user_application.png" alt="diagram on how plugin manager is integrated with the user application"/></div>
4+
5+
The AWS Advanced Python Driver contains 4 main components:
6+
7+
1. The [connection plugin manager](./PluginManager.md)
8+
2. The [loadable and extensible plugins](./LoadablePlugins.md)
9+
3. The [plugin service](./PluginService.md)
10+
4. The host list providers
11+
12+
The connection plugin manager handles all the loaded or registered plugins and sends the Python method call to be executed by all plugins [**subscribed**](./LoadablePlugins.md#subscribed-methods) to that method.
13+
14+
During execution, plugins may utilize the plugin service to help its execution by retrieving or updating:
15+
16+
- the current connection
17+
- the hosts information or topology of the database
18+
19+
> **NOTES**:
20+
>
21+
> - Each Python Connection object has its own instances of:
22+
> - plugin manager
23+
> - plugin service
24+
> - loaded plugin classes
25+
> - Multiple Python Connection objects opened to the same database server will have separate sets of instances mentioned above.
26+
> - All plugins share the same instance of plugin service and the same instance of host list provider.
202 KB
Loading

0 commit comments

Comments
 (0)