That's something that I've been trying to find myself, with not that much luck.
Jane Street Capital has a nice video presentation though: https://blog.janestreet.com/how-to-build-an-exchange/
I liked this one by Martin Fowler a few years ago: https://martinfowler.com/articles/lmax.html
I don't have a crypto-specific resource, but market microstructure is the general field you're looking for https://en.wikipedia.org/wiki/Market_microstructure
I thought this kind of stuff is a solved issue, some kind of distributed queueing messaging engine with the trading logic at the collector of all these trading messages.