Sergey Povarnin-Lelikov
unread,Jun 20, 2013, 11:20:45 AM6/20/13You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?