Comments (4)
The fundamental issue here is that there is a fundamental disconnect here between requests and responses - the loop that dequeues network traffic, processes frames, and matches each response to the originating request - is not, and cannot be, directly tied into the same context that is sending requests, because the core of the lib is not "request, wait/await, response" - it heavily reuses minimal connections, sending lots of messages from separate threads down the same socket, and just keeping track of the request order.
So; if what you're asking is "how can I trace this from end to end" - I don't have a mechanism to make that work; we're not passing flow-context here - rather, we're simply signalling completion via TaskCompletionSource<T>
as we identify responses.
Unrelated: I have some other work in the pipe to make protobuf-net work much more efficiently with pipelines, and this has already absorbed changes to make it work with the kinds of buffers that RedisValue
makes available, so: there might be some other gains up ahead if you're using binary, although it looks like you're using base-64. I wonder whether there might be an alternative scheme possible there in the future where you lease an oversized array from ArrayPool
, decode into that array, then pass the oversized array to protobuf (and finally release the array back to the pool)
from pipelines.sockets.unofficial.
Thanks @mgravell - that does make sense, and at least confirms roughly what I thought, and thanks for the heads up on the protobuf support for pipelines as well. This isnt a super performant demo yet and I'm just tweaking as I go to get back into some skills (perf analysis) that I haven't used for a while.
Am I completely SOA here? Given its deeply entrenched position I'm assuming turning pipelining 'off' is a non-starter. Can I ask how you would approach finding the upstream hot path under these circumstances?
from pipelines.sockets.unofficial.
did you mean SOL? yes, the codebase is written fully with that intent
from pipelines.sockets.unofficial.
Ha, yes I meant SOL. Obviously having flashbacks today to other projects!
from pipelines.sockets.unofficial.
Related Issues (20)
- High CPU due to lock contention on _queue in DedicatedThreadPoolPipeScheduler.Schedule HOT 6
- Xamarin.Android crash with native exception on SocketConnection.Create HOT 2
- TLS/SSL support HOT 6
- How to find out when/if the reader/writer completed HOT 3
- Does this project only support .Net Core, instead of .Net Framework? HOT 8
- if the implementation of this library has relation ship for Rio(Winsock registered I/O extensions) in Windows? HOT 2
- Unable to wait for socket closure HOT 2
- Test: MutexSlim_ConcurrentLoadAsync_DisableContext - fails on my machine
- Test: ConnectTests.Connect - Fails on my machine HOT 1
- Test: BufferWriterDoesNotLeak also fails on my machine
- Set unsafeSuppressExecutionContextFlow on SocketAsyncEventArgs HOT 3
- Loopback fast path is deprected on Windows and can cause high cpu on Win Server 2019 HOT 2
- How do I flush synchronously? HOT 5
- Pump a pair of PipeReader/PipeWriter
- Investigating SemaphoreSlim on net6.0+ HOT 1
- Unnecessary _queue.Count check in DedicatedThreadPoolPipeScheduler.RunWorkLoop HOT 7
- netstandard2.1 DoReceive fails on Zero Length Reads on Mono HOT 1
- Thread Safety Violation Warnings found by InferSharp static analysis tool HOT 3
- Trim and AOT warnings in Delegates and PerTypeHelpers HOT 3
- Fix Thread Safety and other static code analysis issues reported by Infer#
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipelines.sockets.unofficial.