Skip to content

Try removing the InboundCommands #189

Open
@bryce-anderson

Description

@bryce-anderson

The current pipeline structure is pull-based with read and write operations returning futures, so in some ways, they are like a version of a socket that return a Future instead of blocking.

Exception for the InboundCommands: they provide a way for the pipeline to push events, which is a little out of place in the model. That said, they are useful for things like starting up a pipeline in a server where the server itself is the driver.

I think we can do better though, maybe making signaling startup as part of pipeline builders duties or changing what the server uses to bootstrap a pipeline. For example, it seems reasonable to provide a HeadStage[ByteBuffer] to a new form:

type BufferPipelineBuilder = SocketConnection => LeafBuilder[ByteBuffer]
// becomes
type BufferPipelineBuilder = HeadStage[ByteBuffer] => Unit

We'd need to do something to incorporate the info in SocketConnection into HeadStage but that seems like a good idea as well.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions