随笔分类 - 系统设计
system design
摘要:8.2Imagine you have a call center with three levels of employees: respondent, manager, and director. An incoming telephone call must be first allocate...
阅读全文
摘要:分布式缓存出于如下考虑,首先是缓存本身的水平线性扩展问题,其次是缓存大并发下的本身的性能问题,再次避免缓存的单点故障问题(多副本和副本一致性)。分布式缓存的核心技术包括首先是内存本身的管理问题,包括了内存的分配,管理和回收机制。其次是分布式管理和分布式算法,其次是缓存键值管理和路由。Memcache...
阅读全文
摘要:What is a high-performance data structure? To answer that question, we're used to applying normal considerations like Big-Oh complexity, and memory ov...
阅读全文
摘要:1.一个有10亿条记录的文本文件,已按照关键字排好序存储,设计算法,可以快速的从文件中查找指定关键字的记录。$10亿=10^9\approx2^{30}$,每行记录如果是1kB的话,总共是1TB。将文件分割成1000份,每份1G,load进内存作二分查找即可。2. 设计一个分布式爬虫系统。配置参数:...
阅读全文
摘要:设计一个长连接手机云推送服务。要求:1. 稳定包括两个部分一个是服务器端的稳定性,一个是手机端的稳定性。服务端稳定性,因为使用长连接方案,对服务器的开销和要求很大,推送方案对服务器开发要求很高,海量线程连接下的服务器稳定性是非常具有挑战性的。一般的评判标准包括:同时在线时峰值 (一般按照百万并发连接...
阅读全文
摘要:RAID 0RAID 0亦称为带区集。它将两个以上的磁盘串联起来,成为一个大容量的磁盘。在存放数据时,分段后分散存储在这些磁盘中,因为读写时都可以并行处理,所以在所有的级别中,RAID 0的速度是最快的。但是RAID 0既没有冗余功能,也不具备容错能力,如果一个磁盘(物理)损坏,所有数据都会丢失,危...
阅读全文
摘要:At the scale that Facebook operates, a lot of traditional approaches to serving web content breaks down or simply aren’t practical. The challenge for ...
阅读全文
摘要:Facebook Chat, offered a nice set of software engineering challenges:Real-time presence notification:The most resource-intensive operation performed i...
阅读全文
摘要:Web front-end written in PHP. Facebook's HipHop Compiler then converts it to C++ and compiles it using g++, thus providing a high performance templati...
阅读全文
摘要:11年的blog.Facebook Messages seamlessly integrates many communication channels: email, SMS, Facebook Chat, and the existing Facebook Inbox. Combining al...
阅读全文
摘要:转自09年的blog,因为facebook在国内无法访问,故此摘录。The Photos application is one of Facebook’s most popular features. Up to date, users have uploaded over 15 billion p...
阅读全文
摘要:In the traditional model, the life cycle of a user request is the following:Browser sends an HTTP request to web server.Web server parses the request,...
阅读全文
摘要:It is finally here: you can configure the open source log-aggregator, scribe, to log data directly into the Hadoop distributed file system.Many Web 2....
阅读全文
摘要:聚合关系。
阅读全文
摘要:工厂对象通常包含一个或多个方法,用来创建这个工厂所能创建的各种类型的对象。这些方法可能接收参数,用来指定对象创建的方式,最后返回创建的对象。有时,特定类型对象的控制过程比简单地创建一个对象更复杂。在这种情况下,工厂对象就派上用场了。工厂对象可能会动态地创建产品对象的类,或者从对象池中返回一个对象,或...
阅读全文
摘要:六大关系:关联association、依赖dependency、聚合aggregation、组合compositon、泛化generalization、实现realization.盗图:关联:关联关系使一个类知道另外一个类的属性和方法;通常含有“知道”,“了解”的含义。通过成员变量来实现的;依赖:是...
阅读全文

浙公网安备 33010602011771号