-
Notifications
You must be signed in to change notification settings - Fork 38
Replace Akka IO Pipelines with Akka Stream (Reactive Streams) #90
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
base: master
Are you sure you want to change the base?
Conversation
CLIENT KILL since version 2.8.12 has a new format: http://redis.io/commands/client-kill The interesting part is `CLIENT KILL SKIPME yes/no`. By default this option is set to yes, which means that something in the sense of client.kill(self) wouldn't work anymore. This commit changes the test to use a different client for killing the desired connection, if the redis version is greater than 2.8.12
implements debasishg#66 Reactive streams are about automatically managing back pressure, so the current BP options are ignored (but not removed). No client or test changes required
|
Thanks for the PR. I will take a look over the weekend. @guersam - mind taking a look when u have some free time ? |
|
Sure, will investigate the processor error as well. |
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.
closes over Actor and ActorContext. Use pipeTo.
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.
Indeed, thanks!
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.
commanderAndResult match {
case (commander, Success(res)) => commander ! res
case (commander, Failure(e)) => commander ! Status.Failure(e)
}
saves a bit
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.
This file has some predefined byte constants. How about moving it there for future reuse?
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.
Thanks, I moved it in 89985de.
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.
Thanks :)
|
Honestly I'm not familiar with akka-streams yet, however I think we can merge it because it tests all tests after all. @debasishg/ For Scala 2.11 support, how about releasing current master before merging it? As it brings significant changes to the underlying codebase, it might be better to wait for a few more akka-streams updates before marking it as stable. |
|
@guersam +1 on your thoughts. I am also not much familiar with Akka streams yet. I will release the current master and then wait for akka streams to stabilize more before we do a release of a version based on akka streams. |
|
And then we also might be able to steal some patterns from the upcoming http client :P |
|
"upcoming http client" .. link ? Looks like I am not up to date w/ this development. Sure we can. But it's also great to have a baseline version, thanks to @knutwalker .. |
|
Of course, thanks a lot, @knutwalker! |
|
I can reopen this PR against any other branch, if you like. I'd say too, it's better to not push this in master right away. And I'm also interested in examining akka-http, there already seems to be slight difference. It looks like they're using a new FlowMaterializer per connection, which makes sense. |
Some note about this implementation:
BackpressureBufferSettingsare ignored, but it may be possible to somehow integrate these with the ActorProducerFlowpipeActor no longer is the underlying connection pipeline but the producer for the connection FlowTerminatedmessage is done inunhandledRequestResponseHandler). This is one instance per Flow and is therefore shared amongst different threads/dispatchers. Concurrent manipulation is now backed by java.util.concurrent.* stuff. (Indeed, using the s.c.i.Queue randomly fails tests.)OK). Redis sends other strings like +QUEUED that would have been treated as true.Looking forward to your Review :)