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

Guidelines on writing networking clients #2814

Open
kristoff-it opened this issue Jul 4, 2019 · 3 comments
Open

Guidelines on writing networking clients #2814

kristoff-it opened this issue Jul 4, 2019 · 3 comments
Labels
Milestone

Comments

@kristoff-it
Copy link
Member

Since we are nearing #1778, there are going to be a lot of clients that need to be written (e.g. http #2007), and since I suspect more and more people are coming to Zig from higher-level languages, like me, I think it would be useful to have a short list of resources / guidelines on writing clients in Zig.

I'm personally interested in writing a Redis client for Zig but I only have cursory experience in writing parsers + networking.

I recently read a bit about streaming and sans i/o parsers, but I'd like to get more pointers on the subject from people more experienced in systems programming.

I'm sure that many of these concepts are worth applying to most (if not all) networking clients so keeping a list somewhere would prove useful to many.

@andrewrk andrewrk added the docs label Jul 4, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Jul 4, 2019
@kristoff-it
Copy link
Member Author

kristoff-it commented Jul 4, 2019

One example: https://sans-io.readthedocs.io/

(whether this should be considered a good suggestion or not, is to be decided)

@ikskuh
Copy link
Contributor

ikskuh commented Jul 6, 2019

The idea behind Sans I/O sounds reasonable. Imagine someone wants to use Zig on an embedded platform and can just adjust the HTTP client to use its embedded TCP/IP stack instead of having to rewrite it over and over again just because the standard library "enforces" the posix network layer or such

@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Oct 2, 2019
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Apr 14, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@xylobol
Copy link

xylobol commented May 18, 2024

Imagine someone wants to use Zig on an embedded platform and can just adjust the HTTP client to use its embedded TCP/IP stack instead of having to rewrite it over and over again just because the standard library "enforces" the posix network layer or such

This is sort of what I'm running into now - new OS, new networking stack. Currently, I have to have a fork of the standard library that supports this, compared to just defining a separate stream implementation and passing this into the HTTP client implementation.

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

No branches or pull requests

4 participants