You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+10-3
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,12 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
32
32
-[Vis Builder] Rename wizard to visBuilder in i18n id and formatted message id ([#2635](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2635))
33
33
-[Vis Builder] Rename wizard to visBuilder in class name, type name and function name ([#2639](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2639))
34
34
-[Vis Builder] Rename wizard on save modal and visualization table ([#2645](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2645))
35
+
-[Vis Builder] Adds functional tests to CI ([#2728](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2728))
35
36
-[Vis Builder] Enable VisBuilder by default ([#2725](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2725))
36
37
- Change save object type, wizard id and name to visBuilder #2673 ([#2673](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2673))
37
-
- Add extension point in saved object management to register namespaces and show filter ([#2656](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2656))
38
38
-[Multi DataSource] Update MD data source documentation link ([#2693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2693))
39
+
-[Save Object Aggregation View] Add extension point in saved object management to register namespaces and show filter ([#2656](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2656))
40
+
-[Save Object Aggregation View] Fix for export all after scroll count response changed in PR#2656 ([#2696](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2696))
39
41
40
42
### 🐛 Bug Fixes
41
43
@@ -51,7 +53,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
51
53
-[Multi DataSource] Address UX comments on index pattern management stack ([#2611](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2611))
52
54
-[Multi DataSource] Apply get indices error handling in step index pattern ([#2652](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2652))
53
55
-[Vis Builder] Last Updated Timestamp for visbuilder savedobject is getting Generated ([#2628](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2628))
54
-
- Removed Leftover X Pack references ([#2638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2638))
56
+
- Removed Leftover X Pack references ([#2638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2638))
Copy file name to clipboardexpand all lines: docs/multi-datasource/client_management_design.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,8 @@ This design is part of the OpenSearch Dashboards multi data source project [[RFC
39
39
40
40
### 4.0 Answer some critical design questions
41
41
42
-
**1.****How to set up connection(clients) for different datasources?**
43
-
Similar to how current OpenSearch Dashboards talks to default OS by creating opensearch node.js client using [opensearch-js](https://github.com/opensearch-project/opensearch-js) library, for datasources we also create clients for each. Critical params that differentiate data sources are `url` and `auth`
42
+
**1.****How to set up connection(clients) for different data sources?**
43
+
Similar to how current OpenSearch Dashboards talks to default OpenSearch by creating a client using [opensearch-js](https://github.com/opensearch-project/opensearch-js) library, for data sources we also create clients for each connection. Critical params that differentiate data sources are `url` and `auth`
**2. How to expose datasource clients to callers through clean interfaces?**
62
-
We create a `data source service`. Similar to existing `opensearch service` in core, which provides client of default OS cluster. This new service will be dedicated to provide clients for data sources. Following the same paradigm we can register this new service to `CoreStart`, `CoreRouteHandlerContext` , in order to expose data source client to plugins and modules. The interface is exposed from new service, and thus it doesn’t mess up with any existing services, and keeps the interface clean.
62
+
We create a `data source service`. Similar to existing `opensearch service` in core, which provides client of default OpenSearch cluster. This new service will be dedicated to provide clients for data sources. Following the same paradigm we can register this new service to `CoreStart`, `CoreRouteHandlerContext` , in order to expose data source client to plugins and modules. The interface is exposed from new service, and thus it doesn’t mess up with any existing services, and keeps the interface clean.
63
63
64
64
```
65
65
*// Existing*
@@ -77,14 +77,14 @@ The context is that user can only turn on/off multiple datasource feature by upd
77
77
78
78
**4.How to manage multiple clients/connection efficiently, and not consume all the memory?**
79
79
80
-
- For datasources with different endpoint, user client Pooling (E.g. LRU cache)
80
+
- For data sources with different endpoint, user client Pooling (E.g. LRU cache)
81
81
- For data sources with same endpoint, but different user, use connection pooling strategy (child client) provided by opensearch-js.
82
82
83
83
**5.Where should we implement the core logic?**
84
84
Current `opensearch service` exists in core. The module we'll implement has similarity function wise, but we choose to implement `data source service` in plugin along with `crypto` service for the following reasons.
85
85
86
-
1. Data source is a feature that can be turned on or off. Plugin is born for such plugable use case.
87
-
2. We don't mess up with OpenSearch Dashboards core, since this is an experimental feature, the potential risk of breaking existing behavior will be lower if we use plugin. Worst case, user could just uninstall the plugin.
86
+
1. Data source is a feature that can be turned on or off. Plugin is born for such pluggable use case.
87
+
2. We don't mess up with OpenSearch Dashboards core, since this is an experimental feature, the potential risk of breaking existing behavior will be lowered if we use plugin. Worst case, user could just uninstall the plugin.
88
88
3. Complexity wise, it's about the same amount of work.
89
89
90
90
### 4.1 Data Source Plugin
@@ -130,14 +130,14 @@ We need to configure the data source client by either creating a new one, or loo
130
130
}
131
131
```
132
132
133
-
- Get root client: Look up client Pool by **endpoint**, return client if existed. If misses, we create new client instance and load into pool. At this step, the client won't have any auth info.
133
+
- Get root client: Look up the client pool by **endpoint** and return the client if it exists. If a client was not found, a new client instance is created and loaded into pool. At this step, the client won't have any auth info.
134
134
135
135
- Get credentials: Call crypto service utilities to **decrypt** user credentials from `DataSource` Object.
136
-
- Assemble the actual query client: With auth info and root client, we’ll leverage the openearch-js connection pooling strategy to create the actual query client from root client by `client.child()`.
136
+
- Assemble the actual query client: With auth info and root client, we’ll leverage the `opensearch-js` connection pooling strategy to create the actual query client from root client by `client.child()`.
137
137
138
138
#### 4.2.1 Legacy Client
139
139
140
-
OpenSearch Dashboards is forked from Kibana 7.10. At the time of the fork happened, there are 2 types of client used in the codebase. One is the new client, which later was migrated as `opensearhc-js`, the other one is the legacy client which is `elasticsearc-js`. Legacy clients are still used many critical features, such as visualization, index pattern management, along with new client.
140
+
OpenSearch Dashboards had two types of clients available for use when created. One was the "new client" which has since been separated into `opensearch-js`, and the other was the legacy client named `elasticsearch-js`. Legacy clients are still used by some core features like visualization and index pattern management.
141
141
142
142
```ts
143
143
// legacy client
@@ -174,7 +174,7 @@ This is for plugin to access data source client via request handler. For example
174
174
175
175
### 4.4 Refactor data plugin search module to call core API to get datasource client
176
176
177
-
`Searchstrategy` is the low level API of data plugin search module. It retrieve clients and query OpenSearch. It needs to be refactored to switch between default client and datasource client, depending on whether a request is send to datasource or not.
177
+
`Searchstrategy` is the low level API of data plugin search module. It retrieves clients and queries OpenSearch. It needs to be refactored to switch between the default client and the datasource client, depending on whether or not a request is sent to the datasource.
178
178
179
179
Currently default client is retrieved by search module of data plugin to interact with OpenSearch by this API call. Ref: [opensearch-search-strategy.ts](https://github.com/opensearch-project/opensearch-dashboards/blob/e3b34df1dea59a253884f6da4e49c3e717d362c9/src/plugins/data/server/search/opensearch_search/opensearch_search_strategy.ts#L75)
Similarly we’ll have the following for datasource use case. `AsCurrentUser`is something doesn’t make sense for datasource, because it’s always the “current” user credential defined in the “datasource”, that we are using to create the client, or look up the client pool.
187
+
Similarly we’ll have the following for datasource use case. `AsCurrentUser` doesn't really apply to a datasource because it’s always the “current” user's credentials, defined in the “datasource”, that gets used to initialize the client or lookup the client pool.
0 commit comments