A micro library providing Ruby objects with Publish-Subscribe capabilities for decoupled architectures.
Wisper is a micro library that provides Ruby objects with Publish-Subscribe capabilities, enabling decoupled communication between components. It allows any class to broadcast events and lets listeners subscribe at runtime, replacing tight couplings with event-driven interactions. This is especially useful for separating core business logic from external concerns like notifications, logging, or analytics.
Ruby developers building applications with Hexagonal or clean architectures, and Rails developers seeking alternatives to ActiveRecord callbacks and observers for better separation of concerns.
Developers choose Wisper for its simplicity, minimal footprint, and flexibility in implementing event-driven patterns without heavy frameworks. It integrates seamlessly with Rails and supports async processing, making it ideal for decoupling complex business logic.
A micro library providing Ruby objects with Publish-Subscribe capabilities
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Wisper is a micro library with a simple API, adding minimal overhead, as shown by its easy inclusion via `include Wisper::Publisher` and lack of heavy dependencies.
Supports runtime subscriptions with options for scoping, prefixing, and method mapping, enabling context-based connections without permanent dependencies, as detailed in the README's subscription examples.
Enables asynchronous processing through adapters for Sidekiq, ActiveJob, etc., making it suitable for background tasks, though this requires separate gems.
Works well with ActiveRecord models and ActionController, providing an alternative to callbacks for event-driven workflows, as demonstrated in the README's Rails examples.
Async functionality isn't built-in; it relies on additional gems like wisper-sidekiq, adding setup complexity and dependency management overhead.
Lacks built-in persistence for events, making replay or auditing difficult without custom implementation, which can be a limitation for systems requiring event sourcing.
Decoupled events can lead to hard-to-trace code flows if not managed carefully, potentially creating maintenance challenges and debugging difficulties.