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.

Another client library for https://nats.io started at https://github.com/AndyPook/A6k.Nats

Nats has a super simple, mostly text based, protocol. So it’s a nice example for Bedrock. The “official” dotnet client is based on the go client. But has a lot of locks and is not really idiomatic c# inside.

A6k.Nats is really early stage, lots of things missing. But the basic pub/pub stuff works. Any commentary on how it’s using Bedrock, structs, ValueTask etc would be really appreciated.

One comment for @davidfowl and others close to corefx… Even if the protocol bits of Bedrock do not make it into a Microsoft.* package… it would be really appreciated if some of the socket based bits already in there could be made public (or at least pubternal, if that’s still a thing).

Having to cut/paste large chunks of stuff out to make a basic client work, just makes me feel a bit dirty 😃

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
AndyPookcommented, Jul 28, 2020

This kind of framework makes me happy. It’s relatively easy/quick to “hide” all the nitty-gritty of networky stuff and actually level up to the thing you’re actually trying to solve.

“feedback”: Make Bedrock.Framework just about the abstractions and “helpers”

  • move Protocols.WebSockets elsewhere (Bedrock.Framework.WebSockets ?)

  • move helper bits out of Experimental into Framework (ie helpers from Bedrock.Framework.Infrastructure)

  • can Client/Builder now be factored in terms of ConnectionBuilder in corefx? (or removed all together?)

  • it would be a-nice-thing if corefx exposed things like SocketConnection/DuplexPipe etc (ie Transports/Infrastructure) so we don’t have to cut/paste them (Orleans has their own copies too).

For writing we always use something like NatsWriter (wrapper around a IBufferWriter< byte >) they’re kinda like extension methods for writing the the things-your-protocol-needs (strings, numbers, blobs, json…) I’ve tended to have some “standard” bits then use partial to add the bits I need for the protocol. So I’m kinda sharing a base type with cut/paste. I wonder if there’s some neater way of doing that? 🤔 though I can’t see how, given how this works.

It does take a certain twist-in-the-brain to grok how to do stuff at this level. Some of the constructs/mechanisms like ref struct, really understanding where/why boxing or allocations might affect perf… etc… is not something this dev is used to. That’s not “feedback” as such, just that you still need to do some learning to be able to do-the-right-thing. But wow! so much “easier” with this (once you get it) than when I first tried to do an mDNS thing back-in-the-day <phew>

0reactions
AndyPookcommented, Aug 23, 2020

none of it is “important” 😃 You’re right the WS stuff is just-a-bunch-of-classes. I guess I’m looking for a set of parts to build clients/protocols. Having some other set of protocols in the package is a bit of a distraction. No biggie.

ConnnectionBuiler… more of a question really. But sure, it’s just one opinion/style of many. I’m trying to get a grip on what moving parts I need to figure out and which I can just reuse and hoping for less copy/paste. A lot of these things “appear” to be very similar, just different naming. I’ll need to spend more me in this space to really grok why some of these things can’t be public/resusable.

I’ll try to pay more attention to 5.0 see what I can get to “click”

Read more comments on GitHub >

github_iconTop Results From Across the Web

NATS.io – Cloud Native, Open Source, High-performance ...
Multi-cloud to Edge. Connect all your applications and data - in the cloud, on premise, and at the edge. Talk with an Expert ......
Read more >
NATS - The Cloud Native Messaging System
NATS is a simple, secure and performant communications system for digital systems, services and devices. 744 followers · https://nats.io · @nats_io ...
Read more >
NATS Messaging - Wikipedia
NATS is an open-source messaging system (sometimes called message-oriented middleware). The NATS server is written in the Go programming language.
Read more >
NATS.io (@nats_io) / X
NATS is a connective technology powering modern distributed systems, unifying Cloud, On-Premise, Edge, and IoT.
Read more >
NATS | Cloud Native Computing Foundation
NATS.io is a connective technology for distributed systems and is a perfect fit to connect devices, edge, cloud or hybrid deployments.
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