Foamy structure of spacetime