Elasticsearch: Compile as native image via GraalVM

Created on 25 Dec 2018  路  4Comments  路  Source: elastic/elasticsearch

Describe the feature:
I am interested in compilation into native image by using GraalVM, did anyone tried yet?

:DeliverBuild Delivery

Most helpful comment

I don't think this is feasible (or will be feasible in the foreseeable future). If you look at https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md you can see a number of limitations with compiling Java to native using Graal that preclude compiling something as complex as ES (e.g. the incomplete reflection support, no finalizers will probably break Netty, no security manager would necessitate code changes and so on).

All 4 comments

Pinging @elastic/es-core-infra

I don't think this is feasible (or will be feasible in the foreseeable future). If you look at https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md you can see a number of limitations with compiling Java to native using Graal that preclude compiling something as complex as ES (e.g. the incomplete reflection support, no finalizers will probably break Netty, no security manager would necessitate code changes and so on).

Unfortunate.:/

I was looking forward to being able to start ElasticSearch quickly for tests.

preclude compiling something as complex as ES (e.g. the incomplete reflection support, no finalizers will probably break Netty, no security manager would necessitate code changes and so on)

With respect, the list you give seems to have little to do with "complexity". Use of reflection and finalizers is ... awkward in any circumstance, and often a smell.

Seems to me that _especially_ complex, resource-hungry applications would profit from investing in native images. Of course, that endeavour may cause non-trivial refactorings.

Was this page helpful?
0 / 5 - 0 ratings