Elasticsearch Frontend webapp and boilerplate query code

Hi,

I wish everybody a happy new year, all the best for 2015, and in
continuation of the great success of ES,

In our project we intend to create a simple webapp that will query
elasticsearch for insights. We do not want to directly query elasticsearch
for two reasons:

  • security
  • avoid boilerplate query code and to be able to decouple it

What is the best way to achieve that? We are currently evaluating building
the frontend in python/django project. has anyone faced similiar task and
is it possible to share some thoughts?

In other situations NGinX was a solution for security, but for avoiding
having all the boilerplate query code in client side (e.g. in javascript)
what is the most well established way?

Finally, there are cases were some caching may be needed to avoid hitting
elasticsearch constantly for the same data, how is this tackled? We need to
build our own module to do all these?

thank you in advance

Thomas

--
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/7bdce45e-eff8-4f04-9a9b-f3256a9b28a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Can you elaborate what you mean by "boilerplate query code"?

Jörg

On Fri, Jan 2, 2015 at 4:04 PM, Thomas thomas.bolis@gmail.com wrote:

Hi,

I wish everybody a happy new year, all the best for 2015, and in
continuation of the great success of ES,

In our project we intend to create a simple webapp that will query
elasticsearch for insights. We do not want to directly query elasticsearch
for two reasons:

  • security
  • avoid boilerplate query code and to be able to decouple it

What is the best way to achieve that? We are currently evaluating building
the frontend in python/django project. has anyone faced similiar task and
is it possible to share some thoughts?

In other situations NGinX was a solution for security, but for avoiding
having all the boilerplate query code in client side (e.g. in javascript)
what is the most well established way?

Finally, there are cases were some caching may be needed to avoid hitting
elasticsearch constantly for the same data, how is this tackled? We need to
build our own module to do all these?

thank you in advance

Thomas

--
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/7bdce45e-eff8-4f04-9a9b-f3256a9b28a9%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/7bdce45e-eff8-4f04-9a9b-f3256a9b28a9%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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/CAKdsXoFuX_D1v0eiMQ8Xnd6EBMu-t9U9pJYDC7VZppxv65UedA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Yes,

Let's say that you wan to represent a pie graph with some short of
aggregated data in it extracted from elasticsearch. Instead of writing the
query in javascript or having it client side in the code we need something
like a simple call of a get API for instance getMyPieData() from another
service and get the data to represent that information.

If we let elasticsearch to do that we may want to use search templates:

if we want to as well cache that query we may use elasticsearch query cache:

That is what elasticsearch more or less provides for my use case afaik. My
question is if there is something else that I can do to cache and "hide" my
queries apart from the over-mentioned solutions which make me bound to
elasticsearch(some separate module, technology etc. based on best
practises), while in another case I might want to change elasticsearch with
something else and still not affect my frontend code, or more important not
to constantly hit elasticsearch for those data.

I'm trying to first verify that I will not reinvent the wheel and build my
own solution

Thank you again

On Friday, 2 January 2015 17:04:59 UTC+2, Thomas wrote:

Hi,

I wish everybody a happy new year, all the best for 2015, and in
continuation of the great success of ES,

In our project we intend to create a simple webapp that will query
elasticsearch for insights. We do not want to directly query elasticsearch
for two reasons:

  • security
  • avoid boilerplate query code and to be able to decouple it

What is the best way to achieve that? We are currently evaluating building
the frontend in python/django project. has anyone faced similiar task and
is it possible to share some thoughts?

In other situations NGinX was a solution for security, but for avoiding
having all the boilerplate query code in client side (e.g. in javascript)
what is the most well established way?

Finally, there are cases were some caching may be needed to avoid hitting
elasticsearch constantly for the same data, how is this tackled? We need to
build our own module to do all these?

thank you in advance

Thomas

--
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/2ba94df5-7f54-4ec3-87f5-7a038dd15ca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

OK, you want to wrap a custom API around ES API.

Templates are on method to render strings into JSON but I think
django-elasticsearch or the official python client is a better way to go if
you must go with python/django

Caching is something which is not related to templates and might be
overestimated, especially when all queires are different. I would suggest
to add it later to your stack when everything is working ok.

Jörg

On Fri, Jan 2, 2015 at 4:40 PM, Thomas thomas.bolis@gmail.com wrote:

Yes,

Let's say that you wan to represent a pie graph with some short of
aggregated data in it extracted from elasticsearch. Instead of writing the
query in javascript or having it client side in the code we need something
like a simple call of a get API for instance getMyPieData() from another
service and get the data to represent that information.

If we let elasticsearch to do that we may want to use search templates:

Elasticsearch Platform — Find real-time answers at scale | Elastic

if we want to as well cache that query we may use elasticsearch query
cache:

Elasticsearch Platform — Find real-time answers at scale | Elastic

That is what elasticsearch more or less provides for my use case afaik. My
question is if there is something else that I can do to cache and "hide" my
queries apart from the over-mentioned solutions which make me bound to
elasticsearch(some separate module, technology etc. based on best
practises), while in another case I might want to change elasticsearch with
something else and still not affect my frontend code, or more important not
to constantly hit elasticsearch for those data.

I'm trying to first verify that I will not reinvent the wheel and build my
own solution

Thank you again

On Friday, 2 January 2015 17:04:59 UTC+2, Thomas wrote:

Hi,

I wish everybody a happy new year, all the best for 2015, and in
continuation of the great success of ES,

In our project we intend to create a simple webapp that will query
elasticsearch for insights. We do not want to directly query elasticsearch
for two reasons:

  • security
  • avoid boilerplate query code and to be able to decouple it

What is the best way to achieve that? We are currently evaluating
building the frontend in python/django project. has anyone faced similiar
task and is it possible to share some thoughts?

In other situations NGinX was a solution for security, but for avoiding
having all the boilerplate query code in client side (e.g. in javascript)
what is the most well established way?

Finally, there are cases were some caching may be needed to avoid hitting
elasticsearch constantly for the same data, how is this tackled? We need to
build our own module to do all these?

thank you in advance

Thomas

--
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/2ba94df5-7f54-4ec3-87f5-7a038dd15ca7%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2ba94df5-7f54-4ec3-87f5-7a038dd15ca7%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit 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/CAKdsXoHETLx%2B20PN5ui6AiL0PRV4Y%3D-Nq%2BjGkdvGvvheRrTkZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.