Wares Plugin: Deploying elasticsearch as a servlet

A while back, I added the wares plugin, which basically allows to deploy
elasticsearch as a servlet. The plugin is here:
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/transport/wares,
and the NodeServlet is here:
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/transport/wares/src/main/java/org/elasticsearch/wares/NodeServlet.java
.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and bat)
    that will create a sample war file out of the wares jar, the elasticsearch
    lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at JVM
developers :slight_smile: ).

If I understood, you want to create a simple webapp with ES embedded.

So, if It's what you ask for, why is it a plugin ?
I would suggest to create a maven ES webapp archetype that will create a full new project that every user can modify and build and deploy.

What do you think ?

Did I misunderstood the use case ?

David

Le 22 sept. 2011 à 15:14, Shay Banon kimchy@gmail.com a écrit :

A while back, I added the wares plugin, which basically allows to deploy elasticsearch as a servlet. The plugin is here: https://github.com/elasticsearch/elasticsearch/tree/master/plugins/transport/wares, and the NodeServlet is here: https://github.com/elasticsearch/elasticsearch/blob/master/plugins/transport/wares/src/main/java/org/elasticsearch/wares/NodeServlet.java.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and bat) that will create a sample war file out of the wares jar, the elasticsearch lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at JVM developers :slight_smile: ).

Two reasons why its a plugin:

  1. Its simple to have it as a transport plugin since it gets published to
    maven automatically.
  2. The idea of installing the plugin, and then, using the provided scripts I
    purposed in my first mail, build an "only" elasticsearch war module.

On Thu, Sep 22, 2011 at 9:47 PM, David Pilato david@pilato.fr wrote:

If I understood, you want to create a simple webapp with ES embedded.

So, if It's what you ask for, why is it a plugin ?
I would suggest to create a maven ES webapp archetype that will create a
full new project that every user can modify and build and deploy.

What do you think ?

Did I misunderstood the use case ?

David

Le 22 sept. 2011 à 15:14, Shay Banon kimchy@gmail.com a écrit :

A while back, I added the wares plugin, which basically allows to deploy
elasticsearch as a servlet. The plugin is here: https://github.com/elasticsearch/elasticsearch/tree/master/plugins/transport/wares
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/transport/wares,
and the NodeServlet is here: https://github.com/elasticsearch/elasticsearch/blob/master/plugins/transport/wares/src/main/java/org/elasticsearch/wares/NodeServlet.java
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/transport/wares/src/main/java/org/elasticsearch/wares/NodeServlet.java
.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and bat)
    that will create a sample war file out of the wares jar, the elasticsearch
    lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at JVM
developers :slight_smile: ).

Hi Shay,
After reading the code of the Servlet, I found that you only had one
internal node instantiated.
Would you mind giving me some hint on how to search based on the
servlet?
I found that it only supported GET method.
If I use PUT, POST, I shall get an error.
I get the latest code from github the day before yesterday.
If you don't mind, I can try to write a script to create war.

Thanks and best regards

On 9月23日, 下午10时06分, Shay Banon kim...@gmail.com wrote:

Two reasons why its a plugin:

  1. Its simple to have it as a transport plugin since it gets published to
    maven automatically.
  2. The idea of installing the plugin, and then, using the provided scripts I
    purposed in my first mail, build an "only" elasticsearch war module.

On Thu, Sep 22, 2011 at 9:47 PM, David Pilato da...@pilato.fr wrote:

If I understood, you want to create a simple webapp with ES embedded.

So, if It's what you ask for, why is it a plugin ?
I would suggest to create a maven ES webapp archetype that will create a
full new project that every user can modify and build and deploy.

What do you think ?

Did I misunderstood the use case ?

David

Le 22 sept. 2011 à 15:14, Shay Banon kim...@gmail.com a écrit :

A while back, I added the wares plugin, which basically allows to deploy
elasticsearch as a servlet. The plugin is here: https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr...
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr...,
and the NodeServlet is here: https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr...
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr...
.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and bat)
    that will create a sample war file out of the wares jar, the elasticsearch
    lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at JVM
developers :slight_smile: ).- 隐藏被引用文字 -

  • 显示引用的文字 -

Why would there be a need for more than one Node (per JVM)? Not sure about
the failures you get with PUT/POST, as you did not post them (and please,
gist them).

2011/9/30 kun niu haoniukun@gmail.com

Hi Shay,
After reading the code of the Servlet, I found that you only had one
internal node instantiated.
Would you mind giving me some hint on how to search based on the
servlet?
I found that it only supported GET method.
If I use PUT, POST, I shall get an error.
I get the latest code from github the day before yesterday.
If you don't mind, I can try to write a script to create war.

Thanks and best regards

On 9月23日, 下午10时06分, Shay Banon kim...@gmail.com wrote:

Two reasons why its a plugin:

  1. Its simple to have it as a transport plugin since it gets published to
    maven automatically.
  2. The idea of installing the plugin, and then, using the provided
    scripts I
    purposed in my first mail, build an "only" elasticsearch war module.

On Thu, Sep 22, 2011 at 9:47 PM, David Pilato da...@pilato.fr wrote:

If I understood, you want to create a simple webapp with ES embedded.

So, if It's what you ask for, why is it a plugin ?
I would suggest to create a maven ES webapp archetype that will create
a
full new project that every user can modify and build and deploy.

What do you think ?

Did I misunderstood the use case ?

David

Le 22 sept. 2011 à 15:14, Shay Banon kim...@gmail.com a écrit :

A while back, I added the wares plugin, which basically allows to
deploy
elasticsearch as a servlet. The plugin is here: <
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr...>
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr..
.,
and the NodeServlet is here: <
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr...>
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr.
..
.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and
    bat)
    that will create a sample war file out of the wares jar, the
    elasticsearch
    lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at
JVM
developers :slight_smile: ).- 隐藏被引用文字 -

  • 显示引用的文字 -

Thank you for your attention to my problem.

It has been resolved.

I misconfigured my web.xml file.

Thanks and best regards,

Kun Niu

MSIT-SM program

Information Networking Institute

Carnegie Mellon University

4348 Hyland Ave. Apt 7

San Jose, CA 95127

Phone:1(412)608-8815

From: elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com]
On Behalf Of Shay Banon
Sent: 2011年10月2日 16:59
To: elasticsearch@googlegroups.com
Subject: Re: Wares Plugin: Deploying elasticsearch as a servlet

Why would there be a need for more than one Node (per JVM)? Not sure about
the failures you get with PUT/POST, as you did not post them (and please,
gist them).

2011/9/30 kun niu haoniukun@gmail.com

Hi Shay,
After reading the code of the Servlet, I found that you only had one
internal node instantiated.
Would you mind giving me some hint on how to search based on the
servlet?
I found that it only supported GET method.
If I use PUT, POST, I shall get an error.
I get the latest code from github the day before yesterday.
If you don't mind, I can try to write a script to create war.

Thanks and best regards

On 9月23日, 下午10时06分, Shay Banon kim...@gmail.com wrote:

Two reasons why its a plugin:

  1. Its simple to have it as a transport plugin since it gets published to
    maven automatically.
  2. The idea of installing the plugin, and then, using the provided scripts
    I
    purposed in my first mail, build an "only" elasticsearch war module.

On Thu, Sep 22, 2011 at 9:47 PM, David Pilato da...@pilato.fr wrote:

If I understood, you want to create a simple webapp with ES embedded.

So, if It's what you ask for, why is it a plugin ?
I would suggest to create a maven ES webapp archetype that will create a
full new project that every user can modify and build and deploy.

What do you think ?

Did I misunderstood the use case ?

David

Le 22 sept. 2011 à 15:14, Shay Banon kim...@gmail.com a écrit :

A while back, I added the wares plugin, which basically allows to deploy

elasticsearch as a servlet. The plugin is here:
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr...
https://github.com/elasticsearch/elasticsearch/tree/master/plugins/tr...,
and the NodeServlet is here:
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr...
https://github.com/elasticsearch/elasticsearch/blob/master/plugins/tr...

.

Why its not officially out yet? Basically, its missing a few things:

  1. The plugin should also have a sample web.xml configuration.
  2. The plugin, when installed, should have a package script (sh and bat)
    that will create a sample war file out of the wares jar, the
    elasticsearch
    lib jars and the sample web.xml config.

So, someone up to the task of the above two points? (mainly aimed at JVM

developers :slight_smile: ).- 隐藏被引用文字 -

  • 显示引用的文字 -

it seems that the urls were out of date. for those who are crazy about es and want it deployed as a web-app like me, here is the real addresses i just found.


cheers~