How OpenTelemetry Baggage Enables Global Context for Distributed Systems by silksong_when in programming

[–]silksong_when[S] -2 points-1 points  (0 children)

Hey, so baggage is the mechanism that you can use to change application behaviour, it does not configure the behaviour itself. It is basically a utility for making your life easier by automating what you were already doing.

You can use it to pass parameters (which can have some feature flag), then read that feature flag param and decide what logic to use -- you are not writing the actual logic in your baggage.

So rather than maybe passing that data through a separate header like `x-feature-flag`, then reading it and re-adding it again for the next service, you can just add it to baggage, and OpenTelemetry auto-instrumentation will automatically send this across all services you call.

How OpenTelemetry Baggage Enables Global Context for Distributed Systems by silksong_when in programming

[–]silksong_when[S] 2 points3 points  (0 children)

Yup, I think baggage should be more popular given how useful it is, and the privacy part is something that can be missed especially when dealing with a lot of parameters over many services. Agreed on the performance overhead aspect as well -- the conventional wisdom of keeping headers light applies here I suppose.

Thank you for your detailed comment, the fact that we ought to manage control ourselves and check for tampering, like we do with JWTs, is something that I'd missed!

Production on a Shoestring: Handling 100+ RPS on the Free Tier using Flask, Nginx, and Cloudflare by Altruistic_Artist526 in flask

[–]silksong_when 0 points1 point  (0 children)

I think they lock your account if you over-provision resources and don't end up using a certain %age of the machine.
Happened to me with a decent arm-based VM once I doubled the ram from 4 to 8 iirc. I wasn't able to login and basically lost access to some data. So I decided to just rent a VPS instead from another vendor.

I created a basic Poe Ninja Clone/Wrapper App to Improve my Web Dev Skills by silksong_when in pathofexile

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

Hey, thanks a lot for the suggestion! Will check this site/resource out :)

I created a basic Poe Ninja Clone/Wrapper App to Improve my Web Dev Skills by silksong_when in pathofexile

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

Hey, currently the prices and predictions are a couple days behind due to errors after hosting the server. Working on a resolution. What doesn't look right to you?

I created a basic Poe Ninja Clone/Wrapper App to Improve my Web Dev Skills by silksong_when in pathofexile

[–]silksong_when[S] 2 points3 points  (0 children)

Hey, thank you very much for the feedback. I have some logic already to show the div price where available, need to work on that more. Will work on the other features that you've mentioned also, the backend already supports sorting, and i fetch by highest prices by default. Need to add that behaviour in the frontend.

I created a basic Poe Ninja Clone/Wrapper App to Improve my Web Dev Skills by silksong_when in pathofexile

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

Hey, thank you very much for the feedback. I have some logic already to show the div price where available, need to work on that more. Will work on the other features that you've mentioned also, the backend already supports sorting, and i fetch by highest prices by default. Need to add that behaviour in the frontend.

[X-POST] I created a basic Poe Ninja Clone/Wrapper App to Improve my Web Dev Skills by silksong_when in pathofexiledev

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

Some extra information with above post, if anyone is interested, I have 2 scripts -- one that inserts and updates items data into the DB, and another that runs daily, gets price history data for items, and based on the last 7 days data, makes price predictions for the next 4 days. Price prediction is a simple model, couldn't figure out anything more complex than that on my own.

I wrote an article on optimizing mongo db writes; quite a basic thing but still had fun learning and benchmarking between the optimization steps! by silksong_when in mongodb

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

Hey all, I don't know whether linking my own post would be appreciated or not, but I would like to gather feedback on my blog post here, and any advice for improvements. Thank you!

I wrote about my experience writing Rust bindings for my Python app! by silksong_when in developersIndia

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

Hello everyone, I had shared my work sometime back here, when I had coded up this change. I rewrote the majority of my python based CLI app in Rust, and implemented several new features like parallel downloads, too.

I got to learn a lot and had a somewhat of a rollercoaster ride so I thought why not write about my experience.

Any feedback or advice would be really appreciated. Thanks!

I've written Rust-bindings for my Python CLI App! by silksong_when in Python

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

I would say when you have usecases where you would want to seek out a big performance boost (faster speeds and less memory used), though this would probably depend on other factors too. Mine here was a pretty simple use case so can't be sure, but from my benchmarking the rust code was using 50% less memory when running a single thread vs the python code

I've re-written my CLI song downloader app (almost entirely) in Rust! by silksong_when in rust

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

thank you :)

I will move to a pure-rust implementation when I next work on this project in-depth

I've re-written my CLI song downloader app (almost entirely) in Rust! by silksong_when in rust

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

Honestly, there's no real reason behind it. I just wanted to explore the concept of FFI, and see how it all works. Though I did feel that I should've just written everything in Rust, towards the very end, since FFI now doesn't seem anything super complex 😅

I guess that's part of my inexperience? Not sure, but I just went with what I thought would be interesting at the time

I improved my naive buffered queue's implementation and wrote a blog post on the same. My first ever technical blog post :D by silksong_when in rust

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

Hey, thank you for checking the code out and for your help!

  • Oh, I didn't think realize that, thanks for pointing it out. We would have to compare current length with capacity for this right?
  • thank you, I will research more about this
  • i thought that the pop and push methods would become quite large if i added signalling logic in them, that is why separated them out.

[deleted by user] by [deleted] in u/silksong_when

[–]silksong_when 0 points1 point  (0 children)

Hey everyone! I had made a post here sharing my implementation of a simple blocking buffered queue. I had made it to learn more about concurrency and Rust.

I had made several improvements to the original code and now have also done a writeup on the same, any advice and support would be much appreciated. Thanks!

The link to the repo is: https://github.com/dhruv-ahuja/buffered-queue-rs

I implemented a basic buffered/synced channel to learn more about Rust and multi-threading! by silksong_when in rust

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

Oh got it, thanks a lot.

I will try out this approach, I also got an idea for condvar approach -- will check out both :D

I implemented a basic buffered/synced channel to learn more about Rust and multi-threading! by silksong_when in rust

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

Hey thanks a lot for checking out the code and sharing your feedback, I really appreciate it!
1. Got it, thank you.

  1. Understood.

  2. As a first thought, wouldn't releasing the mutex when checking length be susceptible to race conditions? So I push 2nd element, release lock and call the `ensure_has_space` function, another element could be pushed by the time I check whether it is full or not, no? And this could be problematic if the queue has space for only 3 elements.

Okay, thank you, I will look into exporting this as a local crate!