﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-爬</title><link>http://www.cppblog.com/cdy20/</link><description>qq：286402937  
架构-开源交流 167813458
lomox群：41830909

https://github.com/caidongyun
</description><language>zh-cn</language><lastBuildDate>Sun, 05 Apr 2026 13:08:51 GMT</lastBuildDate><pubDate>Sun, 05 Apr 2026 13:08:51 GMT</pubDate><ttl>60</ttl><item><title>Nginx Openresty Windows v1.9.7.1002 发布，升级各种模块。</title><link>http://www.cppblog.com/cdy20/archive/2015/12/07/212430.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Mon, 07 Dec 2015 03:25:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/12/07/212430.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/212430.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/12/07/212430.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/212430.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/212430.html</trackback:ping><description><![CDATA[<p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;">Nginx Openresty Windows v1.9.7.1002 发布，升级各种模块。<br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;">&nbsp;lastest&nbsp;release&nbsp;<span style="margin: 0px; padding: 0px; line-height: 1.5; font-size: 10pt;">Version:1.9.7.1002</span></p><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;">32&nbsp;bit:&nbsp;<img src="http://www.oschina.net/js/ueditor/themes/default/images/spacer.gif" word_img="file://C:\Users\devincai\AppData\Local\Temp\[5UQ[BL(6~BS2JV6W}N6[%S.png" data-bd-imgshare-binded="1" style="margin: 0px; padding: 0px; border: 1px solid #dddddd; max-width: 640px; background: url(&quot;/js/ueditor/lang/zh-cn/images/localimage.png&quot;) 50% 50% no-repeat;"  alt="" /><a _src="http://pan.baidu.com/s/1mgXobxe" href="http://pan.baidu.com/s/1mgXobxe" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">http://pan.baidu.com/s/1mgXobxe</a>&nbsp;&nbsp;<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />64&nbsp;bit:&nbsp;<img src="http://www.oschina.net/js/ueditor/themes/default/images/spacer.gif" word_img="file://C:\Users\devincai\AppData\Local\Temp\[5UQ[BL(6~BS2JV6W}N6[%S.png" data-bd-imgshare-binded="1" style="margin: 0px; padding: 0px; border: 1px solid #dddddd; max-width: 640px; background: url(&quot;/js/ueditor/lang/zh-cn/images/localimage.png&quot;) 50% 50% no-repeat;"  alt="" /><a _src="http://pan.baidu.com/s/1pKjtk3T" href="http://pan.baidu.com/s/1pKjtk3T" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">http://pan.baidu.com/s/1pKjtk3T</a>&nbsp;&nbsp;<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />Release&nbsp;time:&nbsp;2015-11-04<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />Changelog:<br style="margin: 0px; padding: 0px;" />update&nbsp;ngx_lua&nbsp;module&nbsp;to&nbsp;0.9.19<br style="margin: 0px; padding: 0px;" />update&nbsp;headers-more-nginx-module&nbsp;to&nbsp;0.28<br style="margin: 0px; padding: 0px;" />update&nbsp;ngx_lua_upstream&nbsp;module&nbsp;to&nbsp;0.04<br style="margin: 0px; padding: 0px;" />update&nbsp;rds-csv-nginx-module&nbsp;to&nbsp;0.07<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />update&nbsp;lua-cjson&nbsp;module&nbsp;to&nbsp;2.1.0.3<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />update&nbsp;lua-rds-parser&nbsp;module&nbsp;to&nbsp;0.06<br style="margin: 0px; padding: 0px;" />update&nbsp;lua-redis-parser&nbsp;module&nbsp;to&nbsp;0.12<br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" />update&nbsp;LuaJIT&nbsp;to&nbsp;2.1.0&nbsp;beta1&nbsp;<br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px; font-size: 10pt; line-height: 1.6;">nginx&nbsp;<a href="http://www.oschina.net/p/openresty" target="_blank" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">openresty</a>&nbsp;迁移到 windows 下的版本。</span></p><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px; font-size: 10pt; line-height: 1.6;"><br /></span></p><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px; font-size: 10pt; line-height: 1.6;">主要特性：<br style="margin: 0px; padding: 0px;" /></span></p><ul list-paddingleft-2"="" style="margin: 0.5em 0px 0.5em 1.5em; padding: 0px; list-style-position: inside; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;"><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;高性能</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;超过 20,000 连接并发 (特定cpu多核的机器上，server新版本的 35000并发)</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;多进程</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;各种 Nginx bug 修复</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li></ul><p style="margin: 0px 0px 15pt; padding: 0px; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;">包括以下模块：</p><ul list-paddingleft-2"="" style="margin: 0.5em 0px 0.5em 1.5em; padding: 0px; list-style-position: inside; font-family: 'Microsoft YaHei', Verdana, sans-serif, 宋体; line-height: 20.3636px; background-color: #ffffff;"><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;ngx-coolkit-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;echo-nginx-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;set-misc-nginx-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;ngx-postgres-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;ngx-lua-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;headers-more-nginx-module</p><p style="margin: 0px; padding: 0px; display: inline;"></p></li><li style="margin: 0px; padding: 0px;"><p style="margin: 0px; padding: 0px; display: inline;"></p><p style="margin: 0px; padding: 0px; display: inline;">&nbsp;rds-json-nginx-module</p></li></ul><img src ="http://www.cppblog.com/cdy20/aggbug/212430.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-12-07 11:25 <a href="http://www.cppblog.com/cdy20/archive/2015/12/07/212430.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RSA 后门是个什么鬼。</title><link>http://www.cppblog.com/cdy20/archive/2015/11/19/212287.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Thu, 19 Nov 2015 11:32:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/11/19/212287.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/212287.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/11/19/212287.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/212287.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/212287.html</trackback:ping><description><![CDATA[<div>看了一些文档，关于rsa后门的问题。<br /><br /><br />大概就是：</div><div>https://github.com/fuhangbo/OpenSSL/blob/5886354dcca4f8445ed35b6995a035b75409590c/fips/rand/fips_drbg_ec.c</div><div>这个随机数生成算法，基于某个r特定常数 ，导致可以通过公钥 推算密钥 。</div><div></div><div>凡是用 Dual_EC_DRBG &nbsp;随机数生成算法,&nbsp;都悲剧,/fips_drbg_ec.c</div><div></div><div>借助公钥推算私钥推算程序 https://github.com/arisada/dualec_poc<br /><br /><br />没空实验。总之换个库先。<br /><br /><br /><br /><br /><br /><br /></div><img src ="http://www.cppblog.com/cdy20/aggbug/212287.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-11-19 19:32 <a href="http://www.cppblog.com/cdy20/archive/2015/11/19/212287.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Deep Learning (Spark, Caffe, GPU) </title><link>http://www.cppblog.com/cdy20/archive/2015/10/14/212013.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Wed, 14 Oct 2015 09:25:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/10/14/212013.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/212013.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/10/14/212013.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/212013.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/212013.html</trackback:ping><description><![CDATA[<h1 style="widows: auto; color: #4a4c4e; font-family: Lato, sans-serif; font-size: 34px; font-weight: 300; background-color: #ffffff;"></h1><h1 style="color: #4a4c4e; font-family: Lato, sans-serif; font-size: 34px; font-weight: 300; background-color: #ffffff;"><span style="font-size: 8pt;">from http://docs.continuum.io/anaconda-cluster/examples/spark-caffe</span><br /><br />Deep Learning (Spark, Caffe, GPU)</h1><h1><div style="display: inline-block;"></div></h1><h2 style="color: #737272; font-family: inherit; font-size: 20px; font-weight: 400;">Description</h2><h1><div style="display: inline-block;"><div style="font-weight: normal; widows: auto; color: #333333; font-family: Lato, sans-serif; font-size: 13px; background-color: #ffffff;"><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">To demonstrate the capability of running a distributed job in PySpark using a GPU, this example uses a neural network library,<span style="background-color: inherit;">&nbsp;</span><a href="http://caffe.berkeleyvision.org/" style="background-color: inherit; cursor: pointer; color: #0088cc;">Caffe</a>. Below is a trivial example of using Caffe on a Spark cluster; although this is redundant, it demonstrates the capability of training neural networks with GPUs.</p><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">For this example, we recommend the use of the AMI<span style="background-color: inherit;">&nbsp;</span><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">ami-2cbf3e44</span></code><span style="background-color: inherit;">&nbsp;</span>and the instance type<span style="background-color: inherit;">&nbsp;</span><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">g2.2xlarge</span></code>. An example profile (to be placed in<span style="background-color: inherit;">&nbsp;</span><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">~/.acluster/profiles.d/gpu_profile.yaml</span></code>) is shown below:</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;">name: gpu_profile
node_id: ami-2cbf3e44 # Ubuntu 14.04 - IS HVM - Cuda 6.5
user: ubuntu
node_type: g2.2xlarge
num_nodes: 3
provider: aws
plugins:
  - spark-yarn
  - notebook
</pre></div></div></div></h1><h2 style="color: #737272; font-family: inherit; font-size: 20px; font-weight: 400;">Download</h2><h1><div style="display: inline-block;"><div style="font-weight: normal; widows: auto; color: #333333; font-family: Lato, sans-serif; font-size: 13px; background-color: #ffffff;"><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">To execute this example, download the:<span style="background-color: inherit;">&nbsp;</span><a href="http://docs.continuum.io/_downloads/spark-caffe.py" style="background-color: inherit; cursor: pointer; color: #0088cc;"><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; font-weight: bold; background-color: transparent;"><span style="background-color: inherit;">spark-caffe.py</span><span style="background-color: inherit;">&nbsp;</span><span style="background-color: inherit;">example</span><span style="background-color: inherit;">&nbsp;</span><span style="background-color: inherit;">script</span></code></a><span style="background-color: inherit;">&nbsp;</span>or<span style="background-color: inherit;">&nbsp;</span><a href="http://docs.continuum.io/_downloads/spark-caffe.ipynb" style="background-color: inherit; cursor: pointer; color: #0088cc;"><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; font-weight: bold; background-color: transparent;"><span style="background-color: inherit;">spark-caffe.ipynb</span><span style="background-color: inherit;">example</span><span style="background-color: inherit;">&nbsp;</span><span style="background-color: inherit;">notebook</span></code></a>.</p></div></div></h1><h2 style="color: #737272; font-family: inherit; font-size: 20px; font-weight: 400;">Installation</h2><h1><div style="display: inline-block;"><div style="font-weight: normal; widows: auto; color: #333333; font-family: Lato, sans-serif; font-size: 13px; background-color: #ffffff;"><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">The Spark + YARN plugin can be installed on the cluster using the following command:</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;"><span style="background-color: inherit; color: #bb60d5;">$ </span>acluster install spark-yarn
</pre></div><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">Once the Spark + YARN plugin is installed, you can view the YARN UI in your browser using the following command:</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;"><span style="background-color: inherit; color: #bb60d5;">$ </span>acluster open yarn
</pre></div></div></div></h1><h2 style="color: #737272; font-family: inherit; font-size: 20px; font-weight: 400;">Dependencies</h2><h1><div style="display: inline-block;"><div style="font-weight: normal; widows: auto; color: #333333; font-family: Lato, sans-serif; font-size: 13px; background-color: #ffffff;"><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">First, we need to bootstrap Caffe and its dependencies on all of the nodes. We provide a bash script that will install Caffe from source:<span style="background-color: inherit;">&nbsp;</span><a href="http://docs.continuum.io/_downloads/bootstrap-caffe.sh" style="background-color: inherit; cursor: pointer; color: #0088cc;"><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; font-weight: bold; background-color: transparent;">bootstrap-caffe.sh</code></a>. The following command can be used to upload the<span style="background-color: inherit;">&nbsp;</span><code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">bootstrap-caffe.sh</span></code><span style="background-color: inherit;">&nbsp;</span>script to all of the nodes and execute it in parallel:</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;">$ acluster submit bootstrap-caffe.sh --all
</pre></div><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">After a few minues, Caffe and its dependencies will be installed on the cluster nodes and the job can be started.</p></div></div></h1><h2 style="color: #737272; font-family: inherit; font-size: 20px; font-weight: 400;">Running the Job</h2><h1><div style="font-weight: normal; widows: auto; color: #333333; font-family: Lato, sans-serif; font-size: 13px; background-color: #ffffff;"><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">Here is the complete script to run the Spark + GPU with Caffe example in PySpark:</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;"><span style="background-color: inherit; color: #408090; font-style: italic;"># spark-caffe.py</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">from</span> <span style="background-color: inherit; color: #0e84b5; font-weight: bold;">pyspark</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">import</span> <span style="background-color: inherit;">SparkConf</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">from</span> <span style="background-color: inherit; color: #0e84b5; font-weight: bold;">pyspark</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">import</span> <span style="background-color: inherit;">SparkContext</span>  <span style="background-color: inherit;">conf</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">SparkConf</span><span style="background-color: inherit;">()</span> <span style="background-color: inherit;">conf</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">setMaster</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #4070a0;">'yarn-client'</span><span style="background-color: inherit;">)</span> <span style="background-color: inherit;">conf</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">setAppName</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #4070a0;">'spark-caffe'</span><span style="background-color: inherit;">)</span> <span style="background-color: inherit;">sc</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">SparkContext</span><span style="background-color: inherit;">(</span><span style="background-color: inherit;">conf</span><span style="background-color: inherit; color: #666666;">=</span><span style="background-color: inherit;">conf</span><span style="background-color: inherit;">)</span>   <span style="background-color: inherit; color: #007020; font-weight: bold;">def</span> <span style="background-color: inherit; color: #06287e;">noop</span><span style="background-color: inherit;">(</span><span style="background-color: inherit;">x</span><span style="background-color: inherit;">):</span>     <span style="background-color: inherit; color: #007020; font-weight: bold;">import</span> <span style="background-color: inherit; color: #0e84b5; font-weight: bold;">socket</span>     <span style="background-color: inherit; color: #007020; font-weight: bold;">return</span> <span style="background-color: inherit;">socket</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">gethostname</span><span style="background-color: inherit;">()</span>  <span style="background-color: inherit;">rdd</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">sc</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">parallelize</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #007020;">range</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #208050;">2</span><span style="background-color: inherit;">),</span> <span style="background-color: inherit; color: #208050;">2</span><span style="background-color: inherit;">)</span> <span style="background-color: inherit;">hosts</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">rdd</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">map</span><span style="background-color: inherit;">(</span><span style="background-color: inherit;">noop</span><span style="background-color: inherit;">)</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">distinct</span><span style="background-color: inherit;">()</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">collect</span><span style="background-color: inherit;">()</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">print</span> <span style="background-color: inherit;">hosts</span>   <span style="background-color: inherit; color: #007020; font-weight: bold;">def</span> <span style="background-color: inherit; color: #06287e;">caffe_process</span><span style="background-color: inherit;">(</span><span style="background-color: inherit;">x</span><span style="background-color: inherit;">):</span>     <span style="background-color: inherit; color: #007020; font-weight: bold;">import</span> <span style="background-color: inherit; color: #0e84b5; font-weight: bold;">os</span>     <span style="background-color: inherit;">os</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">environ</span><span style="background-color: inherit;">[</span><span style="background-color: inherit; color: #4070a0;">'PATH'</span><span style="background-color: inherit;">]</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit; color: #4070a0;">'/usr/local/cuda/bin'</span> <span style="background-color: inherit; color: #666666;">+</span> <span style="background-color: inherit; color: #4070a0;">':'</span> <span style="background-color: inherit; color: #666666;">+</span> <span style="background-color: inherit;">os</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">environ</span><span style="background-color: inherit;">[</span><span style="background-color: inherit; color: #4070a0;">'PATH'</span><span style="background-color: inherit;">]</span>     <span style="background-color: inherit;">os</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">environ</span><span style="background-color: inherit;">[</span><span style="background-color: inherit; color: #4070a0;">'LD_LIBRARY_PATH'</span><span style="background-color: inherit;">]</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit; color: #4070a0;">'/usr/local/cuda/lib64:/home/ubuntu/pombredanne-https-gitorious.org-mdb-mdb.git-9cc04f604f80/libraries/liblmdb'</span>     <span style="background-color: inherit; color: #007020; font-weight: bold;">import</span> <span style="background-color: inherit; color: #0e84b5; font-weight: bold;">subprocess</span>     <span style="background-color: inherit;">proc</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">subprocess</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">Popen</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #4070a0;">'cd /home/ubuntu/caffe &amp;&amp; bash ./examples/mnist/train_lenet.sh'</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">shell</span><span style="background-color: inherit; color: #666666;">=</span><span style="background-color: inherit; color: #007020;">True</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">stdout</span><span style="background-color: inherit; color: #666666;">=</span><span style="background-color: inherit;">subprocess</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">PIPE</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">stderr</span><span style="background-color: inherit; color: #666666;">=</span><span style="background-color: inherit;">subprocess</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">PIPE</span><span style="background-color: inherit;">)</span>     <span style="background-color: inherit;">out</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">err</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">proc</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">communicate</span><span style="background-color: inherit;">()</span>     <span style="background-color: inherit; color: #007020; font-weight: bold;">return</span> <span style="background-color: inherit;">proc</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">returncode</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">out</span><span style="background-color: inherit;">,</span> <span style="background-color: inherit;">err</span>  <span style="background-color: inherit;">rdd</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">sc</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">parallelize</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #007020;">range</span><span style="background-color: inherit;">(</span><span style="background-color: inherit; color: #208050;">2</span><span style="background-color: inherit;">),</span> <span style="background-color: inherit; color: #208050;">2</span><span style="background-color: inherit;">)</span> <span style="background-color: inherit;">ret</span> <span style="background-color: inherit; color: #666666;">=</span> <span style="background-color: inherit;">rdd</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">map</span><span style="background-color: inherit;">(</span><span style="background-color: inherit;">caffe_process</span><span style="background-color: inherit;">)</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">distinct</span><span style="background-color: inherit;">()</span><span style="background-color: inherit; color: #666666;">.</span><span style="background-color: inherit;">collect</span><span style="background-color: inherit;">()</span> <span style="background-color: inherit; color: #007020; font-weight: bold;">print</span> <span style="background-color: inherit;">ret</span> </pre></div><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">You can submit the script to the Spark cluster using the&nbsp;<code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">submit</span></code>&nbsp;command.</p><div style="background-color: #eeffcc;"><pre style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.025px; background-color: #f5f5f5;">$ acluster submit spark-caffe.py </pre></div><p style="margin-right: 0px; margin-left: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: inherit;">After the script completes, the trained Caffe model can be found at<code style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace; background-color: inherit;"><span style="background-color: inherit;">/home/ubuntu/caffe/examples/mnist/lenet_iter_10000.caffemodel</span></code>&nbsp;on all of the compute nodes.</p><div></div></div></h1><img src ="http://www.cppblog.com/cdy20/aggbug/212013.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-10-14 17:25 <a href="http://www.cppblog.com/cdy20/archive/2015/10/14/212013.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>虚拟机 沙箱 简单有效的检测方法，工程使用笔记</title><link>http://www.cppblog.com/cdy20/archive/2015/10/10/211984.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Sat, 10 Oct 2015 03:00:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/10/10/211984.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/211984.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/10/10/211984.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/211984.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/211984.html</trackback:ping><description><![CDATA[<div>2015-10-10 蔡东赟</div><div></div><div>&nbsp; &nbsp; HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Disk\Enum</div><div>&nbsp; &nbsp; 或者直接检测IDE\DISK &nbsp;会有QEMU,vbox,vmware,virtualhd</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Disk\Enum</div><div><span style="white-space:pre">	</span>0 &nbsp;SCSI\Disk&amp;Ven_VMware_&amp;Prod_VMware_Virtual_S&amp;Rev_1.0\4&amp;5fcaafc&amp;0&amp;000</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI</div><div><span style="white-space:pre">	</span>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&amp;Ven_VMware_&amp;Prod_VMware_Virtual_S&amp;Rev_1.0</div><div><span style="white-space:pre">	</span>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\CdRomNECVMWar_VMware_IDE_CDR10_______________1.00____</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>遍历的虚拟机进程有：</div><div>&nbsp; &nbsp; "VBoxTray.exe"</div><div>&nbsp; &nbsp; "VBoxService.exe"&nbsp;</div><div>&nbsp; &nbsp; "VMwareUser.exe"</div><div>&nbsp; &nbsp; "VMwareTray.exe"</div><div>&nbsp; &nbsp; "VMUpgradeHelper.exe"</div><div>&nbsp; &nbsp; "vmtoolsd.exe"</div><div>&nbsp; &nbsp; "vmacthlp.exe"</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>各种驱动文件</div><div><span style="white-space:pre">	</span>c:\windows\system32\drivers\winmouse.sys</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>The packer checks for the existence of the following fi les.</div><div><span style="white-space:pre">	</span>%system32%\drivers\vmmouse.sys</div><div><span style="white-space:pre">	</span>%system32%\drivers\vmhgfs.sys</div><div><span style="white-space:pre">	</span>%system32%\drivers\VBoxMouse.sys</div><div><span style="white-space:pre">	</span>%system32%\drivers\VBoxGuest.sys</div><div><span style="white-space:pre">	</span>The fi rst two are used by VMware; the latter&nbsp;</div><div><span style="white-space:pre">	</span>%System32\drivers\目录下是否存在hgfs.sys、prleth.sys、vmhgfs.sys驱动文件，其中hgfs.sys驱动文件为VMware Tools的驱动文件</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span>虚拟机硬件信息</div><div>&nbsp; &nbsp; &nbsp;虚拟机的网卡信息会有固定指纹</div><div>&nbsp; &nbsp; &nbsp;MAC地址：</div><div>&nbsp; &nbsp; &nbsp;00:05:69:xx:xx:xx VMware</div><div>&nbsp; &nbsp; &nbsp;00:0C:29:xx:xx:xx VMware</div><div>&nbsp; &nbsp; &nbsp;00:1C:14:xx:xx:xx VMware</div><div>&nbsp; &nbsp; &nbsp;00:50:56:xx:xx:xx VMware</div><div>&nbsp; &nbsp; &nbsp;00:15:5D:xx:xx:xx Hyper V&nbsp;</div><div>&nbsp; &nbsp; &nbsp;00:16:3e:xx:xx:xx Xen</div><div><span style="white-space:pre">	</span>&nbsp;</div><div><span style="white-space:pre">	</span>&nbsp;</div><div><span style="white-space:pre">	</span> 安装的系统环境信息，比如卷信息</div><div>比如有病毒样本就会通过kernel32.getvolumeinformationA查询系统卷信息，因为虚拟机的各个操作系统分区是从宿主机复制过来的，就存在各个卷信息相同的情况，而且如果黑客掌握了某款沙箱产品固有操作系统的卷信息指纹，也就很容易逃避过去。</div><div>（手工可以在cmd下用wmic.exe volume查看）</div><div></div><div><span style="white-space:pre">	</span> opens hard drive &#8216;\\.\PhysicalDrive0&#8217; and sends</div><div>control code 0x2D1400 to it (see Figure 2). It then checks</div><div>whether the output buffer contains any of the following</div><div>strings:</div><div><span style="white-space:pre">	</span>trings:</div><div><span style="white-space:pre">	</span>&#8216;vbox&#8217;</div><div><span style="white-space:pre">	</span>&#8216;qemu&#8217;</div><div><span style="white-space:pre">	</span>&#8216;vmware&#8217;</div><div><span style="white-space:pre">	</span>&#8216;virtual&#8217;</div><div><span style="white-space:pre">	</span>&#8216;qm00001&#8217;</div><div><span style="white-space:pre">	</span>&#8216;array&#8217;</div><div><span style="white-space:pre">	</span>&#8216;00000000000000000001&#8217;</div><div><span style="white-space:pre">	<br />其他 code  参考 </span>https://github.com/David-Reguera-Garcia-Dreg/anticuckoo<span style="white-space:pre"><br /></span>https://github.com/David-Reguera-Garcia-Dreg/anticuckoo</div><div></div><img src ="http://www.cppblog.com/cdy20/aggbug/211984.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-10-10 11:00 <a href="http://www.cppblog.com/cdy20/archive/2015/10/10/211984.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>nginx-openresty-windows 改造支持，提升性能，开源</title><link>http://www.cppblog.com/cdy20/archive/2015/05/22/210715.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Fri, 22 May 2015 05:45:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/05/22/210715.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/210715.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/05/22/210715.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/210715.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/210715.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/cdy20/archive/2015/05/22/210715.html'>阅读全文</a><img src ="http://www.cppblog.com/cdy20/aggbug/210715.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-05-22 13:45 <a href="http://www.cppblog.com/cdy20/archive/2015/05/22/210715.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>寻找  重头开始</title><link>http://www.cppblog.com/cdy20/archive/2015/03/29/210191.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Sun, 29 Mar 2015 04:35:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/03/29/210191.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/210191.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/03/29/210191.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/210191.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/210191.html</trackback:ping><description><![CDATA[决定去寻找自由发挥的地方。<br />这些年为了生活压制自己在这样的地方，忍受种种<br /><br />今年要任性，任性一回，找地方重头开始<img src ="http://www.cppblog.com/cdy20/aggbug/210191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-03-29 12:35 <a href="http://www.cppblog.com/cdy20/archive/2015/03/29/210191.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>beanstalkd windows 支持 改造</title><link>http://www.cppblog.com/cdy20/archive/2015/03/10/209989.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Tue, 10 Mar 2015 03:13:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2015/03/10/209989.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/209989.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2015/03/10/209989.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/209989.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/209989.html</trackback:ping><description><![CDATA[<div><br /><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 21.3333320617676px; background-color: #ffffff;">Beanstalk 是一个简单、快速的消息队列。Beanstalkd之于<a href="http://www.oschina.net/p/rabbitmq" target="_blank" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">RabbitMQ</a>，就好比<a target="_blank" href="http://www.oschina.net/p/nginx" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">Nginx</a>之于<a target="_blank" href="http://www.oschina.net/p/apache+http+server" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">Apache</a>，<a target="_blank" href="http://www.oschina.net/p/varnish" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">Varnish</a>之于<a target="_blank" href="http://www.oschina.net/p/squid" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">Squid</a>。后面在项目中使用Beanstalkd的过程中，更发现其简单、轻量级、高性能、易使用等特点，以及优先级、多队列、持久化、分布式容错、超时控制等特性。</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 21.3333320617676px; background-color: #ffffff;">Beanstalkd 包含多种编程语言的客户端开发包，详情请看<a target="_blank" href="https://github.com/kr/beanstalkd/wiki/client-libraries" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">这里</a>。Beanstalkd 同时也提供一些图形化的管理工具，详情请看<a target="_blank" href="https://github.com/kr/beanstalkd/wiki/Tools" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">这里</a>。<br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 21.3333320617676px; background-color: #ffffff;">示例代码：<br /><br /></p><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->beanstalk&nbsp;=&nbsp;Beanstalk::Pool.<span style="color: #0000FF; ">new</span>(['10.0.1.5:11300'])<br />beanstalk.put('hello')</div><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 21.3333320617676px; background-color: #ffffff;"><br /></p>fork修改的代码：<br /><br /><div>https://github.com/caidongyun/beanstalkd-win</div><br />select模型支持<br />安装：&nbsp;cygwin &nbsp;automake gcc<br /><br />对应的makefile已经生成了<br />执行make就可以用了<br /><br />压力测试过，上千并发，widnows<br /><br /><br /><br /></div><img src ="http://www.cppblog.com/cdy20/aggbug/209989.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2015-03-10 11:13 <a href="http://www.cppblog.com/cdy20/archive/2015/03/10/209989.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>都奔虚拟化了，带宽却跟不上</title><link>http://www.cppblog.com/cdy20/archive/2014/10/30/208721.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Thu, 30 Oct 2014 02:20:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2014/10/30/208721.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/208721.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2014/10/30/208721.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/208721.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/208721.html</trackback:ping><description><![CDATA[ 企业还有国家现在有个趋势，就是全部把服务器集中虚拟化平台管理，原来在市局 或者市级别的 都往上挪，比如集中到省管理 集中到国家管理。


现在好多企业国家机构在做这个事情。

随之而来就是带宽问题了，比如国家机构有些网络是购买外部的商业的带宽通过vpn连的，带宽很小，满足办公用就很吃紧了。


集中化服务器管理，存在的问题就是网络带宽升级跟不上
<img src ="http://www.cppblog.com/cdy20/aggbug/208721.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2014-10-30 10:20 <a href="http://www.cppblog.com/cdy20/archive/2014/10/30/208721.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>lomox 新版本修改，新增用户案例</title><link>http://www.cppblog.com/cdy20/archive/2014/06/17/207312.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Tue, 17 Jun 2014 06:33:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2014/06/17/207312.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/207312.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2014/06/17/207312.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/207312.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/207312.html</trackback:ping><description><![CDATA[<p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">demo</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px;">旧版demo集合介绍和下载</span>：http://yun.baidu.com/share/link?shareid=201029&amp;uk=2485132527&amp;third=null</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;">2014--04-26 &nbsp;:</strong><strong style="margin: 0px; padding: 0px;"><a href="http://yunpan.cn/QNXJ3SrvtHKqf" target="_blank" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;"></a><a href="http://pan.baidu.com/s/1mgKBloO" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">http://pan.baidu.com/s/1mgKBloO</a>&nbsp;新版以及demo等文件</strong></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></strong></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">QtWebkit版本最新：</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">github:&nbsp;<a href="https://github.com/caidongyun/lomox.git" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;">https://github.com/caidongyun/lomox.git</a></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">&nbsp;</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">Cef版本筹备中.</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">当乐游戏pc</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><a href="http://app.d.cn/pc" target="_blank" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;"><img src="http://static.oschina.net/uploads/space/2014/0611/201937_nne6_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></a></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><a href="http://app.d.cn/pc" target="_blank" style="margin: 0px; padding: 0px; color: #3e62a6; outline: 0px;"><img src="http://static.oschina.net/uploads/space/2014/0611/201955_G63g_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></a></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">手机版本开始产品化：</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><img src="http://static.oschina.net/uploads/space/2014/0612/101522_BGt0_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><img src="http://static.oschina.net/uploads/space/2014/0612/101537_rfqY_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">360企业安全相关：</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><img src="http://static.oschina.net/uploads/space/2014/0426/192337_58j0_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">360企业安全 天擎远控</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">主控：<img src="http://static.oschina.net/uploads/space/2014/0611/205618_65Y6_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">被控：<img src="http://static.oschina.net/uploads/space/2014/0611/205627_GV2c_193377.jpg" alt="" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><img alt="" src="http://static.oschina.net/uploads/space/2013/0529/164540_zB2o_193377.jpg" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">svg支持：</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;">&nbsp;</p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /></p><p style="margin: 0px 0px 10px; padding: 0px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; background-color: #ffffff;"><img alt="" src="http://static.oschina.net/uploads/space/2014/0313/204922_XZO2_193377.jpg" style="margin: 0px; padding: 0px; border: 0px; max-width: 700px;" /></p><img src ="http://www.cppblog.com/cdy20/aggbug/207312.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2014-06-17 14:33 <a href="http://www.cppblog.com/cdy20/archive/2014/06/17/207312.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>分布式外存容器，新开开源项目exist 外存</title><link>http://www.cppblog.com/cdy20/archive/2014/05/10/206885.html</link><dc:creator>爬</dc:creator><author>爬</author><pubDate>Sat, 10 May 2014 08:51:00 GMT</pubDate><guid>http://www.cppblog.com/cdy20/archive/2014/05/10/206885.html</guid><wfw:comment>http://www.cppblog.com/cdy20/comments/206885.html</wfw:comment><comments>http://www.cppblog.com/cdy20/archive/2014/05/10/206885.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cdy20/comments/commentRss/206885.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cdy20/services/trackbacks/206885.html</trackback:ping><description><![CDATA[<br />新开开源项目exist： key-value 分布式集群，最终目标是容器方式操作集群。<br /><a href="https://github.com/caidongyun/Exist"><br />https://github.com/caidongyun/Exist<br /><br /><br />思想from火羽：<br /><br /><p style="margin-bottom:0pt; margin-top:0pt; text-align:center; "><span style="mso-spacerun:'yes'; font-size:14.0000pt; font-family:'宋体'; ">Exist&nbsp;(外存)项目核心思想</span></p><h1><span style="font-size: 14pt; font-family: 宋体;">1.&nbsp;</span><span style="font-size: 14pt; font-family: 宋体;">Exist是什么</span>&nbsp;</h1><p style="margin-left:21.0000pt; text-indent:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">有内存，为什么不能有外存！</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">Exist是</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">Ex</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ternal&nbsp;</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">i</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">n&nbsp;</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">st</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ored的缩写组成。</span></p><h1><span style="font-size: 14pt; font-family: 宋体;">2.&nbsp;</span><span style="font-size: 14pt; font-family: 宋体;">Exist带来了什么</span></h1><p style="margin-left:21.0000pt; text-indent:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">Ex</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ternal&nbsp;</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">i</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">n&nbsp;</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">st</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ored顾名思义&#8220;在外部存储&#8221;，让我们忘记数据在分布式系统中的空间差异，让分布式没有代码。</span></p><h1><span style="font-size: 14pt; font-family: 宋体;">3.&nbsp;</span><span style="font-size: 14pt; font-family: 宋体;">应用案例</span></h1><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">有100万玩家</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">服务端代码</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Calibri'; ">L</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ock&nbsp;m_lockUsers;</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">vector&lt;User&gt;&nbsp;m_users;//玩家列表</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">GetAllUser()</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">{</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">	</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">m_lockUsers.lock();</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">	</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">遍历m_users;</span></p><p style="margin-left:21.0000pt; text-indent:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">什么？一共有100台机器为这100万用户服务，m_user里只有本机的用户信息？</span></p><p style="margin-left:21.0000pt; text-indent:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">用外存吧，代码不用改变m_users里面就是有全部用户</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">	</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">m_lockUsers.unlock();</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">	</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">什么？lock锁不住其他网络结点对m_users的修改</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">	</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">在外存里，Lock可以</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">}</span></p><h1><span style="font-size: 14pt; font-family: 宋体;">4.&nbsp;</span><span style="font-size: 14pt; font-family: 宋体;">设计思想</span></h1><h2><span style="font-size: 12pt; font-family: 宋体;">4.1.&nbsp;</span><span style="font-size: 12pt; font-family: 宋体;">Exist组成</span></h2><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><img width="554" height="228" src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml\wps_clip_image-28638.png" alt="" />&nbsp;</p><h2><span style="font-size: 12pt; font-family: 宋体;">4.2.&nbsp;</span><span style="font-size: 12pt; font-family: 宋体;">访问接口&#8212;&#8212;容器类只举一例</span></h2><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><img width="520" height="395" src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml\wps_clip_image-32472.png" alt="" />&nbsp;</p><h2><span style="font-size: 12pt; font-family: 宋体;">4.3.&nbsp;</span><span style="font-size: 12pt; font-family: 宋体;">访问接口&#8212;&#8212;控制类只举一例</span></h2><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><img width="461" height="337" src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml\wps_clip_image-22452.png" alt="" />&nbsp;</p><h2><span style="font-size: 12pt; font-family: 宋体;">4.4.&nbsp;</span><span style="font-size: 12pt; font-family: 宋体;">对象创建&#8212;&#8212;重载new/delete</span></h2><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Calibri'; ">N</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">ew:创建Exist接口类，并链接到Exist集群</span></p><p style="margin-left:21.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Calibri'; ">D</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'宋体'; ">elete:断开链接，并释放Exist接口类</span></p><br /><br /></a><img src ="http://www.cppblog.com/cdy20/aggbug/206885.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cdy20/" target="_blank">爬</a> 2014-05-10 16:51 <a href="http://www.cppblog.com/cdy20/archive/2014/05/10/206885.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>