再谈mongoDB,GridFS和Redis (三)
Redis本质上是个key-value store的内存DB, 但是吃内存,一般不建议只有redis作数据库,很多时候大家就用它来管理caching. 管理caching就是暂时保存暂时的数据,到期后清掉.
Redis最可心的地方是它的一个key不仅可以对应一个str,还支持hash, list, set, sortedset, bitmap等等,相当灵活的数据结构,但不是所有的数据都会马上写回disk: Redis is an in-memory store: all your data must fit in memory. RDBMS usually stores the data on disks, and cache part of the data in memory.
->> Redis安装因为是太久以前的事情,于是偶已经根本不记得了,不过请点击http://blog.csdn.net/doiido/article/details/43732767
->> Redis支持主从复制(master-slave)和Redis Cluster(Redis集群)
->> 在Redis中,数据只能被使用key查询. 这里有一些key的通用命令(称为key-commands),比如DEL,EXISITS和RENAME。或许最常用的命令就是KEYS命令了
http://openmymind.net/2011/11/8/Redis-Zero-To-Master-In-30-Minutes-Part-2/
http://cfwlxf.blog.51cto.com/3966339/1433637
http://silenceper.com/archives/959.html
https://gist.github.com/mgedmin/9547214
最后来po一个面试常常会被问到但是很少有人能解释清楚的问题:从输入URL到页面完全load这个过程里发生了什么(发生了猫咪打翻水杯,地震五秒钟一类的就略过不要说了。。。。):
finger touches the screen-> voltage variation -> signal is transferred to I2C interface -> CPU flip-flop detects the variation of voltage and trigger /proc/interrupts -> write the device input event -> operating system output event to browser -> check URL protocol -> DNS iteratively searches ip(check browser cache -> system cache -> router cache) -> socket API prepares to send data pkg -> TCP/IP handshake -> browser sends HTTP requests to web server ip address -> web server return url data -> load balancer equilibrium distribute requests -> launches server plugin -> requests go to Apache and Tomcat or Node.JS -> server calls backend to parse requests -> database accessed -> http request returns html to browser > browser parsers html-> DOM tree built out -> re-send requests asking for image, CSS and javascript -> stylesheets are parsed -> javascript is parsed and executed -> DOM nodes moved -> browser render the page -> GPU aggregate image -> LCD display
Redis最可心的地方是它的一个key不仅可以对应一个str,还支持hash, list, set, sortedset, bitmap等等,相当灵活的数据结构,但不是所有的数据都会马上写回disk: Redis is an in-memory store: all your data must fit in memory. RDBMS usually stores the data on disks, and cache part of the data in memory.
->> Redis安装因为是太久以前的事情,于是偶已经根本不记得了,不过请点击http://blog.csdn.net/doiido/article/details/43732767
->> Redis支持主从复制(master-slave)和Redis Cluster(Redis集群)
->> 在Redis中,数据只能被使用key查询. 这里有一些key的通用命令(称为key-commands),比如DEL,EXISITS和RENAME。或许最常用的命令就是KEYS命令了
http://openmymind.net/2011/11/8/Redis-Zero-To-Master-In-30-Minutes-Part-2/
http://cfwlxf.blog.51cto.com/3966339/1433637
http://silenceper.com/archives/959.html
https://gist.github.com/mgedmin/9547214
最后来po一个面试常常会被问到但是很少有人能解释清楚的问题:从输入URL到页面完全load这个过程里发生了什么(发生了猫咪打翻水杯,地震五秒钟一类的就略过不要说了。。。。):
finger touches the screen-> voltage variation -> signal is transferred to I2C interface -> CPU flip-flop detects the variation of voltage and trigger /proc/interrupts -> write the device input event -> operating system output event to browser -> check URL protocol -> DNS iteratively searches ip(check browser cache -> system cache -> router cache) -> socket API prepares to send data pkg -> TCP/IP handshake -> browser sends HTTP requests to web server ip address -> web server return url data -> load balancer equilibrium distribute requests -> launches server plugin -> requests go to Apache and Tomcat or Node.JS -> server calls backend to parse requests -> database accessed -> http request returns html to browser > browser parsers html-> DOM tree built out -> re-send requests asking for image, CSS and javascript -> stylesheets are parsed -> javascript is parsed and executed -> DOM nodes moved -> browser render the page -> GPU aggregate image -> LCD display
还没人赞这篇日记