Replace concurrent-ruby with async#17
Closed
henrikbjorn wants to merge 11 commits into
Closed
Conversation
fba2fe5 to
9c7e74c
Compare
Switch from threads + concurrent-ruby primitives to the socketry async ecosystem (async, io-endpoint, io-stream) for simpler, cooperative fiber-based concurrency. Key changes: - Reader thread replaced by an Async task (no IO.select polling) - Concurrent::IVar/Queue command pipeline replaced by direct writes + Async::Condition signals - Concurrent::CountDownLatch replaced by Async::Variable for call state waits - All Mutex usage removed (cooperative scheduling eliminates races) - Concurrent::Map replaced by plain Hash - Scenario#run wraps in Sync for transparent async reactor
Add Dockerfile and docker-compose.yml for FreeSWITCH, passing SignalWire repo credentials via environment variables. Update CI to build from secrets and gitignore .env for local use.
Use custom Dockerfile with SignalWire repo credentials instead of the public image, while keeping existing volumes and healthcheck.
6db2668 to
55b1471
Compare
The vanilla config tries to load dozens of modules not installed in our image, causing CRIT errors. Mount a minimal modules.conf.xml that only loads what the integration tests need.
- Move call and scenario tests to test/scenarios/ with _scenario suffix - Add scenario_helper.rb for scenario test configuration - Add Sync wrapper to ESL connection/client integration tests to prevent fiber leaks between test runs - Add separate CI jobs for integration and scenario tests - Add rake scenarios task
Remove custom Dockerfile and modules.conf.xml in favour of the stable third-party image. Drop FS_REPO secrets from CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
concurrent-rubydependency withasync(> 2.0),> 0.13), andio-endpoint(io-stream(~> 0.11) from the socketry ecosystemAsynctask — no moreIO.selectpolling or command queueAsync::Conditionfor responseswait_for_answer,wait_for_bridge,wait_for_end) useAsync::Variableinstead ofConcurrent::CountDownLatchMutexusage removed — cooperative fiber scheduling eliminates race conditionsScenario#runwraps inSyncfor a transparent async reactor during testsWhat was replaced
Thread.new { reader_loop }Async { reader_loop }Queue+Concurrent::IVarAsync::ConditionIO.selectpolling (0.1s timeout)Mutex(connection, client, events, call)Concurrent::CountDownLatchAsync::VariableConcurrent::MapHashConcurrent::EventAsync::VariableConcurrent::ScheduledTaskAsync { sleep(n); block.call }