{"id":16068031,"url":"https://github.com/ged/cztop-reactor","last_synced_at":"2026-05-15T18:02:45.127Z","repository":{"id":65988001,"uuid":"85247712","full_name":"ged/cztop-reactor","owner":"ged","description":"An implementation of the Reactor pattern for ZeroMQ sockets (git mirror)","archived":false,"fork":false,"pushed_at":"2018-07-31T23:06:52.000Z","size":113,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T10:14:09.880Z","etag":null,"topics":["async","async-programming","czmq","cztop","reactor","ruby","socket-io","zeromq"],"latest_commit_sha":null,"homepage":"https://bitbucket.org/ged/cztop-reactor","language":"Ruby","has_issues":true,"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/ged.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-03-16T22:37:56.000Z","updated_at":"2021-11-28T23:40:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"78a504ad-4f6f-4cc3-8448-4c6198c6d086","html_url":"https://github.com/ged/cztop-reactor","commit_stats":{"total_commits":49,"total_committers":1,"mean_commits":49.0,"dds":0.0,"last_synced_commit":"c3388fff617727aed7639cddc280c088482f133c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ged/cztop-reactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fcztop-reactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fcztop-reactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fcztop-reactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fcztop-reactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ged","download_url":"https://codeload.github.com/ged/cztop-reactor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fcztop-reactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","async-programming","czmq","cztop","reactor","ruby","socket-io","zeromq"],"created_at":"2024-10-09T06:08:02.438Z","updated_at":"2026-05-15T18:02:45.103Z","avatar_url":"https://github.com/ged.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CZTop-Reactor\n\nhome\n: http://deveiate.org/projects/CZTop-Reactor\n\ncode\n: http://bitbucket.org/ged/cztop-reactor\n\ngithub\n: https://github.com/ged/cztop-reactor\n\ndocs\n: http://deveiate.org/code/cztop-reactor\n\n\n## Description\n\nThis is an implementation of the Reactor pattern described in [Pattern-Oriented\nSoftware Architecture (Volume 2)][POSA2]. It allows an asynchronous application\nto be described as one or more \"reactions\" to events, in this case either I/O\nconditions on a ZMQ socket or a timer expiring.\n\nA simple example:\n\n    # Start a SERVER socket, and print out any messages sent to it\n    reactor = CZTop::Reactor.new\n    socket = CZTop::Socket::SERVER.new\n    socket.bind( 'tcp://0.0.0.0:8' )\n    reactor.register( socket, :read ) do |event|\n      if event.readable?\n        message = event.socket.receive\n        puts \"Read: %p\" % [ message.to_a ]\n      end\n    end\n    reactor.start_polling\n\n\n## Prerequisites\n\nIt should run under any Ruby interpreter that CZTop will, which at the time of\nthis writing includes:\n\n* MRI (2.3, 2.2)\n* Rubinius (HEAD)\n* JRuby 9000 (HEAD)\n\nI am also using it (and CZTop) under MRI 2.4.\n\n\n## Installation\n\n    $ gem install cztop-reactor\n\n\n## Reasons\n\nI considered submitting this as a patch to `cztop`, but in the end elected to\ndistribute it as a gem for two reasons:\n\n1. It depends on the `timers` gem, and I didn't want to add this dependency to\n   `cztop`. If the [`ztimerset`][ztimerset] spec ever comes out of draft status\n   and `cztop` adds an implementation of it, this wouldn't be necessary.\n2. I'm not confident enough in my FFI knowledge to know if this is an\n   appropriate way to implement this class. I've written numerous C extensions \n   for Ruby, but FFI is still a bit of a mystery to me, and likely will remain \n   so for the foreseeable future given my misgivings about using it.\n\n\n## Contributing\n\nYou can check out the current development source with Mercurial via its\n{project page}[http://bitbucket.org/ged/cztop-reactor]. Or if you prefer Git,\nvia {its Github mirror}[https://github.com/ged/cztop-reactor].\n\nAfter checking out the source, run:\n\n    $ rake newb\n\nThis task will install any missing dependencies, run the tests/specs,\nand generate the API documentation.\n\n\n## License\n\nThis library includes source from the CZTop gem by Patrik Wenger, which is\ndistributed under the terms of the [ISC\nLicense](http://opensource.org/licenses/ISC):\n\n\u003e Copyright (c) 2016, Patrik Wenger\n\u003e\n\u003e Permission to use, copy, modify, and/or distribute this software for\n\u003e any purpose with or without fee is hereby granted, provided that\n\u003e the above copyright notice and this permission notice appear in all\n\u003e copies.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL\n\u003e WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED\n\u003e WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE\n\u003e AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL\n\u003e DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA\n\u003e OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n\u003e TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n\u003e PERFORMANCE OF THIS SOFTWARE.\n\nEverything else is distributed under the same license but is:\n\nCopyright (c) 2017, Michael Granger\n\n\n[POSA2]: http://www.cs.wustl.edu/~schmidt/POSA/POSA2/\n[ztimerset]: http://czmq.zeromq.org/czmq4-0:ztimerset\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fcztop-reactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fged%2Fcztop-reactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fcztop-reactor/lists"}