{"id":13507865,"url":"https://github.com/alfert/reaxive","last_synced_at":"2026-02-22T14:42:35.518Z","repository":{"id":19761515,"uuid":"23019156","full_name":"alfert/reaxive","owner":"alfert","description":"Reactive Extensions for Elixir","archived":false,"fork":false,"pushed_at":"2020-01-26T15:37:55.000Z","size":285,"stargazers_count":284,"open_issues_count":3,"forks_count":8,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-04T06:03:44.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfert.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":"2014-08-16T14:05:19.000Z","updated_at":"2024-11-06T06:34:49.000Z","dependencies_parsed_at":"2022-09-26T17:00:54.567Z","dependency_job_id":null,"html_url":"https://github.com/alfert/reaxive","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfert%2Freaxive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfert%2Freaxive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfert%2Freaxive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfert%2Freaxive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfert","download_url":"https://codeload.github.com/alfert/reaxive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-01T02:00:41.484Z","updated_at":"2025-10-21T15:01:49.646Z","avatar_url":"https://github.com/alfert.png","language":"Elixir","funding_links":[],"categories":["Eventhandling"],"sub_categories":[],"readme":"# Reaxive\n\n[![Build Status](https://travis-ci.org/alfert/reaxive.svg?branch=master)](https://travis-ci.org/alfert/reaxive)\n[![Coverage Status](https://coveralls.io/repos/alfert/reaxive/badge.png?branch=master)](https://coveralls.io/r/alfert/reaxive?branch=master)\n[![hex.pm version](https://img.shields.io/hexpm/v/reaxive.svg?style=flat)](https://hex.pm/packages/reaxive)\n[![Inline docs](http://inch-ci.org/github/alfert/reaxive.svg?branch=master\u0026style=flat-square)](http://inch-ci.org/github/alfert/reaxive)\n\nReaxive is a reactive event handling library, inspired by Elm (http://elm-lang.org) and Reactive Extensions. It implements the kind of asynchronous collections José Valim talked\nabout in his keynotes on ElixirConf2014 and ElixirConfEU 2015.\n\n## Usage\n\n### Preparations\nTo use Reaxive you have to add it to your Mix dependencies\n\n```elixir\n\tdeps: [\n\t\t{:reaxive, \"~\u003e 0.1.0\"}\n\t]\n```\n\nand add the `reaxive` and the `logger` application to your required applications\n\n\tapplications: [:kernel, :reaxive, :logger]\n\n### Using Reaxive\n\nNow you can use Reaxive. All the combinators are defined in the module\n`Reaxive.Rx` (see http://hexdocs.pm/reaxive/). Basically, they follow the\nnaming scheme from other reactive frameworks, such as Reactive Extensions\n(.NET), RxScala or RxJS. Hence the wonderful marble diagrams of RX (see e.g.\nhttp://rxmarbles.com/) can be used to understand the combinators' semantics.\n\n```elixir\n\talias Reaxive.Rx\n\t1..100\n\t|\u003e Rx.generate\n\t|\u003e Rx.map(\u0026(\u0026+1))\n\t|\u003e Rx.filter(\u0026Integer.is_odd/1)\n\t|\u003e Rx.as_text\n\t|\u003e Rx.sum\n```\n\nThe combinators are building a pipeline for event processing spawing new\nprocesses on-demand. Adhering to the protocol should be sufficient that these\nprocesses are automatically stopped again. This is extremely important, since otherwise\nwe get a process leak in our system which will eat up all system resources.\n\nThe protocols, which lay the foundation for Reaxive, can also be found at\nhttp://hexdocs.pm/reaxive/ .\n\n## Future Development Steps\n\nImportant tasks for the future are:\n\n* simpily and streamline the implementation\n* add more of the missing combinators\n* develop a concept of when and how to integrate with OTP Supervision\n* gain experience of using in Reaxive, .e.g by applying to Phoenix Channels\n* apply property based testing (using PropEr?)\n* apply the dialyzer\n\n## History\nThe v0.1.0 series supports Elixir 1.1.0 and later.\n\nIn the v0.0.3 series, we introduce cancellable generators. We also implement\nJosé Valim's `async` operator to break a synchronous pipeline into\nasynchronuous pieces\n\nSubjects are a re-implementation of `Rx.Impl`. Major ideas:\n\n* separate subscription handling from event handling\n* subscriptions\n  * implement the boolean predicate `is_unsubscribed` as shown in the slides\n  * functions for adding and removing subscribers from a subscription\n* can subscriptions be implemented without a `GenServer`?\n* event handling should be done in a pure functional setting with explicit accumulators\n  * Re-use `compose` and the `Rx.Sync` functions as combinators\n  * combinators operate on a `Observeable`\n  * Send composed events to subscribers\n* we need a better mechanism to automatically stop processes or to detect that\n  they not running any more (==\u003e monitoring or providing a general abstraction for\n  calling functions on not-existing gen-servers)\n\n\n\nThe first code version (v0.0.1) has conceptual problems which showed up during testing.\nAs any observable lives in its own  process, we have maxium of concurrency.\nThis results in pushing events from the front while later transformations are\nnot properly setup. Due to this, some of the first events may be swallowed and\ndisappear, so the tests fail because not all events are piped through the\nentire sequence of transformation.\n\nThe code v0.0.2 series is a major rework that implements ideas of\n\n* http://www.introtorx.com\n* http://go.microsoft.com/fwlink/?LinkID=205219\n\nand also inspired by Clojure's transducers introduced by Rich Hickey\n\n* http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming\n* http://clojure.org/transducers\n\n\n## Contributing\n\nPlease use the GitHub issue tracker for\n\n* bug reports and for\n* submitting pull requests\n\n## License\n\nReaxive is provided under the Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfert%2Freaxive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfert%2Freaxive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfert%2Freaxive/lists"}