-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add erlang & elixir example processing applications #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
|
||
# possibly process the current pending batch of records if of the appropriate size or | ||
# enough time has elapsed: | ||
defp maybe_flush(state) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth to use Flow.Window.trigger* family of functions, or at least mention these here (which seems like the way to do this kind of things).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will look into it (and also making the exmld user interface more convenient for doing that, e.g., via options to Exmld.flow/6
or Exmld.from_stages/1
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcelog: Added use of a time-based window for the elixir example (& added a new option accepted by Exmld.flow/6
supporting the new example).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome :) Thinking that in the long term, these can be used both as an example AND a template for new applications, so maybe as possible future improvements:
- Options can be moved to the corresponding config files.
- Some unit tests can be added (so if erlmld/exmld change we can still know if the examples are still "good to go"). These could be run with the main unit tests when we have some.
- Flow.Window could be used.
Re: moving options to config files; I think that would be worthwhile as long as the resulting example applications continued supporting multiple stream consumers in the same node. And tests & converting the examples to templates (perhaps with a mix task for creating) also sound good as future improvements. |
Resolve examples portion of #4.