- should not block while processing a message
- prefer immutable message
- batch and piggy(捎带)
- avoid polling, try callback notify
- cache,但是要注意数据同步更新问题
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.opentsdb.client; | |
import static com.google.common.base.Preconditions.checkArgument; | |
import java.io.IOException; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.commons.lang.StringUtils; | |
import org.apache.http.HeaderElement; | |
import org.apache.http.HeaderElementIterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My Blog</title> | |
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css"> | |
</head> | |
<body> | |
<div class="container"> |
对于一个API请求,开发平台一般需要知道下面几件事情:
- 哪个应用发起这个请求(Which application is making the request)
- 这个请求是为哪个用户发起的(Which user the request is posting on behalf of)
- 用户是否对这个请求进行授权(Whether the user has granted the application authorization to post on the user's behalf)
- 请求是否在传输过程中被篡改(Whether the request has been tampered by a third party while in transit)
title | layout |
---|---|
protocal-buffers学习笔记 |
post |
在官方文档上 A bit of history 介绍了PB的产生原因。
放生时间: 2013年12月1号(星期日)上午9点30分举行放生。 集合地点:当天9点正在深圳市大鹏新区大鹏银滩大道金水湾渡假村大门口标有“金水湾”字样的指示牌处集合。 开车前往的师兄导航大鹏银滩大道金水湾渡假村;乘坐公交车的师兄可选择:一是坐E11.H92或833.818到大鹏站下车后转乘b756到鹏城挢站下车,反方向步行至红绿灯左拐入银滩大道再走10分钟到金水湾度假村;二是坐E11.H92或833.818到大鹏站下车后,再在大鹏二站坐928到金水湾度假村站下车(928公交相隔20分钟一班,上车时请吩咐驾驶员到站让下。 欢迎随喜参加,功德无量。 放生随喜帐号: 中国银行,账号6216612000005457219,户名:欧阳权
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.nio.channels.ClosedChannelException; | |
import java.nio.channels.SelectableChannel; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.SocketChannel; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.Set; |
import java.lang.Thread.UncaughtExceptionHandler; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory;
/**
- @ClassName: ExceptionThread
- @Description: TODO(这里用一句话描述这个类的作用)
- @date 2013-10-10 下午12:04:23 */
NewerOlder