Skip to content

Add Behaviour & Protocol systems pattern (Phase 3) - #1

Merged
ivan-podgurskiy merged 2 commits into
mainfrom
feat/behaviour-protocol
Jun 2, 2026
Merged

ivan-podgurskiy merged 2 commits into
mainfrom
feat/behaviour-protocol

Conversation

@ivan-podgurskiy

Copy link
Copy Markdown
Owner

Summary

  • Adds Phase 3, pattern #11: Patterns.BehaviourProtocol — a notification example that contrasts protocol dispatch (by data type) with behaviour dispatch (by module).
  • Includes Notification protocol (Alert, Deploy, BitString, Any fallback), Channel behaviour with three implementations, and notify/3 wiring them together.
  • Adds guide guides/11_behaviour_protocol.md and updates README index/roadmap and CHANGELOG.

Test plan

  • mix test — 43 doctests, 187 tests, 0 failures
  • mix credo --strict — no issues
  • mix dialyzer — 0 errors
  • mix format --check-formatted

Introduce a notification example that contrasts protocol dispatch by value
with behaviour dispatch by module, including tests, guide, and docs updates.
Wait for asynchronous Registry unregistration after a killed subscriber
instead of asserting immediately on {:DOWN}, matching assert_eventually usage
in other fault-tolerance tests.
@ivan-podgurskiy
ivan-podgurskiy merged commit c2d711e into main Jun 2, 2026
3 checks passed
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.

1 participant