{"action":"opened","issue":{"url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/issues/14","labels_url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/issues/14/comments","events_url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/issues/14/events","html_url":"https://github.com/akka/akka-persistence-dynamodb/issues/14","id":129992264,"number":14,"title":"proposal for more efficient replays","user":{"login":"rkuhn","id":470469,"avatar_url":"https://avatars.githubusercontent.com/u/470469?v=3","gravatar_id":"","url":"https://api.github.com/users/rkuhn","html_url":"https://github.com/rkuhn","followers_url":"https://api.github.com/users/rkuhn/followers","following_url":"https://api.github.com/users/rkuhn/following{/other_user}","gists_url":"https://api.github.com/users/rkuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/rkuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkuhn/subscriptions","organizations_url":"https://api.github.com/users/rkuhn/orgs","repos_url":"https://api.github.com/users/rkuhn/repos","events_url":"https://api.github.com/users/rkuhn/events{/privacy}","received_events_url":"https://api.github.com/users/rkuhn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/milestones/1","html_url":"https://github.com/akka/akka-persistence-dynamodb/milestones/1.0","labels_url":"https://api.github.com/repos/akka/akka-persistence-dynamodb/milestones/1/labels","id":1551891,"number":1,"title":"1.0","description":"","creator":{"login":"rkuhn","id":470469,"avatar_url":"https://avatars.githubusercontent.com/u/470469?v=3","gravatar_id":"","url":"https://api.github.com/users/rkuhn","html_url":"https://github.com/rkuhn","followers_url":"https://api.github.com/users/rkuhn/followers","following_url":"https://api.github.com/users/rkuhn/following{/other_user}","gists_url":"https://api.github.com/users/rkuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/rkuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkuhn/subscriptions","organizations_url":"https://api.github.com/users/rkuhn/orgs","repos_url":"https://api.github.com/users/rkuhn/repos","events_url":"https://api.github.com/users/rkuhn/events{/privacy}","received_events_url":"https://api.github.com/users/rkuhn/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":1,"state":"open","created_at":"2016-01-29T19:35:18Z","updated_at":"2016-01-30T14:31:29Z","due_on":"2016-02-11T23:00:00Z","closed_at":null},"comments":0,"created_at":"2016-01-30T14:31:29Z","updated_at":"2016-01-30T14:31:29Z","closed_at":null,"body":"The current scheme tries to avoid hot partition keys by going to the far end of the spectrum: every event is stored separately. It might be better to colocate contiguous parts of the log up to a given size, say 1000 events. This means that the partition key should include `sequenceNr / 1000` and within that a sort key is used that reads `sequenceNr % 1000`. This allows the lowest and highest sequence number to be stored in a central item since it only needs to be updated every 1000 events—the precise value is then assembled by a read of this item and a query of the partition it points to.\n\n@sclasen WDYT?\n\nThis can of course only be implemented if the answer to #13 is “no”."}}