{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/12","repository_url":"https://api.github.com/repos/orientechnologies/orientdb-labs","labels_url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/12/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/12/events","html_url":"https://github.com/orientechnologies/orientdb-labs/issues/12","id":178527988,"number":12,"title":"[OEP 12] Go from \"Clusters\" to \"Shards\"","user":{"login":"smolinari","id":3314957,"avatar_url":"https://avatars.githubusercontent.com/u/3314957?v=3","gravatar_id":"","url":"https://api.github.com/users/smolinari","html_url":"https://github.com/smolinari","followers_url":"https://api.github.com/users/smolinari/followers","following_url":"https://api.github.com/users/smolinari/following{/other_user}","gists_url":"https://api.github.com/users/smolinari/gists{/gist_id}","starred_url":"https://api.github.com/users/smolinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smolinari/subscriptions","organizations_url":"https://api.github.com/users/smolinari/orgs","repos_url":"https://api.github.com/users/smolinari/repos","events_url":"https://api.github.com/users/smolinari/events{/privacy}","received_events_url":"https://api.github.com/users/smolinari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-22T05:52:38Z","updated_at":"2016-09-22T09:46:01Z","closed_at":null,"body":"**Summary:**\r\nFrom the start of ODB, the feature for the logical single unit for separation and location of data was called a \"cluster\". This was, unfortunately, an incorrect term for this concept. If, in fact, the analogy was taken from a disk operating system, where there are clusters, then the better term should have actually been \"sector\". But, this term would make even less sense, when discussing a database technology. \r\n\r\nWithin the distributed database concepts of today, a cluster is considered the entire distribution of the database. \r\n\r\nhttps://www.techopedia.com/definition/17/clustering-databases \r\n> Definition - What does Clustering mean?\r\n> \r\n> Clustering, in the context of databases, refers to the ability of several servers or instances to connect to a single database. An instance is the collection of memory and processes that interacts with a database, which is the set of physical files that actually store data.\r\n> \r\n> Clustering offers two major advantages, especially in high-volume database environments:\r\n> \r\n> Fault tolerance: Because there is more than one server or instance for users to connect to, clustering offers an alternative, in the event of individual server failure.\r\n> Load balancing: The clustering feature is usually set up to allow users to be automatically allocated to the server with the least load.\r\n\r\nThe proper term for the unit of data storage and location in a database scenario is a \"shard\". \r\n\r\nHere the definition:\r\n\r\nhttps://en.wikipedia.org/wiki/Shard_(database_architecture)\r\n\r\n>A database shard is a horizontal partition of data in a database or search engine. Each individual partition is referred to as a shard or database shard. Each shard is held on a separate database server instance, to spread load.\r\n\r\n**Goals:**\r\nThroughout the code and documentation, replace the term \"cluster\" with the term \"shard\", when referring to a single grouping of data and its location. \r\n\r\n- A class is made up of one or more shards.\r\n- A database is made up of a number of classes.\r\n- A database cluster is made up of 2 or more nodes, which can hold any number of shards.\r\n- A distributed database has sharding and shard balancing\r\n- A distributed database can only be held within one cluster of nodes. They in turn, could be distributed globally.\r\n\r\nIn the end, this change will raise the level of professionalism for OrientDB dramatically, because the docs and code logic will conform to the standard terms used for distributed database technology.\r\n\r\n**Non-Goals:**\r\nNone currently.\r\n\r\n**Success metrics:**\r\nNone currently.\r\n\r\n**Motivation:**\r\nIn order to be much more conform to today's terminology for distributed database technology, the term \"cluster\", as in \"clusters make up a class\", should be exchanged with the term \"shard\". \"shards make up a class\". This will enable new DBAs and programmers to find themselves faster within the ODB architectural landscape. It will also enable discussions around database data separation and locality and server architecture to  be less ambiguous or confusing. \r\n\r\n[In the docs, the mixup is evident, when the discussion is wrapped around clusters, as single units of data groupings and a clusters of servers doing sharding.](http://orientdb.com/docs/2.1/Distributed-Sharding.html)\r\n\r\nExample:\r\n> When a query involves multiple shards (clusters), OrientDB executes the query against all the involved server nodes (Map operation) and then merge the results (Reduce operation).\r\n\r\nThe mention of `(clusters)` shouldn't be necessary. \r\n\r\nSee also the discussion with @luigidellaquila.\r\n\r\nhttps://groups.google.com/forum/#!topic/orient-database/2_iTzne1eXo  \r\n\r\nHere a good example of the mixup in terms: https://github.com/orientechnologies/orientdb/issues/6608\r\n\r\n\r\n\r\n**Description:**\r\nSee above.\r\n\r\n**Alternatives:**\r\nNone.\r\n\r\n**Risks and assumptions:**\r\nHere is an example of ODB code with the term Cluster replaced with Shard: https://gist.github.com/smolinari/609335f498c456bd97c3ff86ad6136db\r\n\r\nIt took me all of 1 minute to replace the terms in this single file. I am not able to judge if the changes make sense directly, but it seems they would be ok.\r\n\r\nDoing the same with the docs would be just as easy, however, the changes in the docs would need to be examined a bit more in depth to be deemed correct from a comprehension standpoint. \r\n\r\nThere are already two people willing to work on the docs, including myself.\r\n\r\n**Impact matrix**\r\n\r\nNote: I added two points to the matrix below. \r\n\r\n- [ ] Storage engine\r\n- [x] SQL\r\n- [ ] Protocols\r\n- [ ] Indexes\r\n- [ ] Console\r\n- [ ] Java API\r\n- [ ] Geospatial\r\n- [ ] Lucene\r\n- [ ] Security\r\n- [ ] Hooks\r\n- [ ] EE\r\n- [x] General Code Base\r\n- [x] Documentation\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/comments/248856762","html_url":"https://github.com/orientechnologies/orientdb-labs/issues/12#issuecomment-248856762","issue_url":"https://api.github.com/repos/orientechnologies/orientdb-labs/issues/12","id":248856762,"user":{"login":"a-unite","id":2130349,"avatar_url":"https://avatars.githubusercontent.com/u/2130349?v=3","gravatar_id":"","url":"https://api.github.com/users/a-unite","html_url":"https://github.com/a-unite","followers_url":"https://api.github.com/users/a-unite/followers","following_url":"https://api.github.com/users/a-unite/following{/other_user}","gists_url":"https://api.github.com/users/a-unite/gists{/gist_id}","starred_url":"https://api.github.com/users/a-unite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-unite/subscriptions","organizations_url":"https://api.github.com/users/a-unite/orgs","repos_url":"https://api.github.com/users/a-unite/repos","events_url":"https://api.github.com/users/a-unite/events{/privacy}","received_events_url":"https://api.github.com/users/a-unite/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T09:46:01Z","updated_at":"2016-09-22T09:46:01Z","body":"+1 for `segment`"}}
{"actor":{"display_login":"a-unite"}}