- skinner927Thankfully k8s is not overengineered or you’d have pie on your face.
- You’ll never learn it by reading something. You have to experience it. Get your hands dirty.
Write a simple single-threaded http server that takes strings and hashes them with something slow like bcrypt with a high cost value (or, just sleep before returning).
Write some integration tests (doesn’t have to be fancy) that hammer the server with 10, 100, 1000 requests.
Time how performant (or not performant) the bank of requests are.
Now try to write a threaded server where every request spins up a new thread.
What’s the performance like? (Hint: learn about the global interpreter lock (GIL))
Hmm, maybe you’re creating too many threads? Learn about thread pools and why they’re better for constraining resources.
Is performance better? Try a multiprocessing.Pool instead to defeat the GIL.
Want to try async? Do the same thing! But because the whole point of async is to do as much work on one thread with no idle time, and something like bcrypt is designed to hog the CPU, you’ll want to replace bcrypt with an await asyncio.sleep() to simulate something like a slow network request. If you wanted to use bcrypt in an async function, you’ll definitely want to delegate that work to a multiprocessing.Pool. Try that next.
Learning can be that simple. Read the docs for Thread, multiprocessing, and asyncio. Python docs are usually not very long winded and most importantly they’re more correct than some random person vibe blogging.
- I think this is a better example of what, I imagine, the author was trying to illustrate.
- I appreciate the reply. It does feel like most resources online are just the summary of 3 web searches and boom they’re an expert. Thanks for the links and info.
- Is that webapp shared anywhere? I can’t find a link in the article.
- You seem to know what you’re talking about. Could you recommend any devices that fit the requirements you outlined?
- You’re about to run an untrusted python script. The script can do whatever it wants to your system. Dependencies are the least of your worries.
- 1. Assuming IEC refers to cables we plug a desktop PSU into mains/wall: IEC can carry up to 1800w vs 100w PoE++
2. Powerline networking is considerably slower and less reliable than CAT5/6. Additionally, building code for running power lines is much more strict than low voltage CAT5/6
- You’ll want to protect yourself against bit rot too. Don’t go copying bad files every year.
- Haha. My ISP barely gives me an Internet connection
- Entry level is $12/year. Bring your own domain.
- Also been using zoho for at least 6 years. Cheap and reliable.
- The point of linters is so the code looks the same regardless of who wrote it. This way it’s easier to read. Some people have horrible style and linters really help.
I find linters make me faster. Sometimes I’m feeling lazy and I just want to pump out a bunch of lines of ugly code with mappings poorly formatted, bad indents, and just have it all synched up when I save.
- I still prefer 80. I won’t (publicly) scoff at 100 though. IMO 120 is reasonable for HTML and Java, but that’s about it.
Sent from my 49” G9 Ultrawide.
- That is generally a problem with all AI right now.
- You’re bad at marketing. This was your chance to capture a ton of users. Make a google form that just takes people’s emails for you to notify us when it’s ready. Because I’m not going to remember to track you down at some unknown time in the future.
- Science fiction
- Is any of this public? It sounds very interesting.
- Microsoft’s cloud gets hacked multiple times a year, nobody cares. Everyone is connecting everything together. Business people with no security training/context are “writing” integrations with Lego-like services (and now LLMs). Cloudflare hiccups and the Internet crashes.
Nobody cares about the things you’re saying anymore (I do!!). Extract more money. Move faster. Outcompete. Fix it later. Just get a bigger cyber incident insurance policy. User data doesn’t actually matter. Nobody expects privacy so why implement it?
Everything is enshitified, even software engineering.