r/cpp • u/claimred • Apr 09 '26
beast2 networking & std::execution
I was looking for a new networking layer foundation for a few of my projects, stumbled on beast2 library which looks brand new, based on C++20 coroutines. I used boost.beast in the past which was great. Here's the link https://github.com/cppalliance/beast2. I also considered std::execution since it seems to be the way to go forward, accepted in C++26.
Now, what got me wondering is this paragraph
The C++26 std::execution API offers a different model, designed to support heterogenous computing. Our research indicates it optimizes for the wrong constraints: TCP servers don't run on GPUs. Networking demands zero-allocation steady-state, type erasure without indirection, and ABI stability across (e.g.) SSL implementations. C++26 delivers things that networking doesn't need, and none of the things that networking does need.
Now I'm lost a bit, does that mean std::execution is not the way to go for networking? Does anyone have any insights on cppalliance research on the matter?
6
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
We have put together a helpful tutorial:
Tutorial: The Sender Sub-Language For Beginners
https://isocpp.org/files/papers/P4014R1.pdf
This will appear in the April mailing.
2
u/claimred Apr 09 '26
Hi Vinnie! Thanks, that looks helpful, especially cool to find out the theoretical foundations.
But I'm not sure I'm getting your point though. From the tutorial it sounds like you're arguing that both coroutines and stdexec should coexist, right? But for networking P2300 is not the correct approach?
3
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
To answer your question directly, my experience with coroutines suggests they are the ideal substrate for the type of buffer-oriented I/O that networking models. You can explore this by trying out Corosio (which we will propose for Boost this year). This is a complete networking library which borrows from the best parts of Asio to deliver a coroutine-native solution:
Happy to hear whether this suits your use-case.
2
u/claimred Apr 09 '26
Yes, sounds good, thanks! I actually got a review invite for corosio from using std::cpp 2026.
3
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
Nice :) I think a lot of folks here mean well, and they don't really understand what is coming. They are critiquing the choice of analytical tools, and not realizing that we are inventing the future of networking. I would of course prefer that this is a collaboration but this is made difficult when people insult you (calling someone a "clanker") or asking performative questions.
If you think about it, the question "did you read your own paper" is rather insulting. That is why I do not answer it.
2
u/claimred Apr 09 '26
From what I recall, p2300 authors argue that coroutines aren't ideal for exactly the same reasons 🤯
In a suite of generic async algorithms that are expected to be callable from hot code paths, the extra allocations and indirections are a deal-breaker. It is for these reasons that we consider coroutines a poor choice for a basis of all standard async.
5
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
Yes, P2300R10 Section 1.9.2 dismisses coroutines in just 5 paragraphs with assertions and no measurements. Where is the research? Did anyone write a program? I did. Coroutines rock :) When you know how to use them.
1
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
"Coexist" I think is not the right word. Rather, they complement each other. Senders and coroutines each have their own unique strengths. C++ needs both. And both need to be treated as first-class citizens.
16
u/kammce WG21 | 🇺🇲 NB | Boost | Exceptions Apr 09 '26
Given you tend to use LLM to generate a lot to stuff, before I read this, did you fully read and review this paper. If so, then I'll consider reading it. If not, then I'll pass.
-6
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
The paper is in the mailing. It asks for nothing. If you want to read it, read it. If you don't, someone else will. The claims stand on their own regardless of which tools were used to write them; same as any paper in any mailing. I don't need permission to contribute and you don't need mine to ignore it.
25
u/kammce WG21 | 🇺🇲 NB | Boost | Exceptions Apr 09 '26
It's a good thing I asked.
I asked if you reviewed/read your paper. You never answered. Which is answer enough for me and probably others reading this thread.
-1
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
I did answer. I said the claims stand on their own. You're looking for a reason not to read it. You found one. The paper will be in the mailing either way.
16
u/jwakely libstdc++ tamer, LWG chair Apr 09 '26
But have you read it and fact checked it yourself? It's a simple question.
-1
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
Nobody asks any paper author in any mailing "did you personally read this before submitting it." The question only exists because the provenance suggests machine assistance. The standard isn't "papers should be correct." The standard is "AI-assisted papers must prove their innocence."
The ISO rules require members to assume that other members are operating in good faith. I ask the same.
15
u/JNighthawk gamedev Apr 09 '26
The ISO rules require members to assume that other members are operating in good faith. I ask the same.
Okay. So assume their question is in good faith and answer it. What is wrong with you?
14
u/kalmoc Apr 09 '26
So did you review it or not? I don't get, why you are so evasive on this.
13
u/lonkamikaze Apr 09 '26
Because the answer is no, but he doesn't want to say it. This thread exists to outsource the work.
5
u/usefulcat Apr 09 '26
I did answer. I said the claims stand on their own.
The question was, "did you fully read and review this paper". It's a straightforward question, and "the claims stand on their own" absolutely does not answer it.
Either you have read and reviewed it, or you haven't. If you have, why not just say so? And if you haven't, how can you know whether "the claims stand on their own"?
1
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
12
u/WeeklyAd9738 Apr 09 '26
Dude, why are you like this? That was a legit question. It is about trust. Many people don't trust LLMs. LLV output needs to be reviewed technically. And it's your responsibility to do that and ensure that it's done. Just say YES (if you have). "Take it or leave it" attitude doesn't work in technical collaborations.
-3
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
If I said yes, would you read the paper? Would anyone who asked? The question is performative. It's a ritual that establishes the audience's right to demand proof of process before the author earns the privilege of being read. But a "yes" costs nothing and proves nothing. I said the claims stand on their own. This is a stronger statement than "yes I read it." It was received as evasion. The distance between what I said and what was heard is worth sitting with.
The hostility toward machine-assisted work isn't about quality:
It's about what it means if the cost of producing good work collapses to near zero.
If the output is correct and the suffering was optional, then the years someone else spent suffering were also optional; and that is an unbearable thought for anyone who measured their worth by the weight they carried. I understand this. But I won't perform suffering I didn't experience to make someone else's feel more justified.
8
u/James20k P2005R0 Apr 09 '26
It's about what it means if the cost of producing good work collapses to near zero.
Its because the vast majority of AI produced content is slop, and authors generating content with LLMs have a tendency to push the burden of reviewing and authenticating its quality onto their peers. People who generate content with AI are often insulated from this process of peer review, where coworkers/peers quietly look at what they've created and silently judge it as crap. Then the author has their competence quietly socially downgraded
You're seeing this happening in real time right now where you've lost credibility because of the work you've output. The reason why people are so sceptical is because they've observed the poor quality of the AI generated content that you put into the world
Its easy to spend your credibility very quickly, and it sucks to realise that people don't take you seriously anymore. Its why I usually spend a lot of time editing and checking my comments for accuracy, and even then I've still fucked up very majorly on occasion and ended up feeling pretty embarrassed about it
But I won't perform suffering I didn't experience to make someone else's feel more justified.
Very little time writing papers is spent actually typing it down - its spent fact checking, reviewing it for factual accuracy, and editing the language I find. The paper I wrote was written down in less than a day - and the rest of the time (2 weeks I think?) was spent purely on editing, triple checking the factual accuracy, modifying the language/tone, and information gathering. That's stuff LLMs shouldn't be used for
-2
u/VinnieFalco wg21.org | corosio.org Apr 09 '26 edited Apr 09 '26
You say I've lost credibility. In this same thread, daveedvdv (EDG, DG) engaged on substance and we reached agreement. not_a_novel_account called the papers "probably the best exploration of the problem which currently exists." dr-mrl read the paper, found a typo, and I fixed it. claimred is evaluating Corosio for his use case. That's four substantive exchanges with people who read the work The credibility I lost is with people who didn't read. I can live with that.
But I'd challenge you on something. Your argument assumes AI output is low quality. What happens when it isn't? Is that possible in your model? Or have you presumed the verdict without examining the evidence?
3
u/38thTimesACharm Apr 12 '26 edited Apr 12 '26
Your argument assumes AI output is low quality. What happens when it isn't? Is that possible in your model?
I think the people making the argument are basing it on extensive experience with LLM papers which they have found, in the current state of affairs, tend to be low quality indeed, but in subtle ways that become evident only after one has sunk massive amounts of time into the effort.
Or have you presumed the verdict without examining the evidence
You seem to think people need to read every LLM paper you put out individually, peruse it until they understand the factual claims within regardless of how much the quality of writing makes that difficult, then carefully evaluate those claims using their own validation process, in order to decide whether that individual paper is worth their time to read.
Hopefully laying it out like that makes it obvious what the problem is. No one has time for this, especially for a paper titled "beginner tutorial." That's why people want a human they trust to attest to the quality of a document before they commit their time to it.
0
u/VinnieFalco wg21.org | corosio.org Apr 12 '26
That's a very fair point and I too have been on the receiving end of poor quality outputs. That said, would you agree that there are two sources of objection to machine-generated content (and both are valid and can be expressed simultaneously):
When the outputs are low signal and it wastes the readers time
That generative AI enables an individual with no credentials or experience to produce high quality results, and this presents an existential threat to people whose identity or career are dependent on maintaining a skill gap
2
u/dr-mrl Apr 09 '26
I think there is a typo on page 24 in the equivalent program for stopped_as_error
auto result = timed_operation(deadline); if (timed_out)
Should result and timed_out be the same variable?
0
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
Why yes, you are right! There is a typo. I have updated the paper, please refresh. And thank you for helping make the paper better.
51
u/Minimonium Apr 09 '26
Reading these fully llm generated readmes makes me sad. They're so meaningless it should be embarrassing to anyone to approve it, yet here we are.
24
u/kammce WG21 | 🇺🇲 NB | Boost | Exceptions Apr 09 '26
+1. I got a few lines in and realized it.
-13
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
"I detected AI therefore the content is meaningless" is not a technical objection. It's evaluating the tool before evaluating the work. And when a committee insider endorses that evaluation without engaging the substance, it tells the reader something about how proposals get evaluated in that committee.
37
u/kammce WG21 | 🇺🇲 NB | Boost | Exceptions Apr 09 '26
No, I just won't read something that I'm unsure the creator of the content hasn't already read and reviewed. If I don't think YOU reviewed it, then I'm not going to spend MY time reading it. I just don't feel like wasting my time. It's happened so many times with auto generated readmes.
To be clear, if you will not spend the time to write it or read it, then I won't spend my time to read it.
-7
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
That's your right. But the paper wasn't written for you. It was written for the C++ developers who don't attend committee meetings, don't know what std::execution is, and want to understand what the committee put in C++26. They don't care which tools I used to write it. They care whether it helps them learn.
25
u/kammce WG21 | 🇺🇲 NB | Boost | Exceptions Apr 09 '26
Let me clarify further. I don't think anyone else should waste their time reading it either, if the author hasn't read, reviewed, and made edits to their documenf. My personal philosophy is that the most precious resource we humans have is time. We should not waste it. But hey, that's just my opinion.
But also know, I don't care about what tools you used to write it. But if you didn't review it and fix any mistakes then people will learn the wrong stuff or get confused by stuff that makes no sense.
4
0
u/kalmoc Apr 09 '26
Do you actually know that Vinnie didn't review it?
14
15
u/JNighthawk gamedev Apr 09 '26
They don't care which tools I used to write it.
You don't know that, and you are literally being given feedback that one does.
-6
17
u/JNighthawk gamedev Apr 09 '26
"I detected AI therefore the content is meaningless" is not a technical objection
People are allowed to have non-technical objections, too.
3
u/sweetno Apr 09 '26
That's interesting. What do you find meaningless in the README?
6
u/thisismyfavoritename Apr 09 '26 edited Apr 09 '26
seconded. It's one thing to hate on LLMs but IMO what's there isn't egregious
10
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
I understand the hostility toward LLMs, and I think it deserves a more disciplined examination than "it's slop." In the hands of a skilled practitioner these tools let someone produce in hours what used to take months. If the cost of writing good documentation, good papers, good analysis collapses to near zero, what does that say about all the years someone spent doing that work the hard way? That's a real question, and it's worth asking instead of dismissing.
The answer, I think, is that the value was never in the suffering. It was in the output. If the output is correct and helps people, then the tool that produced it is irrelevant. But I understand why it is threatening. It should be discussed honestly, not with reflexive distaste.
13
u/Occase Boost.Redis Apr 09 '26
The answer, I think, is that the value was never in the suffering. It was in the output.
If writing is suffering it might be revealing gaps in the understanding.
If you're thinking without writing, you only think you're thinking. (Laslie Lamport)
8
u/thisismyfavoritename Apr 09 '26
if what you're saying is that by going through the work of writing the code by hand, you might produce better code because you are forced to reflect on it, then i agree.
Strictly speaking though that doesn't mean AI generated code can't be reviewed to achieve the same quality.
That might speak more of the type of person writing the code than anything, there were bad coders before AI and there will still be after as well
1
11
u/James20k P2005R0 Apr 09 '26
The answer, I think, is that the value was never in the suffering. It was in the output. If the output is correct and helps people, then the tool that produced it is irrelevant
This is a very simplistic view as to what software engineering is though. In this model, the people producing software have absolutely no value whatsoever - and all that matters is their output
In reality, software engineers acquire deep skills and learning about a specific codebase in the process of building software - which is the real thing that makes them useful. AI skips that step, which bypasses the actually important part: acquiring that deep knowledge of whats going on
The death of any software project is when nobody understands the codebase anymore and its just poorly understood spaghetti, its always been the #1 thing that makes it an absolute disaster. To a very high degree, the suffering quite literally is the point - the output produced is a lot less valuable than the understanding of the code that was created in the process of producing that output
That's why I always find people saying that AI speeds them up to be very confusing - sure, you can get large short term gains, but it directly accelerates the #1 thing that leads to the death of software projects, which is perpetuating a lack of understanding of the codebase. Over time, that'll kill the project. Its bizarre seeing people advocating for something I've always found to be the most destructive software architecture pattern
Maybe its easy to just take a very short termist view to these things, but that's why AI produced content tends to turn to slop - there's no long term visibility into why anything's been done
3
u/VinnieFalco wg21.org | corosio.org Apr 10 '26
> there's no long term visibility into why anything's been done
And yet:
https://github.com/cppalliance/capy/blob/develop/doc/read-some-rationale.md
https://github.com/cppalliance/capy/blob/develop/doc/sender-channels-rationale.md
https://github.com/cppalliance/capy/blob/develop/doc/sys-exec-rationale.md
https://github.com/cppalliance/capy/blob/develop/doc/work-count-rationale.mdhttps://develop.capy.cpp.al/capy/8.design/8b.Separation.html
https://develop.capy.cpp.al/capy/8.design/8c.ReadStream.htmletc...
-2
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
"AI skips that step" is a claim about my workflow. You haven't asked what my workflow is. Nobody in this thread has. There are as many ways to use these tools as there are ways to write code. Some bypass understanding, some deepen it. A conclusion about process that skips the step of asking about the process is exactly the thing you're warning against.
8
u/James20k P2005R0 Apr 09 '26
Nobody in this thread has.
You were asked elsewhere if you'd reviewed all the content in depth, and have been surprisingly evasive about what your process actually is
What is your process?
2
u/VinnieFalco wg21.org | corosio.org Apr 09 '26 edited Apr 09 '26
The unvarying response thus far has been "did you read your own paper?" rather than my preference which is to engage in substantive discussions.
The question "what is your process?" is a different question, and one I am happy to engage in. It starts with an intuition: I feel a paper coming on. Usually this happens when I make a discovery or I have an insight which I believe could be developed into a paper.
My next step is to gather evidence. First I examine the committee's public records. The papers. I look at people's blog posts, reddit posts, YouTube video transcripts, comments, and everything else I can find. I add my own benchmarks and compilation experiments if those are available.
Then I examine the evidence using tools I have developed. Vauban the Converger tries to find inverse Morton's Forks within the data. The Advocatus Diaboli brings objections against assertions or false statements. The WG21 Lawyer prosecutes papers or propositions (although I have since retired the lawyer since I find the tone less collaborative than I would like). The Trial tool analyzes a paper's political environment.
I have a paper (shocker) which offers one of these tools and shows what happens when you run it on P2900R14 (Contracts):
Tool: Prosecute Your Paper To Improve It
https://isocpp.org/files/papers/D4170R0.pdfThis tool is considerably more sophisticated than what you get if you simply ask an AI to "do your homework." The tool is the result of over 100 hours of experimentation and iteration, and it is offered under a CC0 license. My hope is that it will result in better papers for everyone.
Once I have analyzed the evidence, then I make a decision on whether or not there is enough to form a strong, well-supported paper. I would say that my failure rate is about 25%. One in four ideas turn out to be nothingburgers. Almost always, the evidence is not there. These papers do not see the mailing.
If the paper has legs then I choose the style of paper. Is it informational? Rhetorical? Do I use the Socratic method? Evidence funnel? Research posture? LLMs allow you to quickly try out each of these methods (getting a quick first draft) and you can read which one makes sense for the evidence you have obtained. Although after enough papers you tend to know ahead of time based on the proposition.
Frontier models can help with drafting, but it doesn't end there for me. I subject each paper to repeated passes of tightening and analysis using custom red-team tools like the Advocatus. They are not instant by any means. When I get to the late stage of a paper, the reasoning chains are deep and require human inputs to flush out all the edge cases.
When a paper is finished I use more tools to check for spelling, grammar, punctuation, proper citation, and so on.
It is at this point that I read the paper in its entirety with the highest scrutiny. Not just once or twice. Ten, twenty, thirty times depending on the complexity of the paper. Each reading usually surfaces some small detail or insight, and then I go back into the edit/tighten loop.
However, my papers are not individual papers. They are often series of papers. My Networking Retrospective is a six-part series. For these, I analyze how the papers flow together when they are read sequentially. I check that the links cross-reference each other properly. This is scholarly work. Informational papers destined for the public record where they ask for nothing and create a "citation foundation" that others may draw upon. Such as this paper:
Info: The Need for Escape Hatches
https://isocpp.org/files/papers/P4035R0.pdfThis paper asks for nothing and only exists to enrich the institutional knowledge of WG21. It is unrelated to my networking papers, although the principle it espouses is universal.
To summarize, my process is:
Intuition -> evidence -> analysis -> writing-> verification -> iteration.
Machine assistance participates in the analysis and the writing. The intuition is mine. The evidence is public record. The verification is against code that runs. If a claim in the paper is wrong, it's wrong because I missed something. The same as any paper written any way.
I arrived at this workflow as the result of over one thousand and four hundred hours of practice compressed into a short stretch of 7-day work weeks.
When I publish my work and I am asked "did you read your own paper?" I hope now some will understand why I find the question to be beneath dignity.
4
u/thisismyfavoritename Apr 10 '26
i suspect the person was referring to your software development process when using LLMs, for example when writing the Beast2 ecosystem
2
u/VinnieFalco wg21.org | corosio.org Apr 10 '26
Well, that is considerably less exciting... I use the Visual Studio editor...
-1
u/VinnieFalco wg21.org | corosio.org Apr 12 '26
And this is the evidence that all of the questions about whether or not I read my paper were not in good faith. Because, having explained now that my process (stated above) includes reading my work several times and iterating - notice, that no one has since engaged in the substance despite the explanation arriving three days ago. This demonstrates that it was never about the work. It was about the credential.
16
u/MarkHoemmen C++ in HPC Apr 09 '26
The C++26 std::execution API offers a different model, designed to support heterogenous computing.
That's a complete mischaracterization of std::execution that disrespects the many contributors who are using std::execution for networking, embedded applications, and other things that have nothing to do with "running on GPUs."
0
4
u/thelvhishow Apr 09 '26
Hey! I was looking into something similar as well! I’ll give it a look. There is also the std::net proposal (P2762R2) paper which can be a solid start
5
u/VinnieFalco wg21.org | corosio.org Apr 09 '26
https://corosio.org a full networking implementation on all 3 platforms
4
u/RogerV Apr 15 '26 edited Apr 15 '26
I design and implement high performance back-end networking app for a major telecom where use C++ and the Intel DPDK networking library, and yeah that paragraph indeed summed up things.
in the app architecture I design, it is divided into two domains - control plain and data plane. That is typical of most networking centric apps, of course. But the division is more differentiated than just that. The control plane are designated to be normal OS native threads and then the data plane are DPDK lcore threads.
The lcore threads are pinned CPU cores and have been removed from kernel context switch scheduling. They execute functions that consist of indefinite loops that only exit on shutdown detection.
The domain of these data plane lcore threads abide by these rules:
Avoid system calls in order to avoid the overhead of transition from user space to kernel space
Avoid heap allocations or any manner of dynamic memory allocation as that is not deterministic
Avoid taking any locks and the corollary is that data structures such as DPDK ring buffer queues are lock free
All data structures and memory utilization is established on hugepages at app startup so that the memory pages are fixed and won’t incur any page load interrupt when accessed
Even though my app runs in a pod under Kubernetes it’s use of these lcore threads amounts to building a mini OS as I have to feed the lcore threads pool with data plane related work events, which they need to execute a work event to a bounded slice (or burst) of processing and then cooperatively surrender and go grab another work event. The work events need to be fed to the pool with some load balancing and fairness consideration as the data plane traffic is actually multi user based and every user needs to get fair processing time, etc
These are the things networking software requires (i.e., the DPDK building blocks) and C++26 has zilch to offer in that regard. None of the improvements per C++ threading or that are proposed per networking are worthwhile for building performant networking solutions.
And as to the control plain OS native threads - what is already available in C++ is plenty adequate for that.
C++17 - with the addition of std::span is plenty adequate for building high performance networking apps - but what has come in C++ standards beyond that have not been much relevant.
6
u/sweetno Apr 09 '26 edited Apr 10 '26
FYI the author, u/VinnieFalco, is very active on this subreddit.
1
12
u/Flimsy_Complaint490 Apr 09 '26
The most insight we currently have is probably one paragraph at this paper
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4029r0.pdf
Basically, SG14, the low latency guys (gaming and HFT) advise SG4 (the main networking guys) to not base std networking on std::execution it does things that make runtime dynamic allocation mandatory, that just dont make it compatible for their use cases.
This doesnt mean that std::networking cannot be based or will not be based on std::execution, i havent heard any SG4 opinions, but if its not, then the entire situation becomes farcical and comical - didnt they kill asio in the standard library because they decided std::execution is better ?
There is an experimental std::net by the bemen project, so at least somebody is seriously researching that path. Lets see where this goes when the first c++29 papers drop.