{"id":18720463,"url":"https://github.com/stiffstream/so5extra","last_synced_at":"2025-04-12T14:14:37.786Z","repository":{"id":39404601,"uuid":"187648911","full_name":"Stiffstream/so5extra","owner":"Stiffstream","description":"so5extra is a collection of various SObjectizer's extensions. so5extra is built on top of SObjectizer and intended to simplify development of SObjectizer-based applications.","archived":false,"fork":false,"pushed_at":"2025-03-10T05:46:46.000Z","size":992,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T08:51:36.217Z","etag":null,"topics":["actor-library","actor-model","actors","concurrency","concurrent-programming","cplusplus","cplusplus-17","cpp","cpp17","multithreading","sobjectizer"],"latest_commit_sha":null,"homepage":"https://stiffstream.com/en/products/so_5_extra.html","language":"C++","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/Stiffstream.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-20T13:45:43.000Z","updated_at":"2024-12-24T08:35:11.000Z","dependencies_parsed_at":"2024-03-22T13:30:49.094Z","dependency_job_id":"9e941e09-e631-4b19-9fe6-25d96ce0e0c1","html_url":"https://github.com/Stiffstream/so5extra","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stiffstream%2Fso5extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stiffstream","download_url":"https://codeload.github.com/Stiffstream/so5extra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578822,"owners_count":21127713,"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":["actor-library","actor-model","actors","concurrency","concurrent-programming","cplusplus","cplusplus-17","cpp","cpp17","multithreading","sobjectizer"],"created_at":"2024-11-07T13:31:10.202Z","updated_at":"2025-04-12T14:14:37.762Z","avatar_url":"https://github.com/Stiffstream.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What Is It?\r\n\r\nso5extra is a collection of various SObjectizer's extensions. so5extra is built on top of SObjectizer and intended to simplify development of SObjectizer-based applications.\r\n\r\nAt the current moment so5extra contains the following components:\r\n\r\n* so_5::extra::async_op. Several implementation of *async operations*. Contains subcomponents so_5::extra::async_op::time_unlimited (async operations without a limit for execution time) and so_5::extra::async_op::time_limited (async operations with a time limit);\r\n* so_5::extra::disp::asio_one_thread. A dispatcher which runs Asio's io_service::run() on a separate worker thread and schedules execution of event-handler via asio::post() facility;\r\n* so_5::extra::disp::asio_thread_pool. A dispatcher which runs Asio's io_service::run() on a thread pool and schedules execution of event-handler via asio::post() facility;\r\n* so_5::extra::env_infrastructures::asio::simple_mtsafe. An implementation of thread-safe single threaded environment infrastructure on top of Asio;\r\n* so_5::extra::env_infrastructures::asio::simple_not_mtsafe. An implementation of not-thread-safe single threaded environment infrastructure on top of Asio;\r\n* so_5::extra::enveloped_msg. A set of tools for working with enveloped messages;\r\n* so_5::extra::mboxes::broadcast::fixed_mbox. An implementation of mbox which broadcasts messages to a set of destination mboxes;\r\n* so_5::extra::mboxes::collecting_mbox. An implementation of mbox which collects messages of type T and sends bunches of collected messages to the target mbox;\r\n* so_5::extra::mboxes::composite. An implementation of mbox that delegates actual processing of messages to different destination mboxes in dependency of message type.\r\n* so_5::extra::mboxes::inflight_limit. An implementation of mbox that limits the number of \"in-flight\" messages and drops (discards) new messages if the limit exceeded.\r\n* so_5::extra::mboxes::first_last_subscriber_notification. An implementation of mbox for messages of type T that sends notifications when the first subscriber arrives and the last subscribers leaves;\r\n* so_5::extra::mboxes::proxy. A proxy-mbox which delegates all calls to the underlying actual mbox. Such proxy simplifies development of custom mboxes.\r\n* so_5::extra::mboxes::retained_msg. An implementation of mbox which holds the last sent message and automatically resend it to every new subscriber for this message type;\r\n* so_5::extra::mboxes::round_robin. An implementation of *round-robin* mbox which performs delivery of messages by round-robin scheme;\r\n* so_5::extra::mchains::fixed_size. An implementation of fixed-size mchain which capacity is known at the compile-time;\r\n* so_5::extra::msg_hierarchy. A way to subscribe, receive and handle a message by its base class.\r\n* so_5::extra::revocable_msg. A set of tools for sending messages/signals those can be revoked;\r\n* so_5::extra::revocable_timer. A set of tools for sending delayed/periodic messages/signals those can be revoked;\r\n* so_5::extra::shutdowner. A tool to simplify prevention of SObjectizer shutdown in cases where some agents require more time for graceful shutdown (like storing caches to disk and stuff like that);\r\n* so_5::extra::sync. A set of tools for performing synchronous interaction between agents (or threads if only mchains are used).\r\n\r\nMore features can be added to so5extra in future. Some of so5extra's features can become parts of SObjectizer itself if they will be in wide use.\r\n\r\n# Obtaining And Using\r\n\r\n## The Old-School Way\r\n\r\n### Obtaining\r\n\r\nso5extra can be obtained from source-code repository via Git. For example:\r\n\r\n    git clone https://github.com/stiffstream/so5extra\r\n\r\nso5extra can also be downloaded from the corresponding [Releases](https://github.com/Stiffstream/so5extra/releases) section on GitHub. There are two types of achives with so5extra: \r\n\r\n* archives with so5extra sources only (with names like `so5extra-1.6.0.tar.xz`);\r\n* archives with so5extra and all dependecies, like SObjectizer and Asio. These archives have names like `so5extra-1.6.0-full.tar.xz`).\r\n\r\nIf so5extra is got from repository or downloaded as archive without dependecies inside then obtaining of dependecies could be necessary. It can be done via mxxruexternals command: \r\n\r\n    git clone https://github.com/stiffstream/so5extra\r\n    cd so5extra\r\n    mxxruexternals\r\n\r\nNote: `mxxruexternals` is a part of Mxx_ru gem. To use Mxx_ru it is necessary to install Ruby and then Mxx_ru gem (by `gem install Mxx_ru`).\r\n\r\n### Using\r\n\r\nso5extra is a header-only library. There is no need to compile and link so5extra itself. Only INCLUDE path must be set appropriately.\r\n\r\n### Using via CMake\r\n\r\nSince v.1.2.1 there is the very basic support for CMake: so5extra can be used in CMake-based projects. There is `dev/so_5_extra/CMakeFiles.txt` for that.\r\n\r\nBut building so5extra's examples and/or tests via CMake is not supported.\r\nIf you want to have CMake support for these things let us known via \"info at stiffstream dot com\".\r\n\r\n## Obtaining And Using Via vcpkg\r\n\r\nSince v.1.2.1 so5extra is available via [vcpkg](https://github.com/Microsoft/vcpkg) library manager.\r\n\r\nTo install so5extra it is necessary to use `vcpkg install` command:\r\n\r\n    vcpkg install so5extra\r\n\r\nTo use so5extra it is necessary to add the following lines in your CMakeFiles.txt: \r\n\r\n    find_package(so5extra CONFIG REQUIRED)\r\n    find_package(sobjectizer CONFIG REQUIRED)\r\n\r\nAnd then it is necessary to link your target against SObjectizer's libraries:\r\n\r\n    target_link_libraries(your_target sobjectizer::SharedLib)\r\n    target_link_libraries(your_target sobjectizer::so5extra)\r\n\r\nFor example: this is a simple CMakeFiles.txt file for so5extra's sample `delivery_receipt`:\r\n\r\n    find_package(so5extra CONFIG REQUIRED)\r\n    find_package(sobjectizer CONFIG REQUIRED)\r\n\r\n    set(SAMPLE sample.so_5_extra.delivery_receipt)\r\n    add_executable(${SAMPLE} main.cpp)\r\n    target_link_libraries(${SAMPLE} sobjectizer::SharedLib)\r\n    target_link_libraries(${SAMPLE} sobjectizer::so5extra)\r\n    install(TARGETS ${SAMPLE} DESTINATION bin)\r\n\r\n## Obtaining And Using Via Conan\r\n\r\n### Installing And Adding To conanfile.txt\r\n\r\nSince Nov 2018 so5extra can be used via [Conan](https://conan.io) dependency manager. To use so5extra it is necessary to do the following steps.\r\n\r\nAdd the corresponding remote to your conan:\r\n\r\n    conan remote add stiffstream https://api.bintray.com/conan/stiffstream/public\r\n\r\nIt can be also necessary to add public-conan remote:\r\n\r\n    conan remote add public-conan https://api.bintray.com/conan/bincrafters/public-conan\r\n\r\nAdd so5extra to conanfile.txt of your project:\r\n\r\n    [requires]\r\n    so5extra/1.6.0@stiffstream/stable\r\n\r\nIt also may be necessary to specify shared option for SObjectizer. For example, for build SObjectizer as a static library:\r\n\r\n    [options]\r\n    sobjectizer:shared=False\r\n\r\nInstall dependencies for your project:\r\n\r\n    conan install SOME_PATH --build=missing\r\n\r\n### Adding so5extra To Your CMakeLists.txt\r\n\r\nPlease note that so5extra and SObjectizer should be added to your CMakeLists.txt via find_package command:\r\n\r\n    ...\r\n    include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)\r\n    conan_basic_setup()\r\n\r\n    find_package(sobjectizer CONFIG REQUIRED)\r\n    find_package(so5extra CONFIG REQUIRED)\r\n    ...\r\n    target_link_libraries(your_target sobjectizer::SharedLib) # Or sobjectizer::StaticLib\r\n    target_link_libraries(your_target sobjectizer::so5extra)\r\n\r\n\r\n# Building Samples And Tests\r\n\r\nTo build so5extra samples and tests it is necessary to use Ruby and Mxx_ru gem. For example:\r\n\r\n    git clone https://github.com/stiffstream/so5extra\r\n    cd so5extra\r\n    mxxruexternals\r\n    cd dev\r\n    ruby build.rb\r\n\r\nAll tests and samples will be built. If it is necessary to build only examples it can be done by:\r\n\r\n    git clone https://github.com/stiffstream/so5extra\r\n    cd so5extra\r\n    mxxruexternals\r\n    cd dev\r\n    ruby sample/so_5_extra/build_samples.rb\r\n\r\n# Building API Reference Manual\r\n\r\nAPI Reference Manual can be build via doxygen. Just go into `dev` subdirectory where `Doxygen` file is located and run `doxygen`. The generated documentation in HTML format will be stored into `doc/html` subdir.\r\n\r\n# License\r\n\r\nSince v.1.4.0 so5extra is distributed under BSD-3-CLAUSE license (see LICENSE file).\r\n\r\nFor the license of *SObjectizer* library see LICENSE file in *SObjectizer* distributive.\r\n\r\nFor the license of *asio* library see COPYING file in *asio* distributive.\r\n\r\nFor the license of *doctest* library see LICENSE file in *doctest* distributive.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiffstream%2Fso5extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstiffstream%2Fso5extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiffstream%2Fso5extra/lists"}