A triple theoretic construction of compact algebras