| |||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
---|---|---|---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 | |||
6 | 7 | 8 | 9 | 10 | 11 | 12 | |||
13 | 14 | 15 | 16 | 17 | 18 | 19 | |||
20 | 21 | 22 | 23 | 24 | 25 | 26 | |||
27 | 28 | 29 | 30 | 1 | 2 | 3 | |||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
想看點關于cluster的理論教材的,
看到Distributed Systems Concepts And Design,
而且書評也不錯,于是就買了.
沒想到講了一堆什么TCP/IP,ATM, 路由,轉換之類的,都是
我不感興趣的內容,好無聊嘎.雖然好像有章節講到cluster,
不過貌似在很后面和后面的樣子,要經過好多無聊的章節:(
放下書后又看了一下頁數,天:(,800多頁,那么每一章節都要是
又臭又長,有許多boring的內容了..
還有抱怨一句,可能是由于影印版的關系,里頭的每節的heading,
以及圖里頭的一些塊的顏色,都是淺色,根本看不清楚。我想原書
這些應該是來強調的吧,不過被影印了之后,反倒
需要更加費力的看,根本達不到強調的效果了。
另,可憐的blogdriver為什么上不去了,一連就成tomcat的默認頁面樣子?..
以前用過一次Norton Goback,整個恢復時間持續兩小時,太慢了,要比Norton Ghost的恢復麻煩多了.### direct log messages to stdout ### log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### direct messages to file hibernate.log ### #log4j.appender.file=org.apache.log4j.FileAppender #log4j.appender.file.File=hibernate.log #log4j.appender.file.layout=org.apache.log4j.PatternLayout #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### set log levels - for more verbose logging change 'info' to 'debug' ### log4j.rootLogger=warn, stdout log4j.logger.org.hibernate=info #log4j.logger.org.hibernate=debug ### log HQL query parser activity #log4j.logger.org.hibernate.hql.ast.AST=debug ### log just the SQL #log4j.logger.org.hibernate.SQL=debug ### log JDBC bind parameters ### log4j.logger.org.hibernate.type=info #log4j.logger.org.hibernate.type=debug ### log schema export/update ### log4j.logger.org.hibernate.tool.hbm2ddl=debug ### log HQL parse trees #log4j.logger.org.hibernate.hql=debug ### log cache activity ### #log4j.logger.org.hibernate.cache=debug ### log transaction activity #log4j.logger.org.hibernate.transaction=debug ### log JDBC resource acquisition #log4j.logger.org.hibernate.jdbc=debug ### enable the following line if you want to track down connection ### ### leakages when using DriverManagerConnectionProvider ### #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace原來用Newzcrawler訂閱blog的,好用是好用,但是一換機器,就啥都沒有了。
People often criticize asynchronous messaging solutions as too complicated and cumbersome. Or, they believe distributed solutions cannot be successful unless they include a distributed transaction model. There is little doubt that asynchronous solutions require us to think in new ways as we have to deal with concurrency, out-of-sequence issues, correlation and other. However, the real world is full of examples of asynchronous processes that successfully with exactly the same issues. We don't have to go further than the local coffee shop...
I just returned from a 2 week trip to Japan. One of the more familiar sights was the ridiculous number of Starbucks (???????) coffee shops, especially around Shinjuku and Roppongi. While waiting for my "Hotto Cocoa" I started to think about how Starbucks processes drink orders. Starbucks, like most other businesses is primarily interested in maximizing throughput of orders. More orders equals more revenue. As a result they use asynchronous processing. When you place your order the cashier marks a coffee cup with your order and places it into the queue. The queue is quite literally a queue of coffee cups lined up on top of the espresso machine. This queue decouples cashier and barista and allows the cashier to keep taking orders even if the barista is backed up for a moment. It allows them to deploy multiple baristas in a Competing Consumer scenario if the store gets busy.
By taking advantage of an asynchronous approach Starbucks also has to deal with the same challenges that asynchrony inherently brings. Take for example, correlation. Drink orders are not necessarily completed in the order they were placed. This can happen for two reasons. First, multiple baristas may be processing orders using different equipment. Blended drinks may take longer than a drip coffee. Second, baristas may make multiple drinks in one batch to optimize processing time. As a result, Starbucks has a correlation problem. Drinks are delivered out of sequence and need to be matched up to the correct customer. Starbucks solves the problem with the same "pattern" we use in messaging architectures -- they use a Correlation Identifier. In the US, most Starbucks use an explicit correlation identifier by writing your name on the cup and calling it out when the drink is complete. In other countries, you have to correlate by the type of drink.
Exception handling in asynchronous messaging scenarios can be difficult. If the real world writes the best stories maybe we can learn something by watching how Starbucks deals with exceptions. What do they do if you can't pay? They will toss the drink if it has already been made or otherwise pull your cup from the "queue". If they deliver you a drink that is incorrect or nonsatisfactory they will remake it. If the machine breaks down and they cannot make your drink they will refund your money. Each of these scenarios describes a different, but common error handling strategy:
All of these strategies are different than a two-phase commit that relies on separate prepare and execute steps. In the Starbucks example, a two-phase commit would equate to waiting at the cashier with the receipt and the money on the table until the drink is finished. Then, the drink would be added to the mix. Finally the money, receipt and drink would change hands in one swoop. Neither the cashier nor the customer would be able to leave until the "transaction" is completed. Using such a two-phase-commit approach would certainly kill Starbucks' business because the number of customers they can serve within a certain time interval would decrease dramatically. This is a good reminder that a two-phase-commit is can make life a lot simpler but it can also hurt the free flow of messages (and therefore the scalability) because it has to maintain stateful transaction resources across the flow of multiple, asynchronous actions.
The coffee shop interaction is also a good example of a simple, but common Conversation pattern. The interaction between two parties (customer and coffee shop) consists of a short synchronous interaction (ordering and paying) and a longer, asynchronous interaction (making and receiving the drink). This type of conversation is quite common in purchasing scenarios. For example, when placing an order on Amazon the short synchronous interaction assigns an order number and all subsequent steps (charging credit card, packaging, shipping) are done asynchronously. You are notified via e-mail (asynchronous) when the additional steps complete. If anything goes wrong, Amazon usually compensates (refund to credit card) or retries (resend lost goods).
In summary we can see that the real world is often asynchronous. Our daily lives consists of many coordinated, but asynchronous interactions (reading and replying to e-mail, buying coffee etc). This means that an asynchronous messaging architecture can often be a natural way to model these types of interactions. It also means that often we can look at daily life to help design successful messaging solutions. Domo arigato gozaimasu!
昨天在復旦,談起Web 2.0。問我怎么看。我講了個故事。
課
明天早上有節大課,
原本是8點鐘開課。
同學甲
聽說了有課,
3點鐘就去教室占座位,
并堅持認為5點鐘就會開課。
同學乙
雖然清醒的知道8點鐘才開課,
但看到3點鐘已經有人占座位了,
估計6點鐘再去沒位置了,
不得已3點鐘也去占座位。
同學丙和同學丁
4點鐘的時候,堅持認為5點鐘開課的同學丙可能把占到的座位賣給認為6點鐘會開課的同學丁。
同學戊
5點鐘的時候,同學戊叫著說,別等了,今天的課不上了,大家撤吧。
祝各位同學好運
同學甲需要堅持,我們不要打擊他,
因為他們推動了科技進步,
但做好準備,開課的時間比預料的晚了3個小時;
同學乙也需要堅持,
不過看來是帶著干糧來的,
有堅持的準備;
同學丙是聰明的人,
知道自己堅持不了多久,卻不想浪費知道有課這個消息;
同學丁在合適的時間進入,也不錯。
不要只聽同學甲的,因為熱情和干糧不見得耗得到8點鐘;
也不要只聽同學戊,課還是要上的,只不過不時5點鐘而已。
所以祝每位同學好運。
-------------------------------------------------------------------------------------------------
(來自http://home.wangjianshuo.com/cn/20051020_web_20_ceaeae.htm)
你是同學幾阿?
山德勒銷售研究所(Sandler Sales Institute)曾作過關于推薦人如何影響銷售環節的研究,他們的結論如下:
首頁充滿了技術的教學文章,看多了是不是會有點審美疲勞呢,呵呵,我來推薦超越技術之外的一些東西。
第一個就是joel on software,獲得jolt震撼大獎的,joel的水平可謂一流,書中充滿了睿智的想法和有趣的言論,絕對值的一讀,關于書的讀法,我并不是順序讀取的,而是按照感興趣的來,你們也可以像我一樣,
先看看介紹或者amazon上的書評,讀取感興趣的部分。有些章節絕對值得一看,比如冰川下的秘密,漏洞抽象定律(leaky abstraction),看完了會讓你對軟件開發有更深邃的思考。我希望推薦的是joel的文章和joel的風格。
第二個是2本書,
<User Interface Design for programmers>,講User Interface Design的,頭一條原則,研究表明,用戶的frustration是add up的,而不管每一個造成frustration的原因多大或多小,只是感受最重要,所以軟件應該盡可能的減少frustration,符合用戶的expectation.
<Don't Make me think> 講Web Usability的,頭一條rule就是Don't Make me think,也就是說,頁面的大部分應該用戶一看即懂。
User Interface Design和Web Usability這兩個話題其實focus基本一樣,主要都是圍繞如何設計出更好的讓用戶使用的軟件,這兩本書可以結合著看,觀點互相補充,互相印證。