Skip to content
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

Merged
merged 12 commits into from
Sep 26, 2018
Merged

Conversation

zerth
Copy link
Contributor

@zerth zerth commented Sep 25, 2018

Resolve examples portion of #4.

@zerth zerth requested a review from marcelog September 25, 2018 20:54
Copy link
Collaborator

@polvorin polvorin left a 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
Copy link
Collaborator

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).

Copy link
Contributor Author

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).

Copy link
Contributor Author

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).

Copy link
Collaborator

@marcelog marcelog left a 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.

@zerth
Copy link
Contributor Author

zerth commented Sep 26, 2018

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.

@zerth zerth merged commit 0abc4d7 into master Sep 26, 2018
@zerth zerth deleted the exmld_examples branch September 26, 2018 19:57
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.

None yet

3 participants