You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/vision/status_quo/alan_tries_a_socket_sink.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ let ws_sender = Arc::new(Mutex::new(ws_sender));
26
26
whileletSome(msg) =ws_receiver.next().await {
27
27
debug!("Received new WS RPC message: {:?}", msg);
28
28
29
+
letws_sender=ws_sender.clone();
30
+
29
31
async_std::task::spawn(asyncmove {
30
32
letres=call_rpc(msg).await?;
31
33
@@ -72,7 +74,7 @@ while let Some(msg) = ws_stream.lock().await.next().await {
72
74
73
75
Alan wonders if he's thinking about it wrong, but the solution isn't as obvious as his earlier `Sink` approach. Looking around, he realizes a solution to his problems already exists-- as others have been in his shoes before-- within two other nearly-identical pull requests, but they were both closed by the project maintainers. He tries opening a third one with the same code, pointing to an example where it was actually found to be useful. To his joy, his original approach works with the code in the closed pull requests in his local copy! Alan's branch is able to compile for the first time.
74
76
75
-
However, almost immediately, his request is closed with a comment suggesting that he try to create an intermediate polling task instead, much as he was trying before. Alan is feeling frustrated. "I already tried that approach," he thinks, "and it doesn't work!"
77
+
However, almost immediately, his request is closed [with a comment suggesting that he try to create an intermediate polling task instead](https://github.com/http-rs/tide-websockets/issues/15#issuecomment-797090892), much as he was trying before. Alan is feeling frustrated. "I already tried that approach," he thinks, "and it doesn't work!"
76
78
77
79
As a result of his frustration, Alan calls out one developer of the project on social media. He knows this developer is opposed to the `Sink` traits. Alan's message is not well-received: the maintainer sends a short response and Alan feels dismissed. Alan later finds out he was blocked. A co-maintainer responds to the thread, defending and supporting the other maintainer's actions, and suggests that Alan "get over it". Alan is given a link to a blog post. The post provides a number of criticisms of `Sink` but, after reading it, Alan isn't sure what he should do instead.
78
80
@@ -90,6 +92,9 @@ A few weeks later, Alan's work at his project at work is merged with his new for
90
92
* If there's a source of substantial disagreement, the community becomes even further fragmented, and this may cause additional confusion in newcomers.
91
93
* Alan is used to fragmentation from the communities he comes from, so this isn't too discouraging, but what's difficult is that there's enough functionality overlap in async libraries that it's tempting to get them to interop with each other as-needed, and this can lead to architectural challenges resulting from a difference in design philosophies.
92
94
* It's also unclear if Futures are core to the Rust asynchronous experience, much as Promises are in JavaScript, or if the situation is actually more complex.
95
+
* The `Sink` trait is complex but it solves a real problem, and the workarounds required to solve problems without it can be unsatisfactory.
96
+
* Disagreement about core abstractions like `Sink` can make interoperability between runtimes more difficult; it also makes it harder for people to reproduce patterns they are used to from one runtime to another.
97
+
* It is all too easy for technical discussions like this to become heated; it's important for all participants to try and provide each other with the "benefit of the doubt".
93
98
***What are the sources for this story?**
94
99
*<https://github.com/http-rs/tide-websockets>
95
100
* <https://github.com/http-rs/tide-websockets/pull/17> - Third pull request
0 commit comments