Upgrade to Pro — share decks privately, control downloads, hide ads and more …

An Introduction to Elasticsearch (for .NET Developers) - 60 Mins

An Introduction to Elasticsearch (for .NET Developers) - 60 Mins

Slides from my talk "An Introduction to Elasticsearch (for .NET Developers)".

Elasticsearch is the world's leading search and analytics solution used by thousands of companies worldwide use cases, including search, analytics, monitoring and security information and event management. With an emphasis on speed, scale, and relevance, it's transforming how the world uses data. In this session, we'll learn about leveraging the power of Elasticsearch within .NET applications, utilising the Elasticsearch.NET client library. Join Steve to learn about the .NET client, how to install it in .NET applications and use it to begin indexing and searching documents. This session is aimed at software developers, looking to get started by combining the capabilities of Elasticsearch with their .NET applications. You'll leave with the core knowledge, required to begin using Elasticsearch using the .NET client.

863d6186d3bc32b7c9036101c47d5d5b?s=128

Steve Gordon

May 05, 2022
Tweet

More Decks by Steve Gordon

Other Decks in Technology

Transcript

  1. 1 Steve Gordon (Senior Engineer @ Elastic) @stevejgordon | stevejgordon.co.uk

    An Introduction to Elasticsearch (for .NET Developers)
  2. We build search solutions on a single stack Enterprise Search

    Observability Security
  3. 4 Store, Search, & Analyze Visualize & Manage Ingest Elastic

    Stack SOLUTIONS Kibana Elasticsearch Beats Logstash SaaS On-Prem Elastic cloud Elastic cloud Enterprise Standalone Elastic cloud On Kubernetes Elastic Agent
  4. 5 Basic Terminology CLUSTER A collection of one or more

    nodes (servers) that together hold your data and provide federated indexing and search capabilities across all nodes.
  5. 6 Basic Terminology CLUSTER A single server that is part

    of your cluster, stores your data, and participates in the clusters indexing and search capabilities. NODE 1 NODE 2 NODE 3
  6. 7 Basic Terminology CLUSTER A collection of documents that have

    somewhat similar characteristics. NODE 1 NODE 2 NODE 3 INDEX
  7. 8 Basic Terminology CLUSTER Elasticsearch provides the ability to subdivide

    your index into multiple pieces called shards. NODE 1 NODE 2 NODE 3 INDEX SHARD (PRIMARY) P1 SHARD (PRIMARY) P2 SHARD (PRIMARY) P3 SHARD (REPLICA) R3 SHARD (REPLICA) R1 SHARD (REPLICA) R2
  8. 9 Basic Terminology CLUSTER Elasticsearch provides the ability to subdivide

    your index into multiple pieces called shards. NODE 1 NODE 2 NODE 3 INDEX SHARD (PRIMARY) P1 SHARD (PRIMARY) P2 SHARD (PRIMARY) P3 SHARD (REPLICA) R3 SHARD (REPLICA) R1 SHARD (REPLICA) R2
  9. 10 Basic Terminology CLUSTER The basic unit of information that

    can be indexed in JSON form. NODE 1 NODE 2 NODE 3 INDEX SHARD (PRIMARY) P1 SHARD (PRIMARY) P2 SHARD (PRIMARY) P3 SHARD (REPLICA) R3 SHARD (REPLICA) R1 SHARD (REPLICA) R2 DOC DOC DOC DOC DOC DOC DOC DOC DOC DOC DOC DOC
  10. 11 11 HTTP Interface

  11. 12 The Elasticsearch API in numbers • > 400 API

    endpoints • 2000 data structures, including: ‒ 50 query types ‒ 70 aggregation types ‒ 30 field types
  12. 13 Language Clients • .NET • Java • JavaScript •

    Ruby • Go • PHP • Perl • Python • Rust
  13. 14 Existing Elasticsearch .NET Client (7.x) NEST High Level Client

    Strongly-typed requests, responses and Query DSL. Elasticsearch.Net Low Level Dependency free, unopinionated client. Handles transport and basic requests/responses.
  14. 15 Problems with the existing client • Hand written ‒

    API is not always consistent ‒ A lot of maintenance work (400 endpoints and thousands of types!) • Legacy internalised JSON serialiser based on Utf8Json • 10 years of historical decisions
  15. 16 Introducing Elastic.Clients.Elasticsearch • A new generation of the Elasticsearch

    client • Code Generated ‒ Based on a formal specification of the Elasticsearch API ‒ Most of the code is code-generated using Roslyn APIs • Uses System.Text.Json serializer • Built on a common Elastic.Transport layer • Removes some of the legacy of the past to create a cleaner API The new .NET client for v8.0
  16. 17 DEMOS

  17. 18 Resources • github.com/elastic/elasticsearch-net • elastic.co/guide/en/elasticsearch/client/net-api/current • nuget.org/packages/NEST • nuget.org/packages/Elastic.Clients.Elasticsearch

    • github.com/stevejgordon/elasticsearch-examples • discuss.elastic.co
  18. 19 Thank you! @stevejgordon