« first day (2662 days earlier)      last day (817 days later) » 

10:07 AM
What would you use to do https/Rest/json queries without openssl, preferably async ?
I'm trying ureq but it's not async
 
 
1 hour later…
11:10 AM
@DenysSéguret reqwest?
I've only used it a little, hence the ?
 
@trentᶠᵒʳᵐᵉʳˡʸᶜˡ I don't think it can do TLS without openssl
 
I'd rather avoid the pains of installing openssl everywhere
 
The list of optional features (docs.rs/reqwest/latest/reqwest/index.html#optional-features) includes some for using rustls
 
@trentᶠᵒʳᵐᵉʳˡʸᶜˡ Oh, you're right! I'll try that
Either it's quite new or I lost time with openssl for no reason 2 years ago ^^
 
11:26 AM
@DenysSéguret you've written some Go, right? I was setting up massif-visualizer for valgrind and was surprised a HashMap<u32, &str> seems to allocate 70% of Go's map[uint32]string. Wonder what the final memory usage will end up looking like when I compare larger structs. I suppose there might be something wrong with my basic setup code.
 
Hard to tell on this case. Can't it be just the size of the default allocated storage before growing ?
A Go program will probably always use more memory than a Rust one but it's not something usually concerning
 
@DenysSéguret ah, yes, my mistake, I didn't know there was a size hint in Go similar to Rust's with_capacity, this reduces it quite a bit!
 
11:49 AM
How are you all dealing with async ? Just pick one of the two ecosystems and stick with it ?
 
12:08 PM
Aye.
I plan to stick with Tokio, which is more widespread than async-std.
It's what we get from the lack of GATs.
 
 
4 hours later…
3:56 PM
@DenysSéguret rustls
@DenysSéguret tokio team too
 
 
1 hour later…
4:57 PM
Just to double check, is my understanding correct in that if there are no insertions for a hash table (e.g. storing query parameters) and only look-ups are used, there's no possibility for denial of service? The examples I've seen so far all involve expensive insertions.
 
:headscratch: Look-ups also involve hashing, but if the table is well balanced, it will be cheap to find whether a given key is in the table.
 
I don't have the slite clue about what you are talking about
 
Insertions are a better attack vector because each insertion increases the n in O(n).
 
@E_net4thecurator ha, right, :also-scratches-head:
@E_net4thecurator yes, I wondered if I could go for one that's not cryptographically secure. A lot of values in this predefined map are looked up
 
Now I just realized that I am more likely to chin-scratch than to head-scratch.
 
5:08 PM
@Jason I don't think anything makes denial-of-service impossible, but I think read-only makes it far less likely that the hashtable is the bottleneck that fails. Bear in mind a DoS is just finding and hammering the least-throughput portion of whatever service path is being exploited
 
I'm more a cheek scratcher myself
I'll be right back, quick run, thanks for the answers so far!
 
@Jason Might be a use case for perfect hashing.
 
If it's predefined, I'd definitely look at phf!
 
@Jason yes, the often mentioned DOS on hashtables is only if you do insertions. And it's exaggerated IMO
 
6:06 PM
@DenysSéguret That's not true actually. Depending who provided the data to the hash-map. If it is user-defined, then hash-dos is possible even from the read-only hash-map as the lookup will become so much worse than O(1)~ and requesting data which requires looking up colliding keys constantly would certainly satisfy the definition of hash-dos.
However if the data is provided by you, and as @E_net4thecurator mentioned it the hash-map is well-balanced (i.e. the lookup will be indeed O(1)~) then a read-only hash-map is most certainly protected from hash-dos. Unless I completely misunderstood what we're talking about.
@PeterVaro *could become
 
 
1 hour later…
7:38 PM
Yes, thanks all! The data is indeed not provided by the user. I'll look into the recommendations :-)
 

« first day (2662 days earlier)      last day (817 days later) »