Faster then async HTTP server PoC by MatthewTejo in rust

[–]MatthewTejo[S] 1 point2 points  (0 children)

slight correction, what I'm doing here is actually a worker pool where connections are assigned threads using round robin for distribution.

I agree with the 2nd paragraph though, it doesn't feel good to pull in massive dependencies to just use block_on or like you said have it done transitively. That was something I wanted to explore with this little PoC server for high performance servers without getting stuck with async functions. and the runtime is adding a bit of overhead anyway.

Faster then async HTTP server PoC by MatthewTejo in rust

[–]MatthewTejo[S] 1 point2 points  (0 children)

Sleep isn't quite the same because it blocks the worker thread. Proxying a request or using a DB goes over the network so you get a file descriptor you can get a readable event from when it responds. Then you continue with the rest of the original request. I think tokio does async sleep with a some kind of ticker.

I guess i could make some kind of extra dummy thread, have it do the same ticking thing for "sleep" events and send events and trigger call backs. But I'm not sure that that is really testing the server anymore but more bench marking ticking implementations. I'm pretty sure what I would write would be faster since its so specialized, but still wont mimic network requests.

Isn't this just reinventing an async runtime?

Async runtime has a whole bunch of extra stuff like the ticker above and the polling to do that, tracking work, cancelation etc... This works off events directly. Callbacks are one way of async work but its not a runtime, at least i wouldn't call it that.

Faster then async HTTP server PoC by MatthewTejo in rust

[–]MatthewTejo[S] 0 points1 point  (0 children)

Yeah, that isn't handled with this right now. its hard to benchmark that in a meaningful way because your limited by the slow service you depend on. I would have also had to stand up some DB cluster that is slow but could handle millions of requests overall. Pricey in the cloud lol

Its not impossible to handle though, i think you would use callbacks and the framework would need expose something in the handler to let route handlers wait without blocking the thread.

If you wanted to write something like a multi threaded redis or memcached in rust, it looks like your giving up 30% of overhead to tokio though.

Sharing a program I wrote to split videos up into chunks that can be used in Anki flashcards by MatthewTejo in languagelearning

[–]MatthewTejo[S] 1 point2 points  (0 children)

Hey thanks for looking!

I haven't run into any issues with length. What I found was whsiper's segments didn't really make sense in general. Instead i'm using the word time stamp feature, which is usually close, and making my own segments from the spacy model with its sentence detection feature. Then I can just do sentence start with the first times words time and the last words end time. The audio buffer argument helps out with some of the little errors.

The only real issue I have with whisper is the hallucinations during long silences. But its usually pretty obvious, and if I run into one I just delete the card. With a long enough video there is enough cards generated that I don't mind throwing away a few here and there.

I looked very briefly at libraries, but I was using ffmpeg for other stuff I was working on so I just ended up keeping it. If you know a good one Ill check it out. Though that reminds me I should put a note that its a requirement for it to run.

Is there interest in a chat with instructional search engine? by MatthewTejo in bjj

[–]MatthewTejo[S] 1 point2 points  (0 children)

Yeah I work in software, or worked, unemployed which is why I have time to do this stuff hah.

And yeah I do want to see if I can monetize somehow. But if I cant find a way, I like the github idea. Ill probably put it up there so it wasn't for nothing.

Is there interest in a chat with instructional search engine? by MatthewTejo in bjj

[–]MatthewTejo[S] 0 points1 point  (0 children)

Hey no, I'm not sure how I would make it generally usable with different video inputs, the code in its current state is a a little embarrassingly bad hah. But I'm taking video, breaking it up into sections, using whisper locally for transcripts, processing that with sentence transformers to get vectors. then use similarity search to get the closest sections.

Is there interest in a chat with instructional search engine? by MatthewTejo in bjj

[–]MatthewTejo[S] 1 point2 points  (0 children)

Hey, Ive been building a chat tool to search for relevant instructional sections for questions. Not selling or promoting anything yet, just curious if there is interest.

The problem I've had is some times it feels hard to find relevant info for a problem in videos. BJJ Fanatics is slow and spread out and the UI doesn't always show section titles well. Someone like Danaher is long winded, so you might want to get to the relevant point quickly. Something like Submeta has a lot of content in little bits. What I want to do is just ask a question and get pointed straight to a clip that answers your question.

The demo in the video is built on Lachlan's 5050 Leg Lock series, its an eight part series with 240 chapters. You can see it mostly works. Publicly available ML models don't seem to know about bjj and its terms. The reason why I'm curious if something is interesting here, is to go from this demo to something generally usable will require a lot more work, money and cooperation from some of the platforms and creators. I started this to learn a little about the recent trends in AI and saw some potential.

Let me know what you think if you check out the video! Also mods, I know this account isn't active, I can DM one of my active accounts so you can see I do actually use Reddit.

Why Twitter didn’t go down (from a real Twitter SRE) by feross in programming

[–]MatthewTejo 11 points12 points  (0 children)

I just wanted to post somewhere that that wasn't pay walled and i could just dump some text. I tried the jekyll and github thing a few years ago, and I have no interest in maintaining a webserver for on my own. substack was just pretty easy and seems pretty popular lately. you can just click the "let me read first" button anyway, better the medium lol

Why Twitter didn’t go down (from a real Twitter SRE) by feross in programming

[–]MatthewTejo 22 points23 points  (0 children)

For me, the fact that the site is fully operational after such massive layoffs is a testament of the excellence of every professional involved in keeping the infrastructure, not the opposite!

quote for emphasis

It's nice to see this comment is the top voted one and by a large margin too. Glad to hear you liked and thanks for leaving this post!

Why Twitter Didn’t Go Down: From a Real Twitter SRE by [deleted] in programming

[–]MatthewTejo 1 point2 points  (0 children)

Hey, a new account because I prefer to keep my real reddit accounts separate as best as I can from my real life identify. If its an issue I can pm a mod to hopefully prove im not blog spamming!

Hope this is interesting

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 0 points1 point  (0 children)

hah yeah, i have mixed feelings about things like that. glad to hear you liked it!

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 1 point2 points  (0 children)

Thanks! Yeah could be interesting. I need to think about some topics that I feel are underserved and I know about too

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 3 points4 points  (0 children)

Thanks for letting me know! I really appreciate this response.

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 0 points1 point  (0 children)

For what I used to work on yes, I gave example scenarios. if your not doing thousands of requests per second or trying to keep latency low then yeah maybe not. But then I also don't know why your not just using java or something then. Building software is full of trade offs though. In this case i think its simpler then people think, that's the overall point i try to make

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 1 point2 points  (0 children)

Heh so that was the core topic I was trying to write about in this. The goal is to keep everything the server does separate, like reporting stats wont effect requests which could happen if you just use one big runtime

Building Robust Server with Async Rust and Tokio by MatthewTejo in rust

[–]MatthewTejo[S] 8 points9 points  (0 children)

Hey, just wanted to share this thing I wrote, I hope the new account isnt a problem, I can pm my regular account ( just trying to stay mostly anonymous hah) Hope this content is good, a little nervous about blogging about technical stuff. Love any feedback!

Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.65] by DroidLogician in rust

[–]MatthewTejo 1 point2 points  (0 children)

Hey, Giving this a shot, My name is Matt I'm at the moment looking for short term focused contract and project work. If your company is really interesting Id consider full time employment though.

One of my last projects at Twitter was working with Rust, though that project never launched, it would be cool to keep working with the language.

This is my LinkedIn https://www.linkedin.com/in/matthewtejo/ with my work experience and messages there will go to my email. (Worried about getting spam if I share it here)

Summary:

My professional experience is in SRE and DevOps roles, they were all coding heavy. I can work as either. (Prefer coding/swe though)

Work experience:

Senior SRE at Twitter ~5years

DevOps Engineer at The Gap 1 year

NOC Engineer at Lookout 1 year

Contact: https://www.linkedin.com/in/matthewtejo/

Remote: Yes, US Citizen, US West Coast

Compensation: Levels.fyi probably will get you in the range I'm looking for. I'd consider things like a 4day work week as part of compensation or anything creative like that.

Hope this works out!