Modding · Reading list · After reading the modding-books core source I finally understand the trade-offs

18
MOr/modding-books·posted by winter·1 hour agoReview

After reading the modding-books core source I finally understand the trade-offs

It took me two weeks of on-and-off digging and plenty of wrong turns. Writing the process down as it happened so the next person spends less time.

Worth noting: the official docs do cover this, just in a very inconspicuous spot. I only found it reading the source comments, where the author explains the reasoning — roughly "so that it degrades into predictable behaviour in extreme cases".

Image placeholder · object storage in production
POST /api/uploads → CDN origin pull
4 comments

4 comments

M
Mmike_xu·just now

This is not a modding-books problem, it is a usage problem. The docs say this API is not thread-safe and you must lock around it yourself.

450
Hhuang_ke·12 minutes ago

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

102
Sslow_query·12 minutes ago

Saved. I am reworking this area this week — this saves a lot of wrong turns.

36
Wwinter·3 minutes ago

One counter-example: below modding-books 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

150

This is the post detail page /en/c/modding-books/post/p12. Posts and comments are generated deterministically from a seeded PRNG, so the same post always renders the same content and the link can be shared, reloaded and indexed. In production this page reads MySQL for the post, Redis for hot-post caching, and fetches the whole comment tree in a single query on the path column.

See the database schema →