Giter Site home page Giter Site logo

andyglick / rocketdata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plivesey/rocketdata

0.0 0.0 0.0 1.54 MB

A caching and consistency solution for immutable models.

Home Page: https://plivesey.github.io/RocketData

License: Apache License 2.0

Shell 0.25% Ruby 0.24% Swift 99.51%

rocketdata's Introduction

๐Ÿš€ Data

Build Status codecov GitHub release CocoaPods

Rocket Data is a model management system with persistence for immutable models.

Motivation

Immutability has many benefits, but keeping models consistent and making changes is difficult. This library manages the consistency and caching of immutable models. It is intended to be an ideal replacement for Core Data. However, unlike Core Data, it does not block the main thread and does not crash whenever you do something slightly incorrect (see Core Data Comparison). In most setups, the backing cache does not need a schema, and you never need to add migration logic.

Scale

Rocket Data scales extremely well to large numbers of models and data providers. Since it does nearly all of its work on a background thread, you never need to worry about one change slowing down the whole application. You can also choose to stop listening to changes when a view controller is off screen to further increase performance.

The library is optimized for applications that fetch data from an external source, display it on the device, and allow the user to perform actions on this data. It implements an easy model for synchronizing this data in-memory between view controllers and with the cache.

Bring Your Own Cache

With Rocket Data, you can choose your own caching solution. We recommend a fast key-value store, but you can use any store you can imagine. This also makes it easy to add LRU eviction.

Installation

Installation via both CocoaPods and Carthage is supported.

CocoaPods

Add this to your Podspec:

pod 'RocketData'

Then run pod install.

Carthage

Add this to your Cartfile:

github "plivesey/RocketData"

Then run carthage update RocketData --platform ios

NOTE: Currently, --platform ios is necessary for some reason. We are investigating the issue.

Swift Version

We are currently not maintaining separate branches for different Swift versions. You can use an older version of Rocket Data for older versions of Swift though. HEAD currently supports Swift 4.2.

Swift Version Rocket Data Version
1 Not supported
2.0 - 2.1 1.x.x (untested)
2.2 1.x.x
2.3 (Cocoapods) 1.x.x
2.3 (Carthage) 1.2.0
3 (Easy migration API) 2.0.0
3 (Better API) 4.x.x
4 5.x.x
4.2 7.x.x

NOTE: If you are migrating to Swift 3, consider using version 2.0.0 first, then migrating to 3.x.x. 3.0.0 migrates the code to the new syntax without making any API changes. 3.x.x introduces a better API which is more consistent with the new Swift 3 API guidelines.

Documentation

To get started, you should take a look at the docs.

Consistency Manager

Rocket Data uses ConsistencyManager to manage the in-memory consistency of models. While you never need to access the Consistency Manager directly, understanding how it works will help you understand Rocket Data.

rocketdata's People

Contributors

plivesey avatar hebertialmeida avatar dustin-shean-linkedin avatar elijahdou avatar nicksnyder avatar priteshshah1983 avatar ashitikov avatar deepanchor avatar ermik avatar heitorfr avatar katalisha avatar pgherveou 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.