Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws_advanced_python_wrapper/host_list_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class RdsHostListProvider(DynamicHostListProvider, HostListProvider):
# cluster IDs so that connections to the same clusters can share topology info.
_cluster_ids_to_update: CacheMap[str, str] = CacheMap()

_executor: ClassVar[Executor] = ThreadPoolExecutor(thread_name_prefix="AuroraHostListProviderExecutor")
_executor: ClassVar[Executor] = ThreadPoolExecutor(thread_name_prefix="RdsHostListProviderExecutor")

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

driver_dialect = self._host_list_provider_service.driver_dialect
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# limitations under the License.


AuroraHostListPlugin.ProviderAlreadySet=[AuroraHostListPlugin]Another dynamic host list provider has already been set: {}.

AuroraPgDialect.HasExtensionsTrue=[AuroraPgDialect] has_extensions: True
AuroraPgDialect.HasTopologyTrue=[AuroraPgDialect] has_topology: True

Expand Down
26 changes: 26 additions & 0 deletions docs/development-guide/Architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Architecture

<div style="center"><img src="../images/architecture_user_application.png" alt="diagram on how plugin manager is integrated with the user application"/></div>

The AWS Advanced Python Driver contains 4 main components:

1. The [connection plugin manager](./PluginManager.md)
2. The [loadable and extensible plugins](./LoadablePlugins.md)
3. The [plugin service](./PluginService.md)
4. The host list providers

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.

During execution, plugins may utilize the plugin service to help its execution by retrieving or updating:

- the current connection
- the hosts information or topology of the database

> **NOTES**:
>
> - Each Python Connection object has its own instances of:
> - plugin manager
> - plugin service
> - loaded plugin classes
> - Multiple Python Connection objects opened to the same database server will have separate sets of instances mentioned above.
> - All plugins share the same instance of plugin service and the same instance of host list provider.
Binary file added docs/images/architecture_user_application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.