{"id":19370098,"url":"https://github.com/bustle/realtime-model","last_synced_at":"2026-06-20T07:31:12.581Z","repository":{"id":27082165,"uuid":"30548871","full_name":"bustle/realtime-model","owner":"bustle","description":null,"archived":false,"fork":false,"pushed_at":"2015-02-07T05:04:07.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-02-24T14:24:00.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bustle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-09T17:37:53.000Z","updated_at":"2015-06-11T00:41:18.000Z","dependencies_parsed_at":"2022-09-02T02:41:37.731Z","dependency_job_id":null,"html_url":"https://github.com/bustle/realtime-model","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bustle/realtime-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bustle%2Frealtime-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bustle%2Frealtime-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bustle%2Frealtime-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bustle%2Frealtime-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bustle","download_url":"https://codeload.github.com/bustle/realtime-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bustle%2Frealtime-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34561766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T08:14:13.840Z","updated_at":"2026-06-20T07:31:12.566Z","avatar_url":"https://github.com/bustle.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"RealtimeModel - Minimalist Redis Backed Object Modeling\n=======================================================\n\nRealtimeModel is a minimalist Persistant Object Model that uses Redis. It doesn't attempt to provide all of \nthe magic of ActiveRecord, but it does support has_one and has_many relationships. The main difference between \nRealtimeModel and other Redis-backed ORM's is that RealtimeModel attribute values are persisted as soon as \nthey are set -- there is no 'save' method. This is to preserve the atomicity that makes it useful to use\nRedis for persistence in the first place. Every model has a version attribute that gets incremented whenever \nthere's a change to one of its attributes or to the structure of one of its associations.\n\n## Getting Started\nIn your Gemfile:\n\n    gem \"realtime_model\"\n\nDefining a model:\n\n    class Race\n      include RealtimeModel\n      rt_attr   :name,  as: String\n      rt_attr   :laps,  as: Integer\n      has_many  :cars', as: Car # Car must include RealtimeModel\n    end\n\n    class Car\n      include RealtimeModel\n      rt_attr :team,    as: String, index: true\n      rt_attr :speed,   as: Float\n      has_one :driver,  as: Driver # Driver must include RealtimeModel\n    end\n\n    class Driver\n      include RealtimeModel\n      rt_attr :first_name,  as: String, index: true\n      rt_attr :last_name,   as: String, index: true\n      rt_attr :team,        as: String, index: true\n    end\n\n## Creating\n\n    race = Race.new(name: \"Australian Grand Prix\")\n\n## Finding\n\nFind by id\n\n    car = Car.find(1)\n\nFind using indexed attributes\n\n    ferrari_driver = Driver.find(team: 'Ferrari')\n    sauber_drivers = Driver.find_all(team: 'Sauber')\n\n## Updating\n\nWith an instance\n\n    car = Car.find(1)\n    car.speed = 300.0 # no need to call car.save\n\n## Deleting\n\n    car = Car.find(1)\n    car.delete\n\n## Adding to a collection\n    \n    race.cars \u003c\u003c car\n    race.cars.insert(position, car)\n\n## Moving items in a collection\n\n    race.cars.move_to(position, item)\n\n## Removing from a collection\n  \n    race.cars.remove(car)\n    race.cars.remove_at(position)\n\n## Requirements\n\n    redis-objects","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbustle%2Frealtime-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbustle%2Frealtime-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbustle%2Frealtime-model/lists"}