[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-05-07 Thread Mahadev konar (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12707146#action_12707146
 ] 

Mahadev konar commented on ZOOKEEPER-36:


this looks pretty good 

just two minor nits 

- can you add licence header to SPEC.txt?
- also some javadoc to ZookeeperService.java?



 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest.tar.gz, rest.tar.gz, rest.tar.gz, SPEC.txt, 
 SPEC.txt, SPEC.txt, SPEC.txt


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-27 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12703408#action_12703408
 ] 

Hadoop QA commented on ZOOKEEPER-36:


-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12406569/rest.tar.gz
  against trunk revision 769079.

+1 @author.  The patch does not contain any @author tags.

-1 tests included.  The patch doesn't appear to include any new or modified 
tests.
Please justify why no tests are needed for this patch.

-1 patch.  The patch command could not apply the patch.

Console output: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/51/console

This message is automatically generated.

 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest.tar.gz, rest.tar.gz, SPEC.txt, SPEC.txt, SPEC.txt


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-22 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12701616#action_12701616
 ] 

Patrick Hunt commented on ZOOKEEPER-36:
---

Thanks for further input Chris, really appreciate you giving insight. I'm not 
an expert at REST so 
please feel free.

WRT webdav - jersey has support for webdav being developed. I think it makes 
sense to have
webdav client support (it's in windows for example) at some point. I'm focusing 
on rest initially in
order to cover as many dev environments (scripting in particular) and developer 
experience
as possible (devs more expr with rest than webdav typically)

Also, I'm not sure how well zk fits into webdav given that we store data on 
znodes that can
act as either directories or files. Perhaps we just need a phantom file that 
represents the data
associated with a non-leaf znode. 

I did think about MKCOL initially, actually I was thinking of using it even in 
this JIRA, but in the end
decided not to in order to stick within the confines of std REST.


 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz, SPEC.txt


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-16 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12699890#action_12699890
 ] 

Patrick Hunt commented on ZOOKEEPER-36:
---

Chris thanks for reviewing this. In particular I think it's important both for 
users as well as implementors (interop) to have a clear spec.

/foo and /foo/ were considered, but imo this is pretty hacky and prone to error 
(both user and potentially intermediate actors like proxies...) Perhaps my 
search background showing through - url canonicalization often ignores the 
trailing slash.

/foo and /foo/* were also considered, this is a bit better imo (you might also 
support things like /foo/*/bar, yikes! :-) )

EOD I think it makes more sense to be explicit. it's not as clean but it 
allows us to follow
the HTTP spec and it's more obvious what's going on when reading the client 
code that uses the REST service (even if you haven't read the spec 
view=children is going to be more obvious than trailing/non-trailing slash).




 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz, SPEC.txt


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-15 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12699419#action_12699419
 ] 

Patrick Hunt commented on ZOOKEEPER-36:
---

Thanks for the input Chris. I think I'm going to stick with Java though. ;-)

At the same time it would be interesting to have what you've done available in 
contrib. If you'd
be willing to put together a patch for contrib we could include it. What types 
of use cases does 
this mod_* address? Any example of use?


 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-15 Thread Chris Darroch (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12699514#action_12699514
 ] 

Chris Darroch commented on ZOOKEEPER-36:


I took a quick look at the spec; nice!  I like that it follows the spirit of 
the HTTP spec in the way I envisioned.  A couple of minor thoughts:

I think it would be nice to avoid POST entirely, if only because POST is so 
over-used that it no longer has any particular meaning except send stuff to 
server.  Suppose you used the trailing slash in the URI to distinguish 
meanings?  Having hacked on mod_dir at various points this occurs to me as a 
possibility.  For example:

PUT /foo - zoo_set(/foo)
PUT /foo/ - zoo_create(/foo)

The same would work to overload GET:

GET /foo - zoo_get(/foo)
GET /foo/ - zoo_get_children(/foo)

I especially like the GET cases because they correspond nicely to how URIs are 
mapped to files and directories.

As for running code, I'm working (slowly) on a mod_zookeeper and you'll be the 
first to know if I get it to a releasable state.  The basic purpose is similar 
to mod_dbd: provide connections that other modules can use however they choose.

 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz, SPEC.txt


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-03 Thread Chris Darroch (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12695669#action_12695669
 ] 

Chris Darroch commented on ZOOKEEPER-36:


Another option might be the expand on the mod_shmap and mod_socache_zookeeper 
httpd modules I wrote a while back.  The latter maintains a ZooKeeper client 
connection for each httpd child process -- these are shared across all HTTP 
requests handled by the process, so (as with the code attached to this issue, I 
think) ephemeral nodes aren't supported, nor are ACLs, watches, etc.  The code 
is available under the Apache license at 
http://people.apache.org/~chrisd/projects/shared_map/.

The shared-map module can harness a variety of small object cache providers 
to various parts of the URL namespace and then perform GET/PUT/DELETE against 
them.  For the mod_socache_zookeeper provider these map to zoo_get(), 
zoo_set()/zoo_create(), and zoo_delete().  Nodes are created automatically when 
a PUT is made for a non-extant node.

I need to refactor mod_socache_zookeeper and create a mod_zookeeper which deals 
with the business of starting/stopping ZooKeeper connections for each httpd 
child process, something like mod_dbd does for SQL DB connections.  That will 
allow other modules to then acquire the ZK connection and make zoo_*() requests 
directly; mod_socache_zookeeper and mod_slotmem_zookeeper (yet to be written) 
then just devolve into the business of mapping URLs to specific ZK calls.

For a REST-style interface that supported things like ACLs, sequences, stat 
data, etc. one could write a separate module (mod_zookeeper_rest or whatever) 
which supports a more complex mapping than is available through just the 
socache or slotmem APIs.

However the REST interface is implemented, it would be nice, I think, to use 
HEAD - zoo_exists(), GET - zoo_get(), PUT - zoo_set()/zoo_create(), and 
DELETE - zoo_delete().  There's such a natural mapping of HTTP methods to ZK 
methods that it would seem to call out for use, as opposed to using bags of CGI 
arguments to POST requests or what have you.


 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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



[jira] Commented: (ZOOKEEPER-36) REST access to ZooKeeper

2009-04-03 Thread Chris Darroch (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12695670#action_12695670
 ] 

Chris Darroch commented on ZOOKEEPER-36:


Sorry, just to throw in a couple of additional thoughts; using httpd modules 
means all you need is a conventional Apache httpd instance.  Requests look like 
(using the current minimalistic shmap/socache modules):

{noformat}
GET /node1/node2 HTTP/1.0

DELETE /node1/node2 HTTP/1.0

PUT /node1/node3 HTTP/1.0
Content-Length: 5

12345
{noformat}

 REST access to ZooKeeper
 

 Key: ZOOKEEPER-36
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-36
 Project: Zookeeper
  Issue Type: New Feature
  Components: contrib
Reporter: Patrick Hunt
Assignee: Patrick Hunt
 Fix For: 3.2.0

 Attachments: rest_2.tar.gz


 Moved from SourceForge to Apache.
 http://sourceforge.net/tracker/index.php?func=detailaid=1961763group_id=209147atid=1008547

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