question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IProtocol abstraction / Application facing interface

See original GitHub issue

is there a common pattern to express HttpApplication, MqttApplication and others?

for me it is about transforming IDuplexPipe to IProtocol. What I think of is:

public interface IProtocol<TRequest,TResponse>
  {
    ChannelReader<TRequest> Input { get; }
    ChannelWriter<TResponse> Output { get; }
  }

public interface IProtocol<TMsg> : IProtocol<TMsg,TMsg>
  {
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
davidfowlcommented, Dec 24, 2019

nice move on moving it to nuget, I’m using it in a project I just started a couple of weeks ago https://github.com/MithrilMan/MithrilShards specifical implementation at https://github.com/MithrilMan/MithrilShards/tree/master/src/MithrilShards.Network.Bedrock

Nice!! I need to iterate on the interface a bit since it forces allocations today. There needs to be a protocol reader interface that either returns a disposable or has an Advance method on it. I hope to get feedback for this.

As a note, I think would be nice to have an explicit method to override from ConnectionHandler to catch peer disconnection, so other than public abstract Task OnConnectedAsync(ConnectionContext connection); we should have a public abstract Task OnDisconnectedAsync(ConnectionContext connection, Exception ex);

This could be built on top. Right now the lowest level is basically a single call and when that task completes.

good job on this library, is it planned to be merged into next dotnet core release somehow?

Thanks! This is my playground to figure out what is useful to people. I’m not sure if all of it will make it into .NET Core but hopefully some of the core abstractions will at some point.

1reaction
JanEggerscommented, Dec 24, 2019

thx for letting me know. and have nice holidays

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access iProtocol - Getting Started
Welcome to iProtocol, the IRB-SBS online application for creating, submitting, reviewing, and approving human subjects research protocols.
Read more >
On device abstractions for portable, reusable robot code
This paper de- scribes the application of three well known abstractions, the character device model, the interface/driver model, and the client/server model to ......
Read more >
21.1. Why Twisted?
With Twisted, the clients and servers are written in Python using a consistent interface. This makes it is easy to write new clients...
Read more >
(PDF) Fighting livelock in the GNU i-protocol: a case study ...
Fighting Livelock in the i-Protocol 3 this abstraction of the protocol in VPL (Value Passing tial. Similarly, the results of our case study...
Read more >
ABSTRACT
The goal of this thesis is to apply abstraction techniques to software systems (more specifically, programs written in the C programming language), in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found