christoph-lucas / bifrost

1 stars 0 forks source link

Redesign multiplexing #61

Open bjoerntm opened 7 years ago

bjoerntm commented 7 years ago

One could discuss changing the multiplexing architecture as follows:

This has advantages:

It also has disadvantages:

bjoerntm commented 7 years ago

This seems to hint at the following: MultiplexingID should probably not be in an api package, but rather in an impl one, since it is an implementation detail of the multiplexing scheme.

In particular, this would also mean breaking up the IdKeyPair, since this is actually something that breaks the layers. The key establishment should, well, establish a key, and if we want to assign an ID for a higher-level protocol we can still easily do this in the next layer. (I am aware that this is currently interleaved with the multiplexer and may imply some restructuring there.)