News for hackers. Stuff that matters.
Re:Designing a new concurrent data structure by audnaun252 on Monday August 28, 2023 @04:20PM (#37299911)
seems like a lot of effort - could you have moved the map state to rust instead? to invoke the AuthCrypto.verifySignature with just the key?
Re:Designing a new concurrent data structure by jerrinot on Monday August 28, 2023 @05:03PM (#37300364)
That's indeed a very good question! There are 2 sets of reasons:

1. Technical

The contract is given - I'm receiving usernames as CharSequence(String). I could change that, but that would likely require changes in the SQL parser - not simple at all. Alternatively, I could pass the whole CharSequence to Rust - but passing objects over the JNI boundary comes with perf. penalty (when compared to passing primitive) and we avoid that whenever possible. Or I could encode CharSequence content to a temporary offheap buffer and pass just the pointer to Rust. But this brings back some of the questions from the article - like who owns the buffer?

2. Other reasons

I realized this was a possibility only when I was nearly done with the design (this whole endeavor took less than one day) and I felt the urge to finish it. Also: This article wouldn't have been created!

Re:Designing a new concurrent data structure by moonchild on Tuesday August 29, 2023 @04:36AM (#37304877)
I have the opposite question: why not write everything in java?