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 the pipe protocol compiler #3658

Closed
brson opened this issue Oct 4, 2012 · 5 comments
Closed

Remove the pipe protocol compiler #3658

brson opened this issue Oct 4, 2012 · 5 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@brson
Copy link
Contributor

brson commented Oct 4, 2012

Abstractions built on pipes are created using a 'protocol compiler' that can define complex interactions between two endpoints. At this point I think it is not worth maintaining, for several reasons:

  • In practice we are using just a few simple pipe-based types and not defining custom protocols
  • The protocol compiler imposes some maintenance burden. It is a complex syntax extension that generates many calls into core.
  • Writing and maintaining protocols is hard, aren't that aesthetically pleasing.
  • It is not likely to be further developed in the near-term

Instead I think we should rewrite the existing protocols by hand and remove the compiler.

@graydon
Copy link
Contributor

graydon commented Oct 4, 2012

In practice I don't think we've even transitioned off Channels and Ports terribly much yet, much less given this stuff a fair shake. I'd like to give this more bake time to see which parts are necessary, which parts overcomplex. We haven't written enough complex concurrent code yet to be clear on that yet. There are a lot of moderately-complex protocols I can imagine us wanting to have implementations for (those related to I/O, files, sockets, locks, databases, concurrency primitives) that it may be the best route for generating. Doesn't feel clear to me yet.

@bblum
Copy link
Contributor

bblum commented Oct 11, 2012

:(

@brson
Copy link
Contributor Author

brson commented Feb 5, 2013

I'm still in favor of this. pipec continues to be difficult to maintain. Every time I work with or on pipes I am tempted to inline the stream and oneshot protocol expansions into core::pipes but I haven't yet.

@catamorphism
Copy link
Contributor

Not critical for 0.6, de-milestoning

bors added a commit that referenced this issue Aug 1, 2013
The pipes compiler produced data types that encoded efficient and safe
bounded message passing protocols between two endpoints. It was also
capable of producing unbounded protocols.

It was useful research but was arguably done before its proper time.

I am removing it for the following reasons:

* In practice we used it only for producing the `oneshot` protcol  and
  the unbounded `stream` protocol and all communication in Rust use those.
* The interface between the proto! macro and the standard library
  has a large surface area and was difficult to maintain through
  language and library changes.
* It is now written in an old dialect of Rust and generates code
  which would likely be considered non-idiomatic.
* Both the compiler and the runtime are difficult to understand,
  and likewise the relationship between the generated code and
  the library is hard to understand. Debugging is difficult.
* The new scheduler implements `stream` and `oneshot` by hand
  in a way that will be significantly easier to maintain.

This shouldn't be taken as an indication that 'channel protocols'
for Rust are not worth pursuing again in the future.

Concerned parties may include: @graydon, @pcwalton, @eholk, @bblum

The most likely candidates for closing are #7666, #3018, #3020, #7021, #7667, #7303, #3658, #3295.
@thestinger
Copy link
Contributor

Removed by #8170, the bug tracking a rewrite is #7668.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

5 participants