You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2011/03/03 06:31:37 UTC

[jira] Created: (WHIRR-245) Clearly demarcate the user and service provider APIs

Clearly demarcate the user and service provider APIs
----------------------------------------------------

                 Key: WHIRR-245
                 URL: https://issues.apache.org/jira/browse/WHIRR-245
             Project: Whirr
          Issue Type: Improvement
            Reporter: Tom White
            Assignee: Tom White


Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006290#comment-13006290 ] 

Tom White commented on WHIRR-245:
---------------------------------

> Regarding o.a.w.service.actions though, I think actions are better placed in o.a.w.actions as they act on the cluster and on multiple services much like Service now acts on multiple services.

I agree. I think ClusterAction should be moved to org.apache.whirr for the same reason.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002739#comment-13002739 ] 

David Alves commented on WHIRR-245:
-----------------------------------

+1 with one exception.

I think most suggested changes are great, the codebase is getting a bit disorganized.

Regarding o.a.w.service.actions though, I think actions are better placed in o.a.w.actions as they act on the cluster and on multiple services much like Service now acts on multiple services.


> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001873#comment-13001873 ] 

Tom White commented on WHIRR-245:
---------------------------------

I suggest that the user-facing API moves to org.apache.whirr, and the API for writing services goes in org.apache.whirr.service and subpackages. This would be a breaking change, so we should try to do this sooner rather than later.

More specifically:

* Move the client API (Cluster, ClusterSpec, RolePredicates, Service, ServiceFactory) from the org.apache.whirr.service package to the org.apache.whirr package.
* Rename Service(Factory) to ClusterController(Factory). Rationale: since WHIRR-117 Service has been able to start one or more services on a cluster, so it's misnamed now; also it's really about interacting with a cluster, not a service.
* Rename org.apache.whirr.cluster.actions to org.apache.whirr.service.actions so its associated more closely with the classes in org.apache.whirr.service.
* Move org.apache.whirr.net and org.apache.whirr.ssh to org.apache.whirr.service.util to emphasise that these are utility classes for services.
* Consider moving classes in org.apache.whirr.service.jclouds to org.apache.whirr.service since the distinction isn't clearcut or particularly useful for service implementors.

Would org.apache.whirr.service be better named org.apache.whirr.spi to clearly indicate it's a Service Provider Interface? I was tending towards org.apache.whirr.service since the services (Hadoop, HBase, etc) are all under that package.

Thoughts?

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White resolved WHIRR-245.
-----------------------------

    Resolution: Fixed

I've just committed this.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.sh, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White updated WHIRR-245:
----------------------------

    Fix Version/s: 0.5.0

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White updated WHIRR-245:
----------------------------

    Attachment: WHIRR-245.patch

A new patch that fixes all these issues. I will commit it soon.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.sh, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White updated WHIRR-245:
----------------------------

    Attachment: WHIRR-245.sh
                WHIRR-245.patch

I've now written a script to do the moves for this change (including moving ClusterAction to org.apache.whirr, but leaving org.apache.whirr.service.jclouds - this can be done in another issue if needed.) To apply, run the script then apply the patch.

Now that Voldemort is in we don't have any patches for new services waiting, so it would be good to get this change in, as it is pretty wide ranging.

I'm still running tests, but would appreciate a review.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019022#comment-13019022 ] 

Andrei Savu commented on WHIRR-245:
-----------------------------------

+1 (I had to remove by hand services/../*Service.java and META-INF/services/org.apache.whirr.service.Service for cassandra, hadoop and zookeeper). Unit and ZooKeeper integration tests are passing. 

I've noticed only one small issue: all ClusterController instances are named "service". I believe it's a good idea to change this to something like "controller" but we can do it later. 

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.sh, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White updated WHIRR-245:
----------------------------

    Attachment: WHIRR-245.sh
                WHIRR-245.patch

> Do you think it's a good idea to also remove the classes that extend ClusterController / Service from each service? That code it's not used.

Yes, it's deprecated too. I've removed it in this patch.

I ran the integration tests and they passed. I think this is now ready for commit.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.patch, WHIRR-245.sh, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WHIRR-245) Clearly demarcate the user and service provider APIs

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018980#comment-13018980 ] 

Andrei Savu commented on WHIRR-245:
-----------------------------------

Looks good. Do you think it's a good idea to also remove the classes that extend ClusterController / Service from each service? That code it's not used.

> Clearly demarcate the user and service provider APIs
> ----------------------------------------------------
>
>                 Key: WHIRR-245
>                 URL: https://issues.apache.org/jira/browse/WHIRR-245
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-245.patch, WHIRR-245.sh
>
>
> Currently the user API and the API for writing services are mixed up in org.apache.whirr.service. It would be good to package them more clearly. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira