Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip ci] [WIP] Data access service in NP #45058

Closed

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented Sep 6, 2019

[skip-ci] NP version of #38737

** Note the final PR will likely not have all the sample plugins.

Overview

Introduces two new extension points, one on the client side and one on the server side, both called Search strategies for now for lack of better terms.

New Plugins

search (OSS)

  • New client side extension point, registerClientSearchStrategyProvider
  • Way to expose custom information to the client side search strategy via registerSearchStrategyContext
  • New server side extension point, addSearchStrategyProvider
    • Feel free to give naming feedback Should we call this registerSeverSearchStrategyProvider?
  • A SYNC_SEARCH_STRATEGY, which does not handle querying anything itself, so it requires a serverStrategy attribute to know which backend to use.

es_search (OSS)

  • Synchronous way to query elasticsearch via
context.search(
  { ...request, serverStrategy: ES_SEARCH_STRATEGY },
  { signal },
  SYNC_SEARCH_STRATEGY
)
  • Only registers a server side search strategy.
  • Uses the SYNC_SEARCH_STRATEGY on the client side.
  • TODO: if it registers a client side search strategy we can simplify caller usage and only have them do:
context.search(request, { signal }, ES_SEARCH_STRATEGY)

which would just internally use the above code on the client side.

async_search (commercial)

  • A client side only, commercial search strategy that handles asynchronous back ends, continuously querying until percentComplete reaches 100.
  • TODO: use something other than percentComplete.

demo_data_search (sample plugin, relies on xpack plugin)

  • Registers both client and server side search strategies.
  • Doesn't hit ES at all but returns random data in an asynchronous manner.
  • Depends on the ASYNC_SEARCH_STRATEGY plugin which is part of x-pack.

time_chunk_es_search (sample plugin, relies on xpack plugin)

  • Registers both client and server side search strategies.
  • Depends on the server side ES_SEARCH_STRATEGY plugin.
  • Depends on the client side ASYNC_SEARCH_STRATEGY plugin which is part of x-pack.

Screen Shot 2019-09-24 at 5 00 13 PM

kbn_tp_search_explorer (sample plugin)

A sample plugin with working examples, showcasing various plugins that extend and use the search plugin.

Playground

Run via yarn start --plugin-path test/plugin_functional/plugins/demo_data_search/ --plugin-path test/plugin_functional/plugins/kbn_tp_search_explorer/ --plugin-path test/plugin_functional/plugins/time_chunk_es_search to see the data explorer plugin.

cancelling

Resolves #43371.

@stacey-gammon stacey-gammon force-pushed the 2019-09-06-data-search-np branch 2 times, most recently from ffda1b0 to ea90fc7 Compare September 10, 2019 20:58
@stacey-gammon stacey-gammon changed the title [WIP] Data access service in NP [skip-ci] [WIP] Data access service in NP Sep 11, 2019
@stacey-gammon stacey-gammon changed the title [skip-ci] [WIP] Data access service in NP [skip ci] [WIP] Data access service in NP Sep 11, 2019
@elastic elastic deleted a comment from elasticmachine Sep 11, 2019
@elastic elastic deleted a comment from elasticmachine Sep 11, 2019
@stacey-gammon stacey-gammon force-pushed the 2019-09-06-data-search-np branch 10 times, most recently from 4a28104 to f8635ba Compare September 24, 2019 14:59
@stacey-gammon stacey-gammon force-pushed the 2019-09-06-data-search-np branch from f8635ba to 10016b0 Compare September 24, 2019 21:46
() => searchAPI
);
} catch (e) {
console.log('error: ' + e);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshdover here is where I'm doing the bad things :)

@stacey-gammon stacey-gammon force-pushed the 2019-09-06-data-search-np branch from 10016b0 to d9c997a Compare September 25, 2019 15:34
@streamich streamich added WIP Work in progress Feature:NP Migration Feature:Search Querying infrastructure in Kibana Team:AppArch labels Feb 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:NP Migration Feature:Search Querying infrastructure in Kibana WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Access Search API: MVP/Phase 1
3 participants