Code Monkey home page Code Monkey logo

goroom's Introduction

goroom

Blog

  • For a primer on Go-Room, refer to the blog on Basic Usage
  • For a peek into the architecture, refer to the blog on Internals
  • For a guide to advanced usage, refer to the blog for Ninja Users

Brief

The primary function of Room is to ease version management and migration of databases that are created by apps on the edge devices and are tightly coupled with the version of app that creates and manages them.

Features

  • Using Room a developer can ensure that as they deliver updates to App and underlying associated Data Store they can have a smooth transition of Data Store on the edge device without risk of data loss.
  • A typical way to handle upgrades would be to create the data store from scratch again. This is not desirable if the data stored on the edge device is things like valuable insights/events recorded by the device and pending sync/upload to the server. Since data collection is a major use case of edge devices I think a version manager like Room is necessary.

Android Room

Room is inspired by its namesake in Android World which does the same thing but at a deeper level by even providing the ORM. The Room presented here is agnostic to data stores and provides flexibility to the developer on how they signal and handle schema changes.

Gotchas

  • It is purely a utility that serves the minimal purpose of carrying out migrations and verifying that DB is upto the version expected by the app currently.
  • A lot of power is still in the developers hands as they have the freedom to execute any operations on the DB themselves.
  • Doing stuff like deleting/updating Room's metadata tables is a big No-No :). Plz...

Sample

For understanding on how the migration and versioning works check examples.

How to Run Sample

To run the example which also serves as an integration test with GORM go to the examples folder and run

go test -v ./...

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.