How does an STP broker actually ticks?

I know that a lot has been written on the subject of STP, ECN and MM types of brokers, their differences, advantages and disadvantages. I was wondering if someone knew anything about their internal set-up or more precisely, about the technical infrastructure and how all little pieces of it interact with one another.
For instance, I know that an STP broker needs:

  • a platform (most retail brokers use MT4/MT5);
  • an account with one or several liquidity providers;
  • a bridge solution for routing the trades to LPs for execution.
    But how all these work as a whole? Can anyone explain in detail?