Spanner is Google's globally distributed database that provides SQL queries and ACID transactions across datacenters. It uses TrueTime to assign timestamps based on a global clock with bounded uncertainty. This allows lock-free read transactions to retrieve a consistent view of data. Write transactions use two-phase locking and commit in timestamp order respecting the global clock to ensure external consistency.