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

Remove Sharding #929

Merged
merged 4 commits into from
Dec 26, 2018
Merged

Remove Sharding #929

merged 4 commits into from
Dec 26, 2018

Conversation

armiol
Copy link
Contributor

@armiol armiol commented Dec 26, 2018

In a scope of planned Inbox feature, the sharding-based approach used up until now becomes obsolete. This PR removes the existing implementation of Sharding and allows to run tests without ShardingReset JUnit extension.

Other API changes:

  • Allow to only specify TransportFactory for the BoundedContextBuilder, not the IntegrationBus — to make the transport configuration consistent across multiple bounded contexts.
  • Wire all instances of BlackBoxBoundedContext to the same transport to enable a communication via external events.

Minor changes:

  • @author tags removed in the updated files.
  • VisibilityGuardTestEnv cleared from the unused code.
  • BlackBoxBoundedContext now relies on Java 8 predicate API instead of Guava's for event filtering.

The framework version remained intact for now — in light of upcoming pre3 version.

Allow to set `TransportFactory` instead of `IntegrationBus` for the `BoundedContextBuilder`.
Wire all instances of `BlackBoxBoundedContext` to the same transport in order to allow them to communicate via external events.
@codecov
Copy link

codecov bot commented Dec 26, 2018

Codecov Report

Merging #929 into master will decrease coverage by 0.34%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #929      +/-   ##
============================================
- Coverage     93.37%   93.02%   -0.35%     
+ Complexity     3864     3712     -152     
============================================
  Files           529      508      -21     
  Lines         12651    12135     -516     
  Branches        705      675      -30     
============================================
- Hits          11813    11289     -524     
- Misses          608      623      +15     
+ Partials        230      223       -7

@armiol armiol requested a review from dmdashenkov December 26, 2018 15:45
Copy link
Contributor

@dmdashenkov dmdashenkov left a comment

Choose a reason for hiding this comment

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

@armiol, LGTM with a couple of comments to address.

@DisplayName("TransportFactory if it was set")
void transportFactory() {
@SuppressWarnings("unchecked") // OK for this mock.
TransportFactory factory = InMemoryTransportFactory.newInstance();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the alignment.

private final BoundedContext boundedContext;
private final CommandMemoizingTap commandTap;
private final MemoizingObserver<Ack> observer;


Copy link
Contributor

Choose a reason for hiding this comment

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

This line is redundant.

@armiol armiol merged commit 6340d35 into master Dec 26, 2018
@armiol armiol deleted the remove-sharding branch December 26, 2018 17:07
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.

2 participants