1/ since we're sharing "this is the tricky thing I'm doing at work", I'll share mine >>> https://twitter.com/BrowningMachine/status/1056572694039351297 …
-
-
12/ This is not my first goat rodeo, so I do that in a day or so. But then, since I'm checking the status code in the callback, I learn that "we probably wrote it, but we can't be ABSOLUTELY sure" is also a status code. ...so now I have to add a retry loop in. >>>
Show this thread -
13/ And note that this retry loop is INSIDE the callback. So stack looks like * application * libuv_run_loop * ... * my libuv callback, which injects into DB * ... * ... * db callback (uncertain status code) * inject into DB * ... * ... * db callback * inject into DB * ...
Show this thread -
14/ The angles do not add up to 360°, and the walls seem to breathe. Is that a tentacle?
Show this thread -
15/ also, since I might have to reinject into the db, I need to carry along a data structure of all the info that I might need to inject, which means rearchitecting things. Then I have to clean it up at the end!
Show this thread -
16/ Also, bc I'm doing sharding, I can no longer do a simple cleanup of the original data - shard 0 might write to db OK, but shard 3 might take 4 retries, so cleanup is VERY TRICKY.
Show this thread -
17/ Also, some cleanup can't be done automatically. Sometimes we do a DB query, and get a char * to data ... but that lives inside a short lived handle, so we can't clean up the handle ourselves. Have to hide it behind a void * and give it back to app, which can call cleanup
Show this thread -
18/ But note that I am not bitching - this is actually the most fun I've had coding in 2-3 years! onward!
Show this thread -
19/ tangentially, sometimes I wonder "am I really bringing that much value?" when I'm changing the background color of a webpage. ...because any 14 year old fresh out of a coding bootcamp could do this. ...but when I'm spinning up threads, working state machines, etc: yeah
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.