Skip to content

Conversation

@cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Apr 25, 2023

Implements a state machine based approach for delivering events.

There's a worker pool, and 5 workers (configurable). They are meant to be long-lived and at any given moment are:

  • idle
  • making a first delivery attempt
  • making a second delivery
  • or permanently failed.

I've update Client to construct an AsioEventProcessor if events are enabled, otherwise a NullEventProcessor.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #194283: Implement Event processor.

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-194283/event-delivery branch from c99b674 to 72b613c Compare April 26, 2023 23:24
@cwaldren-ld cwaldren-ld marked this pull request as ready for review April 26, 2023 23:24
@cwaldren-ld cwaldren-ld requested a review from kinyoklion April 26, 2023 23:25
@cwaldren-ld cwaldren-ld changed the title feat: deliver events with single retry feat: implement event delivery Apr 26, 2023
Copy link
Member

@kinyoklion kinyoklion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as the only bottleneck is IO, this looks good. That is certainly the case for the client.

In the case where there was a CPU bottleneck, then I think we would want the workers to have the ability to be threaded. For instance in a server where serialization in creating the batch could be the bottleneck for single threaded event dispatch

@cwaldren-ld cwaldren-ld merged commit 4de5eaa into main May 2, 2023
@cwaldren-ld cwaldren-ld deleted the cw/sc-194283/event-delivery branch May 2, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants