Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GT.M Replication question

139 views
Skip to first unread message

Sergey Povarnin-Lelikov

unread,
Jun 20, 2013, 11:20:45 AM6/20/13
to
GT.M Replication (Business Continuity) is like Master-Slaves, because I can write only to Master (originating primary instance), and Master can be streamed to Slaves (replicating secondary instances). I can read from Master and Slaves.

And if we design our scalable solution as multi-instances Backends, which developed with C++ (using C Call-Ins and business logic/API in M routines).
Each Backend has pool of GT.M workers executing as different processes and do methods like C Call-Ins to execute M routines or M commands/functions.

Maybe I rework all Backend codes and put it to GitHub soon. Backend consists of two main idea: TCP(SSL) Server with API used JSON protocol and Request Processor based on pool of GT.M workers.

On Frontend we design Gateway with C++ as TCP(SSL) Client to Backend (only one trusted connection). Gateway was developed because our PHP web-application work with Backend throw PHP extension, which do requests to Backend throw Gateway. Gateway routes requests from PHP extension to Backend and returns responses to PHP extension.

And now we think about scalability for more productive solution, for example 1 million requests in second.

First decision was like that:

GT.M instance 1 - Backend 1 ------ Gateway 1 - PHP Webapp -
GT.M instance 2 - Backend 2 ------ Gateway 2 - PHP Webapp - Web Balancer - Users
GT.M instance 3 - Backend 3 ------ Gateway 3 - PHP Webapp -

GT.M with Backend is located on one cloud hosting. WebBalancer, PHP Webapp with Gateway on another cloud hosting.

But GT.M BC Replication work as Master/Slaves, and GT.M instances 2,3 will work as Slaves and I cann't write any data to it :(

Second decision was simpler:


GT.M instance 1 - Backend 1 - ------ Gateway 1 - PHP Webapp -
GT.M instance 2 - Backend 2 - Backend Balancer ------ Gateway 2 - PHP Webapp - Web Balancer - Users
GT.M instance 3 - Backend 3 - ------ Gateway 3 - PHP Webapp -

New Backend Balancer routes requests which adding or updating data to Master (GT.M instance 1) and requests which only selecting data to Slaves.
Now we think about this solution.

What you talk about GT.M instances such as Master/Master?

K.S. Bhaskar

unread,
Jun 21, 2013, 7:12:07 PM6/21/13
to
Owing to requirements of transaction integrity for the applications that run on GT.M and the eventual consistency that the CAP theorem imposes, GT.M does not currently support multiple Master/Master operation.

You can certainly implement replication at the application level. For example, create triggers that log updates to a global from where application processes stream updates to other instances.

Regards
-- Bhaskar
0 new messages