Home > Enterprise >  why are there so many ES java clients?
why are there so many ES java clients?

Time:04-02

Transport client has been removed in ES 8; High level rest client is deprecated and will be removed; New Java API client is used in ES 8.

But .Net has the same high level Elasticsearch .NET client since 2x. Why are there so many ES java clients?

CodePudding user response:

In short, there have been a few Java clients for historical reasons.

Transport client uses the transport protocol of Elasticsearch, the protocol that nodes use to communicate with each other. There can be compatibility issues if the client is not on the same version as the cluster. The Java client was the only client that used the transport protocol whilst every other client uses the http protocol.

The High Level Rest Client (HLRC) superseded the Transport client and used the http protocol. This was a step in the right direction, however, the client still had dependencies on types from Elasticsearch.

The new Java client supersedes HLRC and is completely decoupled from Elasticsearch. Much of the API surface of the client is generated from an API specification, providing a more maintainable and consistent API surface.

By the way, whilst there have been consistent Nuget packages for the .NET clients (Elasticsearch.Net and NEST) since 1.x, the clients have undergone a fair amount of evolution in this time, with breaking changes between major versions. There's a new .NET for 8.x too (alpha release) :)

  • Related