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

Conduit.3.0.0 #310

Closed
dinosaure opened this issue Mar 19, 2020 · 4 comments
Closed

Conduit.3.0.0 #310

dinosaure opened this issue Mar 19, 2020 · 4 comments

Comments

@dinosaure
Copy link
Member

dinosaure commented Mar 19, 2020

Hi all,

I think it's time to start to discuss about a possible migration of conduit to the code-base of tuyau. More generally, one year ago we decided to find a proper way to replace conduit by something more powerful.

conduit can be hard to understand and it's why I wrote an article to explain more precisely what I had in my mind: Tuyau, the next conduit.

Some tasks come to my mind:

  • be able to properly initialize a TLS connection (certificates, etc.)
  • a better interface about Service
  • be able to extend outside the library protocols available

I think we solved all of that into a (not so) new interface. The key of this deep update is the use of extensible variant and GADTs.

So I think it's time to talk more technically about a possible migration, details about implementation, some missing points about comprehension (which is possible even if I wrote an article about that) and finally a plan over all MirageOS projects to migrate to the new interface.

I really would like to aggregate opinions of all people where conduit is everywhere and I would not like to spoil anybody about a possible migration.

The best of what you should do is to read my article (which wants to give you a global view of the project) and examples available on my repository to really understand what is going on. For an other feedback, my current blog and https://paste.x25519.net/ uses both tuyau instead to use conduit as a way to initialize a server (I still continue to use conduit for irmin however as a client). I did not get crashes at this layer from what I know.

I'm really disposal to talk about some points:

  • the idea to use [ host ] Domain_name.t instead Uri.t
  • enforce at the first layer type of input and output
  • keep the ability to switch between Lwt or Async (or Unix as my example)
  • the idea to use a Map.t (no side-effect) instead an Hashtbl.t as the global resolver
  • the new interface of FLOW (eg. val read : flow -> input -> ([ Eof | Input of int ], error) result)
  • the new interface of SERVICE (eg. listen & accept)
    about that, you mostly be interested by tuyau_mirage_tcp which re-implement accept to
    be close to Unix.accept
  • the way to compose a FLOW with TLS (eg. tls/tuyau_tls.ml is the main implementation for any)
  • the global design which expects that the user must fill explicitly the Map.t to be able to resolve instead that a filling my application of functor (as conduit does with functoria)

So don't hesitate to participate, go deeply into my code, improve the documentation and share your opinion about that 👍 ! I will let this issue open for 2 weeks, then, depending on what we said, I will do what we will agree. Thanks!

@nickbetteridge
Copy link

I'm an absolute fan of Uri.t 👍

@dinosaure
Copy link
Member Author

After many experimentation on both side (client and server), I think it is the time to start to integrate tuyau into conduit now. I will necessary break the API but it's for better things.

@avsm
Copy link
Member

avsm commented Apr 20, 2020

Sounds good. I'm happy to make the first iteration Lwt only, followed by a separate Async one later.

@dinosaure
Copy link
Member Author

See #311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants