{"id":16388668,"url":"https://github.com/phact/dse-linearization","last_synced_at":"2026-06-12T23:32:31.456Z","repository":{"id":71205783,"uuid":"149526883","full_name":"phact/dse-linearization","owner":"phact","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-08T14:07:38.000Z","size":4781,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T15:58:32.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phact.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-20T00:09:23.000Z","updated_at":"2018-11-27T18:18:40.000Z","dependencies_parsed_at":"2023-06-27T02:41:37.793Z","dependency_job_id":null,"html_url":"https://github.com/phact/dse-linearization","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phact/dse-linearization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fdse-linearization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fdse-linearization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fdse-linearization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fdse-linearization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phact","download_url":"https://codeload.github.com/phact/dse-linearization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fdse-linearization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34266915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T04:29:38.128Z","updated_at":"2026-06-12T23:32:31.426Z","avatar_url":"https://github.com/phact.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DSE Linearization (LWT) Ledgers\n\n\nThe purpose of this asset is to help users quantify the performance impact of using LWTs for a banking ledger use case that requires linearizable transactions.\n\n### Motivation\n\nLightWeight Transactions are a feature in DSE that allow developers to enforce transaction linearization at the database. This functionality can be useful in use cases where this kind of isolation is needed, however the guarantee comes at a cost in terms of performance. Specifically, all LWT transactions will be slower than its non LWT counterpart (which rely on Last Write Wins semantics). Furthermore, partition contention (multiple parallel operations against the same partition) will create further performance slowdowns.\n\nDepending on the SLAs for a particular use case, using LWTs may or may not be a good option. By informing users with real data, this asset helps show the tradeoffs of LWTs under different levels of partition contention to help determine if LWTs are the right option.\n\n### What is included?\n\nThis field asset (demo) includes the following:\n\n* EBDSE Activity for ledger transactions using LWTs\n* Studio Notebook with queries and explanations\n* Deck.gl powered UI for visualizing transactions\n\n### Business Take Aways\n\nSome use cases require linearization / isolation. Examples include inventory management (cannot sell more items than what we have in stock), user registration (cannot give the same user name to two individuals), accounting ledgers (non idempotent accounting operations must be executed in sequence and exactly once to avoid errors in the balance).\nOften, DSE users encounter these types of use cases when migrating off mainframes.\n\n### Technical Take Aways\n\nMany techniques to deal with the need for linearization in distributed systems include writing complex application side logic and routing.\nUsing LWTs gives linearization guarantees at the database level with a performance cost.\nEBDSE allows users to test realistic workloads with LWTs under different levels of partitoin contention and determine if LWTs are a viable aproach given specific requirements.\n\nRequirements to keep in mind include:\n\n* SLAs - read and write P99's\n* Throughput in ops per second\n* Partition contention at peak (worst case scenario concurrent requests against the same key)\n* Do reads need to be linearizable as well or just writes?\n* Consistency and availability requirements of the LWT (LOCAL or GLOBAL)\n\nNote, there exist SERIAL and LOCAL_SERIAL Consistency Levels as well as a Serial Consistency Levels.\n\nFor local consistency (enforced serialization within the local DC) use CL LOCAL_SERIAL for LWT Reads and use CL LOCAL_QUORUM and Serial CL LOCAL_SERIAL for LWT Writes\n\nFor global consistency (enforced serialization accross DCs) use CL SERIAL for LWT Reads and use CL QUORUM and Serial CL SERIAL for LWT Writes\n\nGlobal is significantly more expensive than local, this asset helps determine how much.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphact%2Fdse-linearization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphact%2Fdse-linearization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphact%2Fdse-linearization/lists"}