2017年11月12日
摘要: 有资料说,read、write都可以探测tcp的断开,但都不是实时的。 但是实际在某些设备上测试发现,即使开一个线程每隔一小段时间发一次心跳包(write),write可能总是成功的,write也不能探测连接已经断开,而且这个状态持续很久。 所以,如果需要保持和设备的连接,心跳包需要回复,如果两秒内 阅读全文
posted @ 2017-11-12 11:51 dearplain 阅读(283) 评论(0) 推荐(0) 编辑
  2017年10月29日
摘要: 走udp明显更稳定,而用tcp,无论你是直连,或者走香港中转,还是其他地方中转,都无法保持稳定。反而不如udp直连。(唯一稳定的是美国到中国的) 监控采用的是influxdb和grafana。只需要写sql,grafana能自动显示图表。influxdb往里面写入一些map就行,其中tag是索引,支 阅读全文
posted @ 2017-10-29 14:08 dearplain 阅读(234) 评论(0) 推荐(0) 编辑
  2017年10月21日
摘要: ss里面有些诡异的日志(我用的是ss-go) 2017/10/1* 1*:5*:19 error getting request ***:*** ***:*** EOF 这种日志不多,一般新开一个端口使用之后,一天之内会出现一个这样的记录。看着像有人主动发了一个错误的包,因为我不可能主动发了一个错误 阅读全文
posted @ 2017-10-21 18:01 dearplain 阅读(448) 评论(0) 推荐(0) 编辑
  2017年10月12日
摘要: 性能非常强大,和Disruptor的无锁队列一样,达到1400w/s。 对比其他Disruptor实现(https://github.com/LMAX-Exchange/disruptor, https://github.com/smartystreets/go-disruptor),这个实现太简洁 阅读全文
posted @ 2017-10-12 12:02 dearplain 阅读(1282) 评论(0) 推荐(0) 编辑
  2017年9月28日
摘要: https://github.com/dearplain/otter_manager https://github.com/dearplain/otter_node 本人开发的小巧docker镜像,根据工作中遇到的问题进行了一些优化,添加了一些参数。 鉴于otter部署和测试的复杂性,这个镜像还是很 阅读全文
posted @ 2017-09-28 12:02 dearplain 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 在网页上面实现,采用的是球面映射和材质线性映射,这里注意的是用线性映射保留了球面的感觉,而不是采用sin映射,sin映射在边缘会产生很难看的效果。 最后效果如下: 阅读全文
posted @ 2017-09-28 10:24 dearplain 阅读(510) 评论(0) 推荐(0) 编辑
  2017年9月24日
摘要: 国际网络环境可以理解为延迟很大、经常掉线、丢包的环境,和跨机房环境是一样的,不过,前者掉线严重,延迟更大,比如德国来回一般有300ms,美国有200ms,新加坡一般是90ms。国际网络环境掉包非常严重,有时候可能达到60%以上。 golang标准库RPC 虽然是表面看是block调用,但是内部的实现 阅读全文
posted @ 2017-09-24 09:52 dearplain 阅读(177) 评论(0) 推荐(0) 编辑
  2013年6月20日
摘要: Windows で使う場合 Windoows用のインストーラからインストールすると、newLISP のIDE用のアイコンが出来るのでそこから使ってもいいし、コマンドプロンプトで newlisp と入力して実行してもいい。 コマンドプロンプトからの利用で、複数行の記述をしたい場合は、 といった風に [ 阅读全文
posted @ 2013-06-20 20:18 dearplain 阅读(224) 评论(0) 推荐(0) 编辑
  2013年4月3日
摘要: 以前看不懂,现在看得津津有味啊。Cypress architectureThe overhauled architecture of the new Cypress GPU is called TeraScale 2. Figure 2 stands for the generation and points indirectly to the number of full theoretical teraflops (billion operations per second) that the GPU can don. So, the new GPU is notable for doub 阅读全文
posted @ 2013-04-03 13:04 dearplain 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 先对比一下OpenGLVersionGLSLVersion2.01.102.11.203.01.303.11.403.21.50For all versions of OpenGL 3.3 and above, the corresponding GLSL version matches the OpenGL version. So GL 4.1 uses GLSL 4.10.Direct3D Shader Model 4.0 is equivalent to GLSL version 3.30. Earlier GLSL versions for OpenGL 3.x provide sub 阅读全文
posted @ 2013-04-03 12:51 dearplain 阅读(668) 评论(0) 推荐(0) 编辑