zoukankan      html  css  js  c++  java
  • Chp10: Scalability and Memory Limits

    The Step-by-Step Approach

    break down a tricky problem and to solve problems using what you do know.

    Step 1: Make Believe

    Pretend that the data can all fit on one machine and there are no memory limitations. Provide the general outline for your solution.

    Step 2:  Get Real

    figure out how to logically divide the data up, and how one machine would identify where to look up a different piece of data.

    Step 3: Solve Problems

      Dividing Up Lots of Data:

    By Order of Appearance:

    By Hash Value: 1)pick some sort of key relating to the data 2)hash the key 3)mod the hash value by the number of machines 4)store data on the machine with that value

            there is no relationship between what the data represents and which machine stores data.

    By Acutal Value: reduce system latency by using information about what the data represents.

    Arbitrarily:

    Good Example: Find all documents that contains a list of words.


    10.1 build some sort of service that will be called by up to 1000 client applications to get simple end-of-day stock price information.

    We want to start off by thinking about what the different aspects we should consider in a given proposal are:

    1. Client Ease of Use: we want the service to be easy for the clients to implement and useful for them

    2. Ease for Ourselves: consider in this not only the cost of implementing, but also the cost of maintenance

    3. Flexibility for Future Demands: 

    4. Scalability and Efficiency: not to overly burden our service.

    DataBase vs XML(json) P 343


    10.2 good problem

    10.7 LRU Cache

  • 相关阅读:
    微信小程序demo理解
    HTML 和 JavaScript 编写简单的 404 界面
    阿里云实现简单的运行 Django 项目
    AJAX 与 Python 后台通信
    django session 使用案例
    PHP 基础知识
    Django 搭建后台 favicon.ico 文件操作
    Win10 Ubuntu 双系统 卸载 Ubuntu
    JavaScript 表单验证 案例
    JavaScript Image对象 / Tabel对象 / Select对象 / Form对象
  • 原文地址:https://www.cnblogs.com/reynold-lei/p/3468567.html
Copyright © 2011-2022 走看看