Embedding design questions

I'm planning to embed a full ES server within a custom application. ES
customization will be implemented through the ES plugins mechanism. The
plan is to create a single runnable jar that would include all the ES +
plugin dependencies. A custom main class would automatically setup
environment specific configuration and then start up ES bootstrap class.

It seems that the plugin code can be bundled in a single jar with the rest
of ES + libs, provided that all the es-plugin.properties files can be
loaded from plugins//.

I'm using the sbt build tool which fetches elasticsearch.jar from Maven
repository. I noticed that some of the jars that are included with the ES
distribution package are marked as optional, compile-time dependencies and
are not included in my package.

Is there any documentation about when a particular optional dependency is
needed?

Is this type of embedding approach suitable to be used with ES?
Any caveats to be aware of?

thanks,
marko

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4028e9d5-222a-46f1-a403-e2f32102c988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

About optional dependencies, I have seen in the past some things around groovy and geo stuff.
So basically, if you don’t use scripts in your embedded app or any Spatial4J related types, you can probably omit them.

Embedding elasticsearch can work IMHO. But be aware that your application is also running in the same JVM, that you are may be deploying this in a container (Tomcat/JBoss/Whatever) so you are subject to GC generated by those layers as well. If your application is not overloaded, you can probably do this.
If you are touching the limit, you could at some point transform your embedded Node to a Client Node or replace with a Transport Client and run elasticsearch in its own process.

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 6 févr. 2015 à 08:46, marko marko.asplund@gmail.com a écrit :

I'm planning to embed a full ES server within a custom application. ES customization will be implemented through the ES plugins mechanism. The plan is to create a single runnable jar that would include all the ES + plugin dependencies. A custom main class would automatically setup environment specific configuration and then start up ES bootstrap class.

It seems that the plugin code can be bundled in a single jar with the rest of ES + libs, provided that all the es-plugin.properties files can be loaded from plugins//.

I'm using the sbt build tool which fetches elasticsearch.jar from Maven repository. I noticed that some of the jars that are included with the ES distribution package are marked as optional, compile-time dependencies and are not included in my package.

Is there any documentation about when a particular optional dependency is needed?

Is this type of embedding approach suitable to be used with ES?
Any caveats to be aware of?

thanks,
marko

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4028e9d5-222a-46f1-a403-e2f32102c988%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/4028e9d5-222a-46f1-a403-e2f32102c988%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2AB63EB3-DDAA-4AF2-8264-7989B9D09597%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.