-
Notifications
You must be signed in to change notification settings - Fork 13
initial pass at splitting the project into modules #69
base: master
Are you sure you want to change the base?
Conversation
need to separate consumers and producers from each others tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start!
I'm more leaning towards having it
as a top level module rather than within each one. That'll make it much easier to work with and probably fix the struggles!?
@@ -14,7 +14,7 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
package com.weightwatchers.reactive.kinesis.stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why com.ww.com
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! Fixed!
project | ||
.in(file(".")) | ||
.in(file("core")) | ||
.settings(name := "core") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we nest them all in modules/xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a little cleaner to have all the code modules nested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
build.sbt
Outdated
"ch.qos.logback" % "logback-classic" % "1.2.3" % Compile | ||
val producer = | ||
project | ||
.in(file("producer")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/** | ||
* Main entry point for creating a Kinesis source and sink. | ||
*/ | ||
object Kinesis extends LazyLogging { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth renaming to make it clear which is the consumer and which is the producer (vs just the package?) - I'm torn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's worth renaming. Don't ask me what that name should be though. Naming things is for the high wizards LOL
This is a tough one though.
It's a combination of consumer/producer + stream + source/sink
Looks like the old factory pattern to me. Should we go around those lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I named these:
ConsumerStreamFactory
and ProducerStreamFactory
I'm open to suggestions
makes it a top-level module
TODO
|
* These libs are included with the Amazon dependencies | ||
* Our core module does not include amazon dependencies so we need to bring them in manually | ||
* These versions match the ones in the Amazon dependencies | ||
* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markglh Not sure how future-proof this is as we continue to update Amazon libs
Is there a better way to do this?
project | ||
.in(file(".")) | ||
.settings(name := "reactive-kinesis") | ||
.aggregate(core, consumer, producer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't include it
here
i'm assuming we don't need to
Overview
This is an attempt to split the project into modules. All modules are under the
modules/
directoryThe modules are:
TODO
- separate consumers and producers in unit tests i.e producer test have a simple consumer and vice versa- fix issue where KinesisSuite does not loadcore
's reference.conf at the right timeStatus
- it module still needs work to compile