Database Service Design

Source: Internet
Author: User

Public class DBServerAchieve {public static List <Front> frontList = null; public static List <Line> LineList = null; public DBServerAchieve () {if (frontList = null & LineList = null) {frontList = new List <Front> (); LineList = new List <Line> (); GetSaticDataFromMySql (out frontList, out LineList );}} /// <summary> /// Load Static Data /// </summary> /// <param name = "frontList"> </param> /// <param name = "LineList"> </param> private void GetSaticDataFromMySql (out List <Front> frontList, out List <Line> LineList) {throw new NotImplementedException ();}}

Paste a short piece of code here, which is relatively simple. In fact, it is loaded in the DBServer implementation class constructor. Some static data, the database persistence layer used by the author, the factory mode is used for data separation. I think there should be a lot in the garden.

Finally, let's talk about how MYSQL replication works.

(1) The master will record changes to binary logs (these records are called binary log events, binary log events); (2) slave copies the binary log events of the master node to its relay log. (3) slave retries the events in the relay log to reflect its own data.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.