Symplectic geometry of homological algebra