{"id":17950280,"url":"https://github.com/reubenbond/fabrictableservice","last_synced_at":"2025-03-25T00:31:13.823Z","repository":{"id":139345209,"uuid":"47366523","full_name":"ReubenBond/FabricTableService","owner":"ReubenBond","description":"Distributed database on Service Fabric which uses ESENT as the storage engine","archived":false,"fork":false,"pushed_at":"2015-12-03T23:46:14.000Z","size":86,"stargazers_count":17,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T05:24:57.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReubenBond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-03T23:04:59.000Z","updated_at":"2023-08-29T10:39:29.000Z","dependencies_parsed_at":"2023-03-14T04:15:27.057Z","dependency_job_id":null,"html_url":"https://github.com/ReubenBond/FabricTableService","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenBond%2FFabricTableService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenBond%2FFabricTableService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenBond%2FFabricTableService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenBond%2FFabricTableService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReubenBond","download_url":"https://codeload.github.com/ReubenBond/FabricTableService/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245377912,"owners_count":20605374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T09:38:31.904Z","updated_at":"2025-03-25T00:31:13.040Z","avatar_url":"https://github.com/ReubenBond.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Service Fabric Table Service\nAn ESENT-based database on Service Fabric. Demonstrates how to write a distributed, reliable database which uses Service Fabric for replication.\n\nThe `ReliableTable\u003cTKey, TValue\u003e` class can take part in transactions along with Service Fabric's existing `IReliableDictionary` \u0026 `IReliableQueue` providers.\n\n## Suggestions welcome via [Twitter: @ReubenBond](https://twitter.com/reubenbond) or GH issues :)\n\n## Example:\n\nIn your StatefulService's `RunAsync` method, obtain a reference to a table:\n```C#\nvar journal = await this.StateManager.GetOrAddAsync\u003cReliableTable\u003cstring, byte[]\u003e\u003e(\"journal\");\n```\nThen, access the table from one of your service's methods like so \n```C#\npublic async Task Insert(string key, string partition, byte[] value)\n{\n\tusing (var tx = this.StateManager.CreateTransaction())\n\t{\n\t\tjournal.SetValue(tx, key, value);\n\t\tawait tx.CommitAsync();\n\t}\n}\n```\n## Ideas for improvement:\n* Use a wholly managed database to avoid calls into native code.\n* Alternatively: chunkify the marshalling via a native library.\n* Use ProtoBuf for serialization of operations, instead of manual binary serialization.\n* Profile \u0026 improve performance.\n\nFor a higher performance database, implement the `IStateProvider2` interface manually and replicate the database journal instead of the application-level operations (is that possible with ESENT?). This implementation uses the `TransactionalReplicator` from Service Fabric, which maintains its own transaction log, ESENT also maintains a transaction log internally, so there is a duplication of effort.\n\nI give zero guarantees about any of this.\n\nCredits to [ManagedEsent](https://managedesent.codeplex.com/) which this project borrows from and leverages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenbond%2Ffabrictableservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubenbond%2Ffabrictableservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenbond%2Ffabrictableservice/lists"}