[ 
https://issues.apache.org/jira/browse/CASSANDRASC-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090131#comment-17090131
 ] 

Yifan Cai commented on CASSANDRASC-17:
--------------------------------------

At the first glance, I liked the APIs design of nesting resources, i.e. 
{{/nodes/:nodeId/resources1/:id1/more}}. The URI schema speaks the relationship 
between the resources for itself. For example, fetch SSTable from node 1 can be 
represented by {{GET /nodes/1/sstables/:path_to_file}}

However, the above sidecar API fails if there is a need for operations that 
want to be performed on all the C* nodes managed by this sidecar. Because the 
API only point to 1 of the node. In this case, a new API has to be introduced, 
e.g. {{GET /sstables/:path_to_file}}, which gets rid of the nodes part. For 
each API, there is a across nodes API variant to be added. 

A large number of APIs could harm the service.

If expecting across-nodes operation use cases, having the params could be more 
elegant. When param is present, it filters to the wanted node; otherwise, it is 
across all the nodes. For instance, fetch SSTable from node 1 is {{GET 
/sstables/:path_to_file?nodeId=1}}. fetch SSTable from all nodes {{GET 
/sstables/:path_to_file}} (The example is not great)

> Ensure sidecar can control multiple Cassandra instances
> -------------------------------------------------------
>
>                 Key: CASSANDRASC-17
>                 URL: https://issues.apache.org/jira/browse/CASSANDRASC-17
>             Project: Sidecar for Apache Cassandra
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Jon Haddad
>            Priority: Normal
>
> Since we can run multiple hosts per node, we should allow a single sidecar 
> process to control multiple Cassandra nodes.
> I am not sure if we should encode the id of the node in the URL or as a 
> parameter that would have to be present in every request if using > 1 node.  
> I lean towards the latter - meaning it’s a slight inconvenience for a very 
> small group, rather than messing with the URL scheme for everyone else.  I 
> don’t hold this opinion very strongly though.  I’d like to discuss before 
> doing any work here.  
> Thoughts?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to