{"id":18024076,"url":"https://github.com/thomasnield/rxkotlin-poc","last_synced_at":"2025-03-27T00:30:49.074Z","repository":{"id":148076081,"uuid":"92699644","full_name":"thomasnield/rxkotlin-poc","owner":"thomasnield","description":"Experimental Rx implementation in Kotlin","archived":false,"fork":false,"pushed_at":"2019-02-26T08:22:47.000Z","size":70,"stargazers_count":23,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T18:11:20.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasnield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-29T02:09:26.000Z","updated_at":"2022-07-24T09:31:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa9a5a11-64df-408c-b57f-8b8dc2dbdb56","html_url":"https://github.com/thomasnield/rxkotlin-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasnield%2Frxkotlin-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasnield%2Frxkotlin-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasnield%2Frxkotlin-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasnield%2Frxkotlin-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasnield","download_url":"https://codeload.github.com/thomasnield/rxkotlin-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760572,"owners_count":20667886,"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-10-30T07:11:50.966Z","updated_at":"2025-03-27T00:30:49.066Z","avatar_url":"https://github.com/thomasnield.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxKotlin POC\n\n**NOTE: This project is at the moment abandoned** \n\nThis is an attempt to implement Rx in pure Kotlin using Kotlin coroutines to handle concurrency and backpressure. There are only a handful of operators at the moment, and a couple loose ends need to be worked out like disposal. \n\nBut so far, it is clear there is an opportunity to create an Rx implementation in Kotlin with less effort than Java. \n\n## Jake Wharton's POC\n\nBe sure to check out Jake Wharton's Reagent POC, which is seeking to be multiplatform and a more thought-out type hierarchy. \n\nhttps://github.com/JakeWharton/Reagent/\n\n## Recommended reading to help contribute\n\n[Coroutines Guide](https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md)\n\n[Coroutines and Reactive Streams](https://github.com/Kotlin/kotlinx.coroutines/blob/master/reactive/coroutines-guide-reactive.md)\n\n## Examples\n\n```kotlin\n@Test\nfun testJust() {\n    Observable.just(\"Alpha\", \"Beta\", \"Gamma\", \"Delta\")\n            .map { it.length }\n            .filter { it \u003e= 5 }\n            .subscribe { println(it) }\n}\n\n@Test\nfun testSubscribeOn() = runBlocking {\n    Observable.just(\"Alpha\", \"Beta\", \"Gamma\", \"Delta\")\n            .subscribeOn(CommonPool)\n            .subscribe {\n                println(\"$it ${Thread.currentThread().name}\")\n            }\n}\n\n@Test\nfun testObserveOn() = runBlocking {\n    Observable.just(\"Alpha\", \"Beta\", \"Gamma\", \"Delta\")\n            .subscribeOn(CommonPool)\n            .doOnNext { println(\"$it ${Thread.currentThread().name}\") }\n            .map { it.length }\n            .observeOn(CommonPool)\n            .subscribe {\n                println(\"$it ${Thread.currentThread().name}\")\n            }\n}\n\n@Test\nfun testObservableDefer() {\n    val state = AtomicBoolean(true)\n\n    val source = Observable.defer { Observable.just(state.getAndSet(false)) }\n\n    source.subscribe { println(\"Sub 1: $it\")}\n    source.subscribe { println(\"Sub 2: $it\")}\n}\n\n@Test\nfun testRangeAndTake() {\n    Observable.range(1,10)\n            .take(5)\n            .subscribe(onNext=::println)\n}\n\n@Test\nfun testInterval() = runBlocking {\n\n    Observable.interval(1, TimeUnit.SECONDS)\n            .subscribe(onNext=::println)\n\n    delay(5000)\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasnield%2Frxkotlin-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasnield%2Frxkotlin-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasnield%2Frxkotlin-poc/lists"}