Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Master Slave at Application level

  1. #1
    mangesh1757 is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    India
    Posts
    238

    Default Master Slave at Application level

    Hi All,


    Can any one provide details on Master / Slave implementation at SugarCRM Application layer.

    I am aware but not able to implement much of it.

    Idea :
    1. Define master and slave server details under coonfig.php or config_override.php file
    2. Modify function connect under include/database/MysqlManager.php to pass both master and salve details by modifying $configOptions Array. Also passing 3rd argument to connect function which decide write / read operations
    3. Then accordingly modify function query connect to database.

    But this all seems to be quite complex.

    Can anyone provide me some insight on this issue.

    Please Help!!
    Mangesh1757
    mangesh1757@gmail.com
    India.

  2. #2
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    1,382

    Default Re: Master Slave at Application level

    What are you trying to achieve? If you want to build a MYSQL Slave do this via MYSQL. If you are looking to build a cluster also do this on the database layer.

    christian.

    Quote Originally Posted by mangesh1757 View Post
    Hi All,


    Can any one provide details on Master / Slave implementation at SugarCRM Application layer.

    I am aware but not able to implement much of it.

    Idea :
    1. Define master and slave server details under coonfig.php or config_override.php file
    2. Modify function connect under include/database/MysqlManager.php to pass both master and salve details by modifying $configOptions Array. Also passing 3rd argument to connect function which decide write / read operations
    3. Then accordingly modify function query connect to database.

    But this all seems to be quite complex.

    Can anyone provide me some insight on this issue.

    Please Help!!

  3. #3
    mangesh1757 is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    India
    Posts
    238

    Default Re: Master Slave at Application level

    Quote Originally Posted by christianknoll View Post
    What are you trying to achieve? If you want to build a MYSQL Slave do this via MYSQL. If you are looking to build a cluster also do this on the database layer.

    christian.
    I am trying to achieve master slave phenomena at application layer. (Reads from Slave | Writes on Master)

    I guess Enterprise edition has this feature.

    PS : Already Master Slave set-up is complete at database layer.
    Mangesh1757
    mangesh1757@gmail.com
    India.

  4. #4
    mangesh1757 is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    India
    Posts
    238

    Default Re: Master Slave at Application level

    Any Updates!!!
    Mangesh1757
    mangesh1757@gmail.com
    India.

  5. #5
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,491

    Default Re: Master Slave at Application level

    There is nothing to do at the application layer, all of this happens at the DB layer, read about Scale out solutions here.
    Kenneth Brill - Help Forum Moderator

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

    Look for these SugarCRM Tools
    SweetDBAdmin 1.9 - Intuitive web interface for your SugarCRM 6.4+ database (MySQL, SQL Server, Oracle and DB2)
    SweetUndelete 1.0 - The very best Undelete module for SugarCRM 6.4+. Allows admins and Users to undelete records and relationships
    SweetTinyMCEUpgrade - Upgrades your SugarCRM's TinyMCE installation to 3.5.8 (currently it's 3.4.4)
    SweetActivities 0.8 beta - An example of how to create a View on Calls, Meetings, Tasks and Emails so they can be viewed and reported on as one module. NOT FOR MSSQL YET



  6. #6
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    1,382

    Default Re: Master Slave at Application level

    you will need to do some smart modifications on the DB layer, instantiating a second DB connector, checking every Query before it is executed and sending it then to the proper DB. Should not be too hard to do (just do a preg_match in the query if update or insert is in and if yes send it to the master, if not sen it to the slave. If you know what to do it should be done in an hour.

    christian.

    Quote Originally Posted by mangesh1757 View Post
    Any Updates!!!

  7. #7
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    1,382

    Default Re: Master Slave at Application level

    If you want to have reads go to one and updates to another it is an applciation issue. But I think manageable.

    Christian.

    PS: like you footerline with the SweetActivities - but why not use a proper reporting tool like KReporter where this can be simply done with union reporting ... ;-)

    Quote Originally Posted by kbrill View Post
    There is nothing to do at the application layer, all of this happens at the DB layer, read about Scale out solutions here.

  8. #8
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,491

    Default Re: Master Slave at Application level

    Quote Originally Posted by christianknoll View Post
    you will need to do some smart modifications on the DB layer, instantiating a second DB connector, checking every Query before it is executed and sending it then to the proper DB. Should not be too hard to do (just do a preg_match in the query if update or insert is in and if yes send it to the master, if not sen it to the slave. If you know what to do it should be done in an hour.

    christian.
    I dont think you have to do any of this. You can specify (at the DB layer) that all reads come from the slave(s) and all writes go to the master. No changes to SugarCRM at all.
    Kenneth Brill - Help Forum Moderator

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

    Look for these SugarCRM Tools
    SweetDBAdmin 1.9 - Intuitive web interface for your SugarCRM 6.4+ database (MySQL, SQL Server, Oracle and DB2)
    SweetUndelete 1.0 - The very best Undelete module for SugarCRM 6.4+. Allows admins and Users to undelete records and relationships
    SweetTinyMCEUpgrade - Upgrades your SugarCRM's TinyMCE installation to 3.5.8 (currently it's 3.4.4)
    SweetActivities 0.8 beta - An example of how to create a View on Calls, Meetings, Tasks and Emails so they can be viewed and reported on as one module. NOT FOR MSSQL YET



  9. #9
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,491

    Default Re: Master Slave at Application level

    Quote Originally Posted by christianknoll View Post
    If you want to have reads go to one and updates to another it is an applciation issue. But I think manageable.

    Christian.

    PS: like you footerline with the SweetActivities - but why not use a proper reporting tool like KReporter where this can be simply done with union reporting ... ;-)
    You could do that too, never used KReporter. Does kreporter support dashlets, inline editing, graphs and and the pro/ent/ult reporting module and all its options? I am sure there is a hundred ways to skin this cat but I am trying for a way that integrates into SugarCRM a little better than the external reporting tools do.
    Kenneth Brill - Help Forum Moderator

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

    Look for these SugarCRM Tools
    SweetDBAdmin 1.9 - Intuitive web interface for your SugarCRM 6.4+ database (MySQL, SQL Server, Oracle and DB2)
    SweetUndelete 1.0 - The very best Undelete module for SugarCRM 6.4+. Allows admins and Users to undelete records and relationships
    SweetTinyMCEUpgrade - Upgrades your SugarCRM's TinyMCE installation to 3.5.8 (currently it's 3.4.4)
    SweetActivities 0.8 beta - An example of how to create a View on Calls, Meetings, Tasks and Emails so they can be viewed and reported on as one module. NOT FOR MSSQL YET



  10. #10
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    1,382

    Default Re: Master Slave at Application level

    It probably does more and integrates even better ... ;-) ... always keep your eyes open on the great things some of ypour partners develop ...

    christian.

    Quote Originally Posted by kbrill View Post
    You could do that too, never used KReporter. Does kreporter support dashlets, inline editing, graphs and and the pro/ent/ult reporting module and all its options? I am sure there is a hundred ways to skin this cat but I am trying for a way that integrates into SugarCRM a little better than the external reporting tools do.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Read replica / master-slave replication on MySQL
    By tomkerswill in forum Developer Help
    Replies: 4
    Last Post: 2012-08-30, 04:42 PM
  2. Master and Slave
    By erikcson in forum Help
    Replies: 2
    Last Post: 2007-12-18, 12:45 PM
  3. Where is Product Master?
    By tommyfan in forum General Discussion
    Replies: 1
    Last Post: 2006-11-16, 02:06 AM
  4. Master Customer Account
    By orzo in forum Project Management
    Replies: 1
    Last Post: 2005-10-18, 11:34 PM
  5. Suppressing Master Lead Tab
    By chriswright in forum Help
    Replies: 0
    Last Post: 2005-10-17, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •