What is SSD?
SSD (Simply-Smart-Data) is an append-only, file-based, immutable key-value store for Microservices written in Ruby.
Key Features
- Scalable file-based design (each key gets its own file).
- Immutable (timestamped inserts as accountants don't use erasers, otherwise they go to jail).
- Fault tolerance (transactional operations).
- Measurably low technical debt (consciously clean small-sized library that wouldn't complect your codebase).
- Zero external dependencies.
- Schemaless (easily meets your Application evolution needs).
- Append-only (easily keeps track of Applications Data timeline).
- Key-based rolling-forward\rolling-back.
- Super easy to learn and use (up & running in mins).
TODO
- Strict Security-first policy SHA256 Encryption (implment your own logging for intercepting keys required for decrypting data).
- JSON objects (based on ruby's native pstore).
- RESTful HTTP/JSON API Endpoint.
- REPL console
- Server Web-based Admin Interface
Use Cases
SSD is carefully crafted to scale specially-well with the Microservies Architeturual Pattern to allow providing storage for independently deployable services with ease.
Usage
module MyApp
class User
include SSD
attr_accessor :id # ssd key
def initialize id
@ssd = id
end
end
class API < Sinatra::Base
get '/' do
@user = User.new("generated_id") # Initialize an object form any Class that `include SSD` and assign it a :ssd key
@user.append! # Do an `append!` operation and viola! DONE
@user = User.ssd("generated_id") # Afterwards read it via Class.ssd(:ssd)
end
end
end
Concerns FAQs
Asynchronous I/O [https://en.wikipedia.org/wiki/Asynchronous_I/O]
Other Alternatives
- ArangoDB [https://www.arangodb.com/].
- Persistent [https://github.com/ismasan/persistent].
- CouchDB [http://couchdb.apache.org/].
- DataMapper [http://github.com/datamapper/dm-core/tree/master].
- Persistable [http://github.com/andykent/persistable/tree/master].
- Stone [http://github.com/ndemonner/stone/tree/master].
References
- The rise of append-only, immutable data stores. [http://www.pwc.com/us/en/technology-forecast/2015/remapping-database-landscape/features/assets/pwc-append-only-immutable-data-stores-rise.pdf]
- NoSQL DB. [http://nosql-database.org/]
- Anti-RDBMs. [https://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores]
- Architecture of immutable data stores. [http://www.toadworld.com/platforms/oracle/w/wiki/11548.architecture-of-immutable-data-stores]