symphony
Version, currently 1.0.03 versions
- 1.0.0latestMar 5, 2026
- 0.1.1not indexedMar 5, 2026
- 0.1.0not indexedMar 5, 2026
github.com/philipp-classen/symphony
Symphony: A Crystal framework for streamlined asynchronous input/output handling with safe shutdown protocols.
Installation
# Add this to your shard.yml
dependencies:
symphony:
github: philipp-classen/symphony
version: ~> 1.0.0Then run:
shards installshard.yml
- Crystal
>= 1.11.0- License
- MIT
- Author
- Philipp Claßen
Dependencies
This version declares no dependencies.
README
Symphony
Simplifies the startup and safe shutdown of Crystal servers that process inputs (such as queues and HTTP requests) and stream them to various outputs. Unlike traditional HTTP servers that directly respond to requests, this framework is designed for asynchronous processing.
The core idea is to let the application define a list of readers (input) and writers (output), where each reader and writer will run independently.
The framework will take care of the proper startup (first the writers, then the readers) and the safe shutdown (stopping first the readers, then the writers). It will also handle signals like SIGINT or SIGTERM.
Installation
-
Add the dependency to your
shard.yml:dependencies: symphony: github: philipp-classen/symphony -
Run
shards install
Usage
Here is a minimal example to illustrate how to set up a basic server. While this example does not include a writer and may not be practically useful, it demonstrates the basic structure of a Symphony application.
require "symphony"
class Application < Symphony::Application
Log = ::Log.for("test-app")
def create_input_readers : Array(Symphony::BackgroundService)
server = Symphony::HttpServer.new do |ctx|
ctx.response.content_type = "text/plain"
ctx.response.print "Hello world, got #{ctx.request.path}!"
end
[server] of Symphony::BackgroundService
end
def create_output_writers : Array(Symphony::BackgroundService)
[] of Symphony::BackgroundService
end
end
Log.setup_from_env
APP = Application.new
APP.run
Development
There are currently no tests.
Contributing
- Fork it (https://github.com/philipp-classen/symphony/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Philipp Claßen - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Mar 5, 2026
- Commit
4103d573071e- Crystal
>= 1.11.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/philipp-classen/symphony
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 3