Fastest API

Hi there,

What would be the fastest API of ES? We use Java as client, so my guess
would be the java API. Does anyone have some internal information about why
that would be the fastest?

Best regards,

Robin Verlangen
Software engineer
*
*
W http://www.robinverlangen.nl
E robin@us2.nl

http://goo.gl/Lt7BC

Disclaimer: The information contained in this message and attachments is
intended solely for the attention and use of the named addressee and may be
confidential. If you are not the intended recipient, you are reminded that
the information remains the property of the sender. You must not use,
disclose, distribute, copy, print or rely on this e-mail. If you have
received this message in error, please contact the sender immediately and
irrevocably delete this message and any copies.

--

Most other clients use the REST protocol which eventually get converted
into the Java API on the server side, so they all have some overhead. The
time difference in clients is negligible compared to execution time of a
query.

--
Ivan

On Mon, Nov 12, 2012 at 12:15 PM, Robin Verlangen robin@us2.nl wrote:

Hi there,

What would be the fastest API of ES? We use Java as client, so my guess
would be the java API. Does anyone have some internal information about why
that would be the fastest?

Best regards,

Robin Verlangen
Software engineer
*
*
W http://www.robinverlangen.nl
E robin@us2.nl

http://goo.gl/Lt7BC

Disclaimer: The information contained in this message and attachments is
intended solely for the attention and use of the named addressee and may be
confidential. If you are not the intended recipient, you are reminded that
the information remains the property of the sender. You must not use,
disclose, distribute, copy, print or rely on this e-mail. If you have
received this message in error, please contact the sender immediately and
irrevocably delete this message and any copies.

--

--

Robin Verlangen wrote:

What would be the fastest API of ES? We use Java as client, so my
guess would be the java API. Does anyone have some internal
information about why that would be the fastest?

Ivan Brusic wrote:

Most other clients use the REST protocol which eventually get
converted into the Java API on the server side, so they all have
some overhead. The time difference in clients is negligible
compared to execution time of a query.

At Sonian we used the Java client for heavy bulk indexing of large
documents before trying the REST client to give us better resiliency
in the face of ES version changes. We had decided the tradeoff was
worth it even if it slowed us down slightly. In the end it turned
out to be comparable in speed. Most of the same de/serialization has
to happen for both clients, which pales in comparison to the IO
required to write data and do large queries.

It's best to profile your data with both and make an informed choice.

-Drew

--

The Java API is the native API of ES - there is nothing "faster". It's
difficult what you mean by "fast" since there is nothing in an API you can
call "fast", so I think you are refering to the perceivable response time
of different protocol mechanisms for performing operations, like HTTP REST
or the binary transport protocol between nodes. Because ES API is
asynchronous, you will get responses as soon as ES can react, not
necessarily as soon as the operation is complete. In comparison to the time
required to perform the underlying operations and the network delay, the
time spent in the protocol layer is not significant. But, in the case you
refer to use cases like bulk data ingest, it is true that different
protocol overheads tend to sum up. It also depends on your data and your
environment. You can control the efficiency by chosing configuration
settings, compression algorithms, bulk transport, asynchronous operation
mode, load balancing, query optimization, Lucene tuning - whatever you
prefer.

Jörg

On Monday, November 12, 2012 9:15:31 PM UTC+1, Robin Verlangen wrote:

Hi there,

What would be the fastest API of ES? We use Java as client, so my guess
would be the java API. Does anyone have some internal information about why
that would be the fastest?

Best regards,

Robin Verlangen
Software engineer
*
*
W http://www.robinverlangen.nl
E ro...@us2.nl <javascript:>

http://goo.gl/Lt7BC

Disclaimer: The information contained in this message and attachments is
intended solely for the attention and use of the named addressee and may be
confidential. If you are not the intended recipient, you are reminded that
the information remains the property of the sender. You must not use,
disclose, distribute, copy, print or rely on this e-mail. If you have
received this message in error, please contact the sender immediately and
irrevocably delete this message and any copies.

--