[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-17 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch

* fixed {{text/Base.java}} broken by refactoring {{ZooKeeperService}}
* all junit tests are now passing
* all python tests are now passing

> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Fix For: 3.4.0
>
> Attachments: keys.tar.gz, SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-16 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch
keys.tar.gz

I've added the license header to {{HTTPBasicAuth.java}}, removed all the tabs 
and added dummy self-signed keys to {{keys.tar.gz}} ( should be extracted to 
{{conf/keys}} folder ). 

Thanks Patrick for reviewing. 

> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Fix For: 3.4.0
>
> Attachments: keys.tar.gz, SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-16 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-809:
---

Fix Version/s: 3.4.0

This looks good, a few issues to address:

1) add license to HTTPBasicAuth.java

2) replace tabs with spaces for indentation (check the resulting patch file for 
any tabs)

3) the diff is missing binaries for:

:00 100644 000... 13e5aab... A  src/contrib/rest/conf/keys/rest.cer
:00 100644 000... 539e8be... A  src/contrib/rest/conf/keys/rest.jks



> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Fix For: 3.4.0
>
> Attachments: SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-13 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch

In this patch I've added:
* a bunch of classes for parsing the configuration file
* per context HTTP Digest authentication settings 
* per context ZooKeeper digest authentication settings
* support for chroot when parsing the hostPort string

By using these features you can easily create secure channels from your 
application to ZooKeeper ( HTTPS + Digest Authentication + ZK Auth + chroot). 
It doesn't support the whole API but it should be really useful for 
configuration management. 

Working on:
* support for ACLs: read and update
* per session ZooKeeper authentication 

Sample config for a channel:

rest.port = 9998

rest.endpoint.1 = /channel;localhost:2181,localhost:2182,localhost:2183/app
rest.endpoint.1.http.auth = user:pass,user2:pass2
rest.endpoint.1.zk.digest = appuser:pass

.. you should also enable SSL because the browser sends the password as plain 
text

rest.ssl = true
rest.ssl.jks = keys/rest.jks
rest.ssl.jks.pass = 123456

> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Attachments: SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch, ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-06 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch

In this patch:
* ant task for packaging: just run {{ant tar}} and it will generate 
{{zookeeper-dev-rest.tar.gz}} in {{build/contrib/rest/}}
* basic script for starting and stopping the REST gateway - 
{{bin/restServer.sh}}

Remaining: 
* ACLs & ZooKeeper Authentication - after GSoC "soft" deadline 

All tests are passing, including the ones from the new python client test suite.



> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Attachments: SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch, ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-05 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch

Changes in this patch:
* {{ZooKeeperService}} now uses the servlet context path and not full URI as a 
key for retrieving ZooKeeper connections
* added a configuration file: conf/rest.properties
* added support for multiple endpoints: /cluster1, /cluster2 - useful if you 
have multiple ZooKeeper clusters 
* HTTPS support 
* HTTP Basic Authentication 
* shutdownHook for cleanup

I'm still working on: packaging, ACLs & ZooKeeper Authentication 

I will finish the packaging ant task tomorrow and next week (after the GSoC 
"soft" deadline) I will also add support for ACLs and Authentication.

Let me know what you think. Thanks. 

> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Attachments: SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch, 
> ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-08-04 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: ZOOKEEPER-809.patch
SPEC.txt


This patch contains:

* basic support for sessions ( create: POST 
/sessions/v1?op=create&expire=SECONDS, delete: DELETE /sessions/v1/, 
heartbeat: PUT /sessions/v1/ )
* support for ephemeral nodes: create: POST 
/znodes/v1/a/b?op=create&name=c&ephemeral=true&session=ID
* experimental (almost complete) python REST client
* demos: demo_master_election.py & demo_queue.py 
* updated specs

I'm not going to implement watches now because they are not useful if the 
client pulls the server for changes.  

Working on: 
* configuration, ACLs and basic authentication 
* packaging - I want to be able to run the REST gateway as a task managed by 
the Hue [1] supervisor. 

I would really like to get more feedback from you regarding this patch. Thanks. 

[1] http://github.com/cloudera/hue 



> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Attachments: SPEC.txt, SPEC.txt, ZOOKEEPER-809.patch
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-809) Improved REST Interface

2010-07-14 Thread Andrei Savu (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu updated ZOOKEEPER-809:
--

Attachment: SPEC.txt

I've attached the first draft of the SPECs for an improved REST gateway. 

I'm proposing the following new operations:

1. create a new session -- POST /sessions/v1?op=create HTTP/1.1

2. keep the session alive -- PUT /sessions/v1/ HTTP/1.1

3. close the session -- DELETE /sessions/v1/ HTTP/1.1

4. create an ephemeral node -- POST 
/znodes/v1/a/b?op=create&name=c&ephemeral=true&session= HTTP/1.1

5. create a new watch -- POST /znodes/v1/a/b?op=watch&view=data OR 
children&session= HTTP/1.1

6. query watch status -- GET /sessions/v1//watches/ 
HTTP/1.1
This operation could support long-polling in the future. 

7. delete a triggered watch -- DELETE 
/sessions/v1//watches/ HTTP/1.1

Let me know what you think about this. Am I breaking the REST principles? 

This is what I want to do in the first iteration. In the second iteration I 
would like to add support for ACLs and authentication. 

> Improved REST Interface
> ---
>
> Key: ZOOKEEPER-809
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-809
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib
>Reporter: Andrei Savu
>Assignee: Andrei Savu
> Attachments: SPEC.txt
>
>
> I would like to extend the existing REST Interface to also support:
> * configuration
> * ephemeral znodes
> * watches - PubSubHubbub 
> * ACLs 
> * basic authentication
> I want to do this because when building web applications that talks directly 
> to ZooKeeper a REST API it's a lot easier to use (there is no protocol 
> mismatch) than an API that uses persistent connections. I plan to use the 
> improved version to build a web-based administrative interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.