Recommended setup for javascript client & elasticsearch backend?

Hi,

My front end is a browser-based javascript program that generates read-
only queries. Should I have the js program communicating directly with
elasticsearch? If not, is there any proxy/middleware setup you would
recommend?

Thanks.

I just started using ES too.

I have a setup with a JS frontend directly communicating with ES. I'm using
jQuery for JSONP and jQuery tmpl for templating. ES is fast, and returns a
clean JSON file that you can dig out what you need with JS. I've had no
problems communicating directly with ES, but it might depend on
your environment and what you need to do with the results.

How did you solve security vulnerability issues? Everyone can access your
data and add, edit, delete it.

2011/8/18 Sindre Sorhus sindresorhus@gmail.com

I just started using ES too.

I have a setup with a JS frontend directly communicating with ES. I'm using
jQuery for JSONP and jQuery tmpl for templating. ES is fast, and returns a
clean JSON file that you can dig out what you need with JS. I've had no
problems communicating directly with ES, but it might depend on
your environment and what you need to do with the results.

There is a node.js proxy for elasticsearch:

I was considering writing one for nginx, but I believe someone might already
have done so.

--
Ivan

On Thu, Aug 18, 2011 at 4:33 AM, Andy selforganized@gmail.com wrote:

Hi,

My front end is a browser-based javascript program that generates read-
only queries. Should I have the js program communicating directly with
elasticsearch? If not, is there any proxy/middleware setup you would
recommend?

Thanks.

Hi,

note that this proxy hasn't been updated for a while but I think it probably
still works fine in most cases (it is highly configurable).
But generally speaking you should not directly expose ES api. It can be
really dangerous. You should deploy proxy (and there are more option, not
only node.js)

Regards,
Lukas

On Thu, Aug 18, 2011 at 10:22 PM, Ivan Brusic ivan@brusic.com wrote:

There is a node.js proxy for elasticsearch:
GitHub - lukas-vlcek/node.es: Node gadgets for Elastic Search

I was considering writing one for nginx, but I believe someone might
already have done so.

--
Ivan

On Thu, Aug 18, 2011 at 4:33 AM, Andy selforganized@gmail.com wrote:

Hi,

My front end is a browser-based javascript program that generates read-
only queries. Should I have the js program communicating directly with
elasticsearch? If not, is there any proxy/middleware setup you would
recommend?

Thanks.

There is a node.js proxy for elasticsearch:GitHub - lukas-vlcek/node.es: Node gadgets for Elastic Search

I was considering writing one for nginx, but I believe someone might already
have done so.

Can you share a link to the nginx proxy?

You should deploy proxy (and there are more option, not
only node.js)

Can you share those options? Any list of available proxies for
elasticsearch?

It's running on a restricted network, so it's not really a problem.

But for my next project, I could need a Python proxy for ES. Someone make.
:wink: