Giter Club home page Giter Club logo

nodejs-datastore-cache's Introduction

NodeJS Datastore Cache library

npm version License

Opinionated NodeJS library for simplified google cloud datastore and cache layer interactions.

The implementation should be similar to the official datastore client go version, because this is the only implementation that actually make sense and can be consistent across languages and frameworks.

Introduction

The library provides a DataClient abstraction to access datastore and/or cached data:

  • Data get calls will set the cache
  • Data set calls will delete the cache
  • Data delete calls will delete the cache

The library can use cache (but does not have to):

  • By default no cache client will be used
  • Redis client is provided by the library
  • Other cache clients can be implemented easily (see redis cache client code for example)

Dependencies

Core dependencies include:

Node version

The library is tested using NodeJS 12.x, 14.x, 15.x, 16.x.

Installation

yarn add @lum-network/nodejs-datastore-cache

Documentation

The Library documentation should contain everything you need to get started.

Development & Testing

The library requires a Google Cloud datastore and a running redis server to run the unittests.

A docker compose file is provided to simplify this process but those services can eventually be remote or launched "manually".

Datastore emulator & Redis server

docker-compose -f tools/docker-compose.yml up

Run the unittests

yarn test

Contributing

All contributions must be covered by unit tests.

  • Simply use a pull requests
  • Documentation should be updated before submitting the PR using yarn build:docs
  • Package version should be bumped by a maintainer using something like yarn bump major | minor | patch
  • Upon PR merge on master an admin must tag the merge commit using the package version (ex: v1.0.0) to trigger the release and package publish workflows

License

Apache Version 2.0

See LICENSE

nodejs-datastore-cache's People

Contributors

dependabot[bot] avatar lebascou avatar ricardo-remy avatar segfaultd avatar thibaultjrd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.