Comments (3)
Hey, it seems that we forgot to add subscribers to create such streams. New apps from template have them already enabled:
# Subscribe event handlers below
Rails.configuration.event_store.tap do |store|
# store.subscribe(InvoiceReadModel.new, to: [InvoicePrinted])
# store.subscribe(lambda { |event| SendOrderConfirmation.new.call(event) }, to: [OrderSubmitted])
# store.subscribe_to_all_events(lambda { |event| Rails.logger.info(event.event_type) })
store.subscribe_to_all_events(RailsEventStore::LinkByEventType.new)
store.subscribe_to_all_events(RailsEventStore::LinkByCorrelationId.new)
store.subscribe_to_all_events(RailsEventStore::LinkByCausationId.new)
end
Behind the scenes these "of type" streams are made with linking: https://github.com/RailsEventStore/rails_event_store/blob/0c0e0d35fe5925c587b92c10e3707c9719fae61c/ruby_event_store/lib/ruby_event_store/link_by_metadata.rb#L43-L55
Enabling them for sample application would be a great contribution.
Perhaps Browser should also be improved to not suggest such browsing streams if they don't exist. That's something to be changed within RailsEventStore. Aside: application can suggest related streams for the Browser to display: https://railseventstore.org/docs/v2/browser/#related-streams
from ecommerce.
Thanks for the quick reply! Tangential question: why put the code for this example in lib
and not app/{commands,events,aggregates}
?
from ecommerce.
Thanks for the quick reply! Tangential question: why put the code for this example in
lib
and notapp/{commands,events,aggregates}
?
We're aiming to group by bounded contexts (i.e. kitchen, bathroom) in this application, rather than group by technical belonging (sinks, lights). Ultimately our goal is to lift those contexts outside rails application directory.
Related:
- https://blog.arkency.com/rails-components-neither-engines-nor-gems/
- https://martinfowler.com/bliki/BoundedContext.html
- https://www.youtube.com/watch?v=arsK-CN5YDg # wroc_love.rb 2013 | The Not-So-Big Software Design by Reginald Braithwaite
- https://www.youtube.com/watch?v=WpkDN78P884 # Ruby Midwest 2011 | Architecture the Lost Years by Robert Martin
from ecommerce.
Related Issues (20)
- Decouple Customers read model from ClientOrders in UpdatePaidOrdersSummary HOT 1
- Make ReservationProcess asynchronous
- Consider if invariant in Crm::Order is really needed
- Review Ordering::Order possible state transitions and/or update docs
- Move Omnibus directive related stuff from ClientOrders to PublicOffer read model HOT 2
- Allow users to set password
- create ClientAuthentication read model
- Generating an invoice doesn't work
- Decouple domain modules from sidekiq
- Setting future price to 0 crashes the app
- Reset discount - link doesn't work
- Submitting order crashes sometimes
- After reset discount the page doesn't refresh HOT 1
- After update discount the page doesn't refresh
- Setting discount on empty order crashes HOT 1
- Error raised : Arkency::CommandBus::UnregisteredHandler: Missing handler for Crm::RegisterCustomer HOT 5
- Integration test for adding unavailable item to order (as client)
- Rename Pricing::Order to Pricing::Offer HOT 1
- Consider creating Sales BC which contains Pricing and maybe others HOT 1
- Log out when detecting unexisting client_id in cookies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecommerce.