Daniel-Journey Weekly Dose –2012/2/5
Windows
Programming
错误码
1. 错误信息不丰富
2. 加入错误状态码可能需要改变函数签名
3. 错误状态码可能会被忽略
Cloud
Scalability
Cache is a component that will magically store data so that future requests of that same data will not be to the Remote Server, and hence it will improve the performance of our application significantly faster.
Operations
Architecture
浅谈架构
如果要更正式点定义,架构就是model和pattern,从而把code串成system。而其中最重要的就是design principles (设计原则),即为什么这个问题要用这个而非那个。更文艺点,再结合点美学,也可以叫作design philosophy (设计哲学或理念)。
然后我们来看什么是model和pattern,这两个具体的定义我还没想出来。先说一下比较,model偏宏观,而pattern偏微观;model重抽象描述,而pattern重具体实现。比如,你的系统有一个服务端和一个客户端,那么client/server就是model,而client与server之间的交互方式则是pattern,比如RPC/message、同步/异步,比如用滑动窗口来组织请求与应答等等。当然,这和系统的尺度有关。如果你zoom in到服务端,此时的model可能就是模块的组织关系,而pattern则是调用方式,比如用function call还是event等。
架构是什么:其实"架构", 就是一个人用于解决常见(注意常见)设计问题的特定方法…
经常有人把"架构"说的很玄乎,很虚. 其实"架构", 就是一个人用于解决常见(注意常见)设计问题的特定方法(注意特定的, 但不一定是一个). 遇到问题稍许有些变化, 他能适当的调整自己的常用(注意常用)设计而去适合这个变化的能力. 这就叫:"架构"设计… 也就是说, 架构是:方法论, 是经验, 更是变通能力.
Reactor模式,或者叫反应器模式
Java
对于没有状态的对象(例如String),在重复使用之前,无需进行任何处理;对于有状态的对象(例如StringBuffer),在重复使用之前,就需要把它们恢复到等同于刚刚生成时的状态。由于条件的限制,恢复某个对象的状态的操作不可能实现了的话,就得把这个对象抛弃,改用新创建的实例了。
Java Support for Large Memory Pages
Java HotSpot VM (Virtual Machine) Performance Tuning: Command-line options
Solving OutOfMemoryError (part 5) – JDK Tools
jps -lvm
-m Output the arguments passed to the main method. The output may be null for embedded JVMs.
-l Output the full package name for the application’s main class or the full path name to the application’s JAR file.
-v Output the arguments passed to the JVM.
豆瓣地址 