Event Sourcing and Microservices Stack for Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Logging on startup is improved Nov 27, 2018
test Logging on startup is improved Nov 27, 2018
.gitignore
Gemfile Gemfile is updated with the latest version Jun 1, 2017
MIT-License.txt Links are correct Jul 14, 2018
README.md Log tags are standardized Nov 4, 2018
Rakefile Add gem tasks Sep 4, 2015
component_host.gemspec Package version is increased from 1.0.0.0 to 1.0.0.1 Nov 27, 2018
init.rb Library is loaded by the init script May 9, 2018
install-gems.sh install-gems.sh is updated with the latest version Jun 1, 2017
library-symlinks.sh library-symlinks.sh is updated with the latest version Apr 21, 2016
load_path.rb load_path.rb is updated with the latest version Aug 14, 2018
remove-lib-symlinks.sh Symlink scripts are updated; test/spec.rb is removed Mar 14, 2017
symlink-lib.sh

README.md

ComponentHost

Host for Ruby components that use the actor library.

Usage

# The "component initiator" binds consumers to their streams and starts
# the consumers
# Until this point, handlers have no knowledge of which streams they process
# Starting the consumers starts the stream readers and gets messages flowing
# into the consumer's handlers
module SomeComponent
  def self.call
    command_stream_name = 'something:command'
    SomeConsumer.start(command_stream_name)
  end
end

# ComponentHost is the runnable part of the service
# Register a component module with the component host, then start the host
# and messages sent to its streams are dispatched to the handlers
component_name = 'some-component'
ComponentHost.start(component_name) do |host|
  host.register(SomeComponent)
end

More Documentation

See the Eventide documentation site for more information, examples, and user guides.

License

The component-host library is released under the MIT License.