{"id":13412543,"url":"https://github.com/tylfin/dynatomic","last_synced_at":"2025-04-25T22:31:01.708Z","repository":{"id":56501293,"uuid":"169774914","full_name":"tylfin/dynatomic","owner":"tylfin","description":"Dynatomic is a library for using dynamodb as an atomic counter","archived":false,"fork":false,"pushed_at":"2020-11-04T16:28:08.000Z","size":380,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:51:06.534Z","etag":null,"topics":["async","atomic","aws","concurrent","counter","dynamodb","golang","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tylfin.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":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-02-08T17:45:14.000Z","updated_at":"2024-05-14T08:22:00.000Z","dependencies_parsed_at":"2022-08-15T20:00:18.598Z","dependency_job_id":null,"html_url":"https://github.com/tylfin/dynatomic","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/tylfin%2Fdynatomic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylfin%2Fdynatomic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylfin%2Fdynatomic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylfin%2Fdynatomic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylfin","download_url":"https://codeload.github.com/tylfin/dynatomic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019444,"owners_count":17242167,"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":["async","atomic","aws","concurrent","counter","dynamodb","golang","sync"],"created_at":"2024-07-30T20:01:25.914Z","updated_at":"2024-11-10T21:40:44.442Z","avatar_url":"https://github.com/tylfin.png","language":"Go","readme":"# Dynatomic\n\n[![Build Status](https://travis-ci.org/tylfin/dynatomic.svg?branch=master)](https://travis-ci.org/tylfin/dynatomic)\n[![Build status](https://ci.appveyor.com/api/projects/status/g58owqmdpumqsmxq/branch/master?svg=true\u0026passingText=Windows%20-%20OK)](https://ci.appveyor.com/project/tylfin/dynatomic/branch/master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tylfin/dynatomic)](https://goreportcard.com/report/github.com/tylfin/dynatomic)\n[![GoDoc](https://godoc.org/github.com/tylfin/dynatomic/pkg/dynatomic?status.svg)](https://godoc.org/github.com/tylfin/dynatomic/pkg/dynatomic)\n[![Coverage Status](https://coveralls.io/repos/github/tylfin/dynatomic/badge.svg)](https://coveralls.io/github/tylfin/dynatomic)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![CodeFactor](https://www.codefactor.io/repository/github/tylfin/dynatomic/badge)](https://www.codefactor.io/repository/github/tylfin/dynatomic)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)  \n\nDynatomic is a library for using dynamodb as an atomic counter\n\n- [Dynatomic](#dynatomic)\n  - [Motivation](#motivation)\n  - [Usage](#usage)\n  - [Development](#development)\n  - [Contributing](#contributing)\n\n## Motivation\n\nThe dynatomic was written to use dynamodb as a quick and easy atomic counter.\n\nThe package tries to serve two unique use cases:\n\n- Unique, fast real-time writes, e.g. user visits to a page or rate limiting\n- Large number of asynchronous writes that need to be eventually consistent, e.g. API usage by a client for billing\n\n## Usage\n\nBasic usage:\n\n```golang\n// Initialize the dynatomic backround goroutine with a batch size of 100,\n// a wait time of a second, an AWS config and a function that will\n// notify the user of internal errors\nd := New(100, time.Second, config, errHandler)\nd.RowChan \u003c- \u0026types.Row{...}\nd.RowChan \u003c- \u0026types.Row{...}\nd.RowChan \u003c- \u0026types.Row{...}\n...\nd.Done()\n```\n\nDynamo will update accordingly.\n\nFor example if you write the rows:\n\n```bash\nTable: MyTable, Key: A, Range: A, Incr: 5\nTable: MyTable, Key: A, Range: A, Incr: 5\nTable: MyTable, Key: A, Range: A, Incr: 5\nTable: MyTable, Key: A, Range: A, Incr: 5\n```\n\nThen MyTable Key A, Range A will now show a value of 20\n\n## Development\n\nTo copy the repository run:\n\n```golang\ngo get github.com/tylfin/dynatomic\n```\n\nThen you can run the full test suite by doing:\n\n```bash\ndocker-compose run dynatomic\n```\n\n## Contributing\n\n1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug\n2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it)\n3. Write a test which shows that the bug was fixed or that the feature works as expected\n4. Send a pull request and bug the maintainer until it gets merged and published\n","funding_links":[],"categories":["Distributed Systems","Relational Databases","分布式系统"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","SQL 查询语句构建库","检索及分析资料库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylfin%2Fdynatomic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylfin%2Fdynatomic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylfin%2Fdynatomic/lists"}