Skip to content

#113 Event-driven Architecture - #299

Merged
iluwatar merged 26 commits into
iluwatar:masterfrom
c17a:master
Jan 3, 2016
Merged

iluwatar merged 26 commits into
iluwatar:masterfrom
c17a:master

Conversation

@c17a

@c17a c17a commented Nov 23, 2015

Copy link
Copy Markdown
Contributor

Let me know of any improvements 👍

chris added 4 commits November 22, 2015 19:40
- initial commit includes a simple and advanced example of Event-driven architecture
- refactored and moved around some classes
- removed unused imports
- added class diagram
- added more comments
@iluwatar

Copy link
Copy Markdown
Owner
  • Put under review badge to the pull request
  • Check that the code compiles and the existing tests succeed
  • Does the example code implement the pattern correctly and follow good coding practices?
  • Does the example code have proper tests and enough test coverage?
  • Is the example code commented well enough?
  • Is the example code following JavaDoc conventions?
  • Are the project coding conventions being followed?
  • Is the class diagram generated correctly?
  • Is the index.md implemented correctly so the pattern will show correctly on the web site?
  • Is the originator of the design pattern properly credited?

Review remarks:

  • The module has not been added to root pom.xml
  • There are no unit tests
  • The code does not follow project coding conventions
  • The class diagram style is not consistent with other class diagrams

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Add JavaDoc

@iluwatar

Copy link
Copy Markdown
Owner

@genericmethod the review remarks are now available. Please comment on this message thread once you've implemented the changes and I'll take a look again.

cfarrugia added 6 commits November 28, 2015 10:57
Adds module to the root pom.xml
Fixes indentation
Adds more Javadoc and fixes checkstyle issues.
Adds unit test to assert and verify pattern behaviour
Adds unit test to assert and verify pattern event get type behaviour.
Also added unit test comments.
@c17a

c17a commented Nov 28, 2015

Copy link
Copy Markdown
Contributor Author

@iluwatar changes have been implemented

  • The module has been added to root pom.xml
  • Unit tests implemented
  • Code follows coding conventions
  • Class diagram - @iluwatar can you please help generate this, thanks
  • Additional javadocs added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It will be great if you can link any actual applications as well. Any existing pattern or library that uses this architecture.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍 Done

@npathai

npathai commented Nov 30, 2015

Copy link
Copy Markdown
Contributor

How is it different than Reactive programming paradigm? Are they similar? I think some of these questions should be answered in our site. If they are similar then we can link RxJava, Play framework (in Go language - But on JVM) as well.

Also I was thinking about the difference between Message Driven Architecture (MDA) vs Event Driven Architecture (EDA).
Here are a few links that discuss it:
http://programmers.stackexchange.com/questions/146586/merits-of-a-message-passing-system-vs-an-event-based-system
http://blog.sapiensworks.com/post/2013/04/19/Message-Driven-Architecture-Explained-Basics.aspx/

I am unsure about the correctness of those links, but if you can add something to it then it will be great.

@iluwatar Where do you think can we address these points? FAQ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the first line of JavaDoc, I suppose we don't need "class",

/** The {@link UserCreatedEvent} should should be dispatched whenever a user has been created.
...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍 Done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test should not be here and should be inside UserCreatedEventTest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agreed 👍 Done

@npathai

npathai commented Nov 30, 2015

Copy link
Copy Markdown
Contributor

@genericmethod I am done with initial review. Please go through the points and leave comments on individual points about your feedback, Done if you agree with and have incorporated the change.

cfarrugia added 4 commits December 1, 2015 23:30
Adds various changes including :
- Fixes to Javadoc
- Test refactoring and improvements
- Refactored EventDispatcher to be immutable
- Removed DynamicRouter interface since it not needed
- Renamed Channel to a more appropriate name - Handler
Adds various changes including :
- Fixes to Javadoc
Updated index.md with eda uses
Fixed a typo in index.md
@npathai

npathai commented Dec 2, 2015

Copy link
Copy Markdown
Contributor

@genericmethod How can we help you with class diagram? FYI The guidelines are attached in Wiki section.

Open points:

  • Class diagram
  • Code guidelines - Verify by modifying pom and turning on Checkstyle from pom. Confirm that it is a success.
  • How to capture discussion on MDA vs EDA

@c17a

c17a commented Dec 2, 2015

Copy link
Copy Markdown
Contributor Author

@npathai I don't use eclipse and don't have the object aid plugin available. Spoke with @iluwatar on gitter and he has kindly offered to generate it for me.

Checkstyle has been run locally on the eda module with no reported warnings:
[INFO] --- maven-checkstyle-plugin:2.15:check (validate) @ event-driven-architecture ---
[INFO] Starting audit...
Audit done.
[INFO] ----------

@c17a

c17a commented Dec 15, 2015

Copy link
Copy Markdown
Contributor Author

What is the way forward regarding this PR? Is there anything pending from my end ? 😄

@iluwatar

Copy link
Copy Markdown
Owner

@genericmethod Sorry for the delay. I think the PR looks very good now. You should catch up your fork from the master, then I will accept and generate the class diagram for you. Please comment on this thread once the catch-up is done.

cfarrugia added 3 commits January 2, 2016 11:48
@c17a

c17a commented Jan 2, 2016

Copy link
Copy Markdown
Contributor Author

@iluwatar fork updated from master. All that is left is the class diagram.

@c17a

c17a commented Jan 3, 2016

Copy link
Copy Markdown
Contributor Author

@iluwatar
@mikulucky has generated the class diagram :)

iluwatar added a commit that referenced this pull request Jan 3, 2016
@iluwatar
iluwatar merged commit b6beffe into iluwatar:master Jan 3, 2016
@iluwatar

iluwatar commented Jan 3, 2016

Copy link
Copy Markdown
Owner

Good job @genericmethod it is a fine example! Additional thanks to @mikulucky for the class diagram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants