{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/19737","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19737/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19737/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19737/events","html_url":"https://github.com/elastic/elasticsearch/issues/19737","id":168843198,"number":19737,"title":"Rename TransportXXXAction classes to XXXTransportAction","user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/non-issue","name":"non-issue","color":"cfcfcf"}],"state":"open","locked":false,"assignee":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"assignees":[{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-08-02T09:48:22Z","updated_at":"2016-08-02T15:04:40Z","closed_at":null,"body":"Just a proposal here. Feel free to close if non sense.\r\n\r\nWe have today the following classes for actions:\r\n\r\n* `XXXAction`\r\n* `XXXRequest`\r\n* `XXXRequestBuilder`\r\n* `XXXResponse`\r\n* `TransportXXXAction`\r\n\r\nWhen you try to reduce the number of packages, let say for a plugin for example, you might want to put all your actions within the same package. For example, see the [reindex plugin](https://github.com/elastic/elasticsearch/tree/master/modules/reindex/src/main/java/org/elasticsearch/index/reindex):\r\n\r\nIt has (skipping non related classes):\r\n\r\n```\r\n├── DeleteByQueryAction.java\r\n├── DeleteByQueryRequest.java\r\n├── DeleteByQueryRequestBuilder.java\r\n├── ReindexAction.java\r\n├── ReindexRequest.java\r\n├── ReindexRequestBuilder.java\r\n├── RestDeleteByQueryAction.java\r\n├── RestReindexAction.java\r\n├── RestRethrottleAction.java\r\n├── RestUpdateByQueryAction.java\r\n├── RethrottleAction.java\r\n├── RethrottleRequest.java\r\n├── RethrottleRequestBuilder.java\r\n├── TransportDeleteByQueryAction.java\r\n├── TransportReindexAction.java\r\n├── TransportRethrottleAction.java\r\n├── TransportUpdateByQueryAction.java\r\n├── UpdateByQueryAction.java\r\n├── UpdateByQueryRequest.java\r\n├── UpdateByQueryRequestBuilder.java\r\n```\r\n\r\nAs a developer, I have to scroll up and down every time when I want to open the TransportAction associated with a given Action.\r\n\r\nThe proposal is to rename `TransportXXXAction` to `XXXTransportAction` so all those related classes will be grouped all together.\r\n\r\nThoughts?\r\n\r\nDepending on the result of this discussion, we can also imagine a follow up for `RestXXXAction` which could become `XXXRestAction`.\r\nThe previous example would become:\r\n\r\n```\r\n├── DeleteByQueryAction.java\r\n├── DeleteByQueryRequest.java\r\n├── DeleteByQueryRequestBuilder.java\r\n├── DeleteByQueryRestAction.java\r\n├── DeleteByQueryTransportAction.java\r\n├── ReindexAction.java\r\n├── ReindexRequest.java\r\n├── ReindexRequestBuilder.java\r\n├── ReindexRestAction.java\r\n├── ReindexTransportAction.java\r\n├── RethrottleAction.java\r\n├── RethrottleRequest.java\r\n├── RethrottleRequestBuilder.java\r\n├── RethrottleRestAction.java\r\n├── RethrottleTransportAction.java\r\n├── UpdateByQueryAction.java\r\n├── UpdateByQueryRequest.java\r\n├── UpdateByQueryRequestBuilder.java\r\n├── UpdateByQueryRestAction.java\r\n├── UpdateByQueryTransportAction.java\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/236933312","html_url":"https://github.com/elastic/elasticsearch/issues/19737#issuecomment-236933312","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19737","id":236933312,"user":{"login":"javanna","id":832460,"avatar_url":"https://avatars.githubusercontent.com/u/832460?v=3","gravatar_id":"","url":"https://api.github.com/users/javanna","html_url":"https://github.com/javanna","followers_url":"https://api.github.com/users/javanna/followers","following_url":"https://api.github.com/users/javanna/following{/other_user}","gists_url":"https://api.github.com/users/javanna/gists{/gist_id}","starred_url":"https://api.github.com/users/javanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javanna/subscriptions","organizations_url":"https://api.github.com/users/javanna/orgs","repos_url":"https://api.github.com/users/javanna/repos","events_url":"https://api.github.com/users/javanna/events{/privacy}","received_events_url":"https://api.github.com/users/javanna/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T15:04:40Z","updated_at":"2016-08-02T15:04:40Z","body":"I've always referred to these classes in my head as the \"transport actions\" as opposed to the \"rest actions\". The latter is the code executed on the rest layer which then delegates to the former, which is the corresponding action that executes on the transport layer. That's why I don't read \"transport\" as a verb and I would be in favour of the proposed rename.\r\n\r\nAnd the fact that it would help keeping classes for the same api closer rather than far apart is a plus too."}}
{"actor":{"display_login":"javanna"}}