Although database replication has been a standard feature in database management systems for a long time, third party solutions have been enjoying an increasing popularity. These solutions often rely on the use of group communication primitives to offer various forms of synchronous replication with reduced overhead. Unfortunately, the lack of native support for third party replication forces implementors to either modify the database server, restricting portability, or to develop a middleware wrapper, which causes a performance overhead. This paper addresses this problem with a novel middleware architecture and programming interface for replication, such that different replication strategies can be efficiently implemented on top of any compliant database in a cost-effective manner. The contribution is two-fold. First we identify key functionality for representative replication protocols. Then we propose a middleware interface to expose its functionality and evaluate its implementatio...