diff --git a/aws_advanced_python_wrapper/host_list_provider.py b/aws_advanced_python_wrapper/host_list_provider.py index d6fec74e..f6b94d89 100644 --- a/aws_advanced_python_wrapper/host_list_provider.py +++ b/aws_advanced_python_wrapper/host_list_provider.py @@ -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 @@ -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: diff --git a/aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties b/aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties index cda7d59c..6cc4c0e8 100644 --- a/aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties +++ b/aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties @@ -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 diff --git a/docs/development-guide/Architecture.md b/docs/development-guide/Architecture.md new file mode 100644 index 00000000..055e78c1 --- /dev/null +++ b/docs/development-guide/Architecture.md @@ -0,0 +1,26 @@ +# Architecture + +
diagram on how plugin manager is integrated with the user application
+ +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. \ No newline at end of file diff --git a/docs/images/architecture_user_application.png b/docs/images/architecture_user_application.png new file mode 100644 index 00000000..1c417a39 Binary files /dev/null and b/docs/images/architecture_user_application.png differ