Popularity
1.4
Growing
Activity
0.5
Declining
14
1
1

Programming language: Go
License: MIT License

dynatomic alternatives and similar packages

Based on the "Distributed Systems" category.
Alternatively, view dynatomic alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of dynatomic or a related project?

Add another 'Distributed Systems' Package

README

Dynatomic

Build Status Build status Go Report Card GoDoc Coverage Status MIT license CodeFactor Mentioned in Awesome Go

Dynatomic is a library for using dynamodb as an atomic counter

Motivation

The dynatomic was written to use dynamodb as a quick and easy atomic counter.

The package tries to serve two unique use cases:

  • Unique, fast real-time writes, e.g. user visits to a page or rate limiting
  • Large number of asynchronous writes that need to be eventually consistent, e.g. API usage by a client for billing

Usage

Basic usage:

// Initialize the dynatomic backround goroutine with a batch size of 100,
// a wait time of a second, an AWS config and a function that will
// notify the user of internal errors
d := New(100, time.Second, config, errHandler)
d.RowChan <- &types.Row{...}
d.RowChan <- &types.Row{...}
d.RowChan <- &types.Row{...}
...
d.Done()

Dynamo will update accordingly.

For example if you write the rows:

Table: MyTable, Key: A, Range: A, Incr: 5
Table: MyTable, Key: A, Range: A, Incr: 5
Table: MyTable, Key: A, Range: A, Incr: 5
Table: MyTable, Key: A, Range: A, Incr: 5

Then MyTable Key A, Range A will now show a value of 20

Development

To copy the repository run:

go get github.com/tylfin/dynatomic

Then you can run the full test suite by doing:

docker-compose run dynatomic

Contributing

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug
  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it)
  3. Write a test which shows that the bug was fixed or that the feature works as expected
  4. Send a pull request and bug the maintainer until it gets merged and published


*Note that all licence references and agreements mentioned in the dynatomic README section above are relevant to that project's source code only.