Commit Graph

4 Commits

Author SHA1 Message Date
e3010c8542 GOSSIP-81 Move Jackson and UDP to their own modules
Part of what makes this work is the test implementation of TransportManager.

This PR is pretty straightforward. A few gotchas though:
* A message signing test was moved into `JacksonTests` because that is
  where the signing actually happens.
* A CRDT serializing test was moved there as well. It's the best place
  for now.
* No UDP tests at all. I plan to fix that in a bit. Reasoning is that it is
  difficult to test any TransportManager implementation without bring up
  a full stack. I plan to address this in the future (GOSSIP-83).
* Simple round trip Jackson serialization tests.
2017-04-21 08:47:31 -05:00
851cd93e67 GOSSIP-79 Isolate UDP and JSON code
With these changes, it should now be possible to create alternate serialization (e.g. Gson or native) and transports (like HTTP).

To make this PR reviewable I decided against creating new modules right now. That can be done subsequently in another PR that doesn't modify any code.

* Creates two new interfaces: `TransportManager` and `ProtocolManager`
  * Implementation classes must honor a common constructor interface
* Includes UDP and Jackson implementations of those.
* `AbstractTransportManager` has a lot of boilerplate that includes:
  * starting the active gossiper, and
  * starting the passive gossiper.

I spent some time trying to polish the implementations to become less dependent on references to `GossipManager`. I still feel there is a lot of room for improvement.
2017-04-19 09:32:58 -05:00
c544b8bf16 GOSSIP-80 Sundry cleanups
* remove redundant parameter from method call.
* remove uncessary threadpool.
* Simplify `GossipCore.sendOneWay()`
* Cleanup useage of `MessageInvoker`
  * `DefaultMessageInvoker` replaced by a factory
  * `MessageInvokerCombiner` replaced by same factory
  * Alter `MessageInvokerTest` to not rely on specific types
  * Remove type assertion from `GossipManagerBuilderTest`
* Merge `MessageInvoker` with `MessageHandler`
  * This required changing method signature return type from `void` to `boolean`.
2017-04-17 10:54:24 -05:00
298b1ae3ae GOSSIP-78 refactor into a multi-module maven project
* add *.ipr to .gitignore
* modify existing pom to be a parent. create new pom for gossip-core.
* I left all properties and dependencies in the parent, as they seemed to be a fairly general set of dependencies.
move all the code.
* rename parent module: gossip -> gossip-parent
* move dependencies into child module
2017-04-13 10:12:23 -05:00