Proxy either a plugin or Tomcat?


(Garth) #1

I am unable to reply to my original thread with the question below :
https://groups.google.com/group/elasticsearch/browse_thread/thread/f8832b5e715e5ab8/f6d8eb566078272f?lnk=gst&q=Garth#f6d8eb566078272f

I started down the path of standing up a proxy in Tomcat to intercept
the query, modify it and pass it off to ES. I am getting direction to
make an ES plugin instead of using Tomcat. I don't know enough to
counter
this as good/bad since my focus is building the support code to do the
mods to the query. Will an ES plugin support receiving a query, mung
it
and pass it to ES via the REST Plugin-API? Any suggestions?


(Lukáš Vlček) #2

Hi,

just out of curiosity, why do you not want to use proxy approach?

May be you can try to elaborate more about your input and what kind of
transformation you need to process on it prior to sending a query to ES.
Personally, I implemented proxy in Tomcat that receives some simple input
(URL parameters) and based on it it construct specific ES query using
Transport client Java API. Works quite good.

Regards,
Lukas

On Sun, Jan 22, 2012 at 7:38 PM, Garth ghershfield.bah@gmail.com wrote:

I am unable to reply to my original thread with the question below :

https://groups.google.com/group/elasticsearch/browse_thread/thread/f8832b5e715e5ab8/f6d8eb566078272f?lnk=gst&q=Garth#f6d8eb566078272f

I started down the path of standing up a proxy in Tomcat to intercept
the query, modify it and pass it off to ES. I am getting direction to
make an ES plugin instead of using Tomcat. I don't know enough to
counter
this as good/bad since my focus is building the support code to do the
mods to the query. Will an ES plugin support receiving a query, mung
it
and pass it to ES via the REST Plugin-API? Any suggestions?


(Garth) #3

It's not that I do not want to use the proxy approach. Management is
meddling. The fear being
that Tomcat is going to slow down the overal performance. The theory
they have is that if
it's sitting as a plugin in ES, is that since it's so close to ES the
latency if any would be less
than a Tomcat proxy. As well, I have to use the REST API not the Java
API w/n Tomcat.

On Jan 22, 2:41 pm, Lukáš Vlček lukas.vl...@gmail.com wrote:

Hi,

just out of curiosity, why do you not want to use proxy approach?

May be you can try to elaborate more about your input and what kind of
transformation you need to process on it prior to sending a query to ES.
Personally, I implemented proxy in Tomcat that receives some simple input
(URL parameters) and based on it it construct specific ES query using
Transport client Java API. Works quite good.

Regards,
Lukas

On Sun, Jan 22, 2012 at 7:38 PM, Garth ghershfield....@gmail.com wrote:

I am unable to reply to my original thread with the question below :

https://groups.google.com/group/elasticsearch/browse_thread/thread/f8...

I started down the path of standing up a proxy in Tomcat to intercept
the query, modify it and pass it off to ES. I am getting direction to
make an ES plugin instead of using Tomcat. I don't know enough to
counter
this as good/bad since my focus is building the support code to do the
mods to the query. Will an ES plugin support receiving a query, mung
it
and pass it to ES via the REST Plugin-API? Any suggestions?


(Shay Banon) #4

You can write a plugin that is actually a REST endpoint that munges the
request and constructs a search request out of it. The RestSearchAction can
be a good starting point.

On Mon, Jan 23, 2012 at 5:07 PM, Garth ghershfield.bah@gmail.com wrote:

It's not that I do not want to use the proxy approach. Management is
meddling. The fear being
that Tomcat is going to slow down the overal performance. The theory
they have is that if
it's sitting as a plugin in ES, is that since it's so close to ES the
latency if any would be less
than a Tomcat proxy. As well, I have to use the REST API not the Java
API w/n Tomcat.

On Jan 22, 2:41 pm, Lukáš Vlček lukas.vl...@gmail.com wrote:

Hi,

just out of curiosity, why do you not want to use proxy approach?

May be you can try to elaborate more about your input and what kind of
transformation you need to process on it prior to sending a query to ES.
Personally, I implemented proxy in Tomcat that receives some simple input
(URL parameters) and based on it it construct specific ES query using
Transport client Java API. Works quite good.

Regards,
Lukas

On Sun, Jan 22, 2012 at 7:38 PM, Garth ghershfield....@gmail.com
wrote:

I am unable to reply to my original thread with the question below :

https://groups.google.com/group/elasticsearch/browse_thread/thread/f8.
..

I started down the path of standing up a proxy in Tomcat to intercept
the query, modify it and pass it off to ES. I am getting direction to
make an ES plugin instead of using Tomcat. I don't know enough to
counter
this as good/bad since my focus is building the support code to do the
mods to the query. Will an ES plugin support receiving a query, mung
it
and pass it to ES via the REST Plugin-API? Any suggestions?


(ramk) #5

Hi Garth,

I am curious to know if you were able to develop this plugin in? I appreciate any direction in this regard as I am trying to solve similar issue.


(system) #6