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

async/await #29

Open
parasyte opened this issue Dec 17, 2019 · 1 comment
Open

async/await #29

parasyte opened this issue Dec 17, 2019 · 1 comment

Comments

@parasyte
Copy link

I'm working on an async networking service that will need to emit metrics, soon. After looking at the existing crates available, dogstatsd is one of my top choices. Unfortunately for me, none of the existing crates support async/await. But fortunately for you, I will be able to dedicate some company time to implement this.

Before I begin any work or submit any PRs, I'd like to start a conversation to work out the details. Has there been any brainstorming on what the API might look like, or are there any immediate plans to begin work on async/await? Would you be happy with a feature gate to transform the public API into an async interface, or would you prefer a separate collection of structs? Or maybe even a separate crate altogether?

The code as-is seems like it would lend itself pretty nicely to the former; a feature gate. One challenge I can spot right away is that the Client struct assumes it will be responsible for creating the socket (tightly coupling it with the socket impl in std). This is easy to change to a type that is generic over anything that implements Read + Write (or AsyncRead + AsyncWrite).

This work will probably fall on my plate in early January. Let me know if you are interested in collaborating, and what (if anything) may have already been done.

@bitemyapp
Copy link

I've got a PR up for a Tokio client here: #33

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

2 participants