<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>iamroody (王琰)</title>
    <link>https://ruby-china.org/iamroody</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>MongoDB 的备份策略</title>
      <description>&lt;p&gt;用 dump 整个数据库的方式来备份，会完全占满磁盘 IO，基本上 server 就会处于不可用的状态，并且备份出来动辄好几个 G 的数据库文件也不好管理。&lt;/p&gt;

&lt;p&gt;想要使用 MongoDB 的 MMS 服务，增量的 oplog 备份看起来很不错，但是不知道对国内 MongoDB 服务器备份起来，带宽或者其他方面是否有影响。&lt;/p&gt;

&lt;p&gt;所以想要请教大家，你们的 MongoDB 的备份策略是咋做的？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Thu, 14 Aug 2014 10:54:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/21018</link>
      <guid>https://ruby-china.org/topics/21018</guid>
    </item>
    <item>
      <title>请教关于文件上传的一些问题</title>
      <description>&lt;p&gt;最近项目上涉及到一些文件上传的功能，选用的是 Jquery file upload 插件和 Qiniu 云来做，在非 IE 环境下，进度条啊，直传到七牛啊，都一切正常。但遇到 IE8 就直接傻眼了，进度条不支持，不支持 XHR 跨域通信等等。&lt;/p&gt;

&lt;p&gt;请教诸位系统中的文件上传用的什么技术来做的呢？&lt;/p&gt;

&lt;p&gt;PS: 我看到蝉游记的文件上传在各种浏览器下工作的异常顺利，貌似是用 flash 来做的，效果很赞，请教 &lt;a href="/quakewang" class="user-mention" title="@quakewang"&gt;&lt;i&gt;@&lt;/i&gt;quakewang&lt;/a&gt; 给指点一下。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Sat, 12 Apr 2014 23:20:08 +0800</pubDate>
      <link>https://ruby-china.org/topics/18564</link>
      <guid>https://ruby-china.org/topics/18564</guid>
    </item>
    <item>
      <title>Replica Set 下，mongodb 的读写一致性怎么样？</title>
      <description>&lt;p&gt;当前，我们的数据库集合做了最简单的一个集合，1 台 primary，2 台 secondary。系统中所有的读写，现在都指向了 primary，这就带来的问题是，primary 负载过高。但是如果 primary 只写，而把所有读操作放到 secondary 上，可能会遇到读写不一致的情况。&lt;/p&gt;

&lt;p&gt;请问，大家有没有遇到类似的问题，读写不一致的延迟大概会有多长时间？如何来测试呢？你们是如何做选择的？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Tue, 11 Mar 2014 14:03:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/17799</link>
      <guid>https://ruby-china.org/topics/17799</guid>
    </item>
    <item>
      <title>邮件大量被 QQ 邮箱屏蔽，你们有什么好招么？</title>
      <description>&lt;p&gt;我们使用 mailgun 来给用户发送一些数据提醒的邮件，并且还是使用的 mailgun 的独立 IP 的套餐，但是最近一段时间，邮件的送达率大大的降低，尤其是使用的 QQ 企业邮箱，查日志发现大量的错误信息：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Server response: 550 Connection denied. http://service.mail.qq.com/cgi-bin/help?subtype=1&amp;amp;&amp;amp;id=20022&amp;amp;&amp;amp;no=1000727
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;根据 QQ 邮箱的错误代码提示，550 Connection denied 是“该服务器 IP 的发信频率大幅度超过 QQ 邮箱限制” ，但是我们有很多的用户都是使用的 QQ 企业邮箱，所以不可避免。&lt;/p&gt;

&lt;p&gt;诸位有没有遇到类似的问题？怎么破？有没有好的邮件发送策略？&lt;/p&gt;
&lt;h3 id="情况更新："&gt;情况更新：&lt;/h3&gt;
&lt;p&gt;我们之前的邮件投递失败的邮箱都是 QQ 企业邮箱，而我们的用于发送邮件的邮箱 (notification@example.com) 也是绑定在企业邮箱的，在知乎上发现了有类似的问题，最后的解决方案就是使用二级域名 (notification@mailer.example.com) 来发。这样修改之后，目前邮件发送恢复正常。&lt;/p&gt;

&lt;p&gt;知乎： &lt;a href="http://www.zhihu.com/question/20522435" rel="nofollow" target="_blank"&gt;http://www.zhihu.com/question/20522435&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;关于企业邮箱自建发信服务器&lt;/p&gt;

&lt;p&gt;尊敬的管理员：&lt;/p&gt;

&lt;p&gt;您好，感谢使用腾讯企业邮箱服务。&lt;/p&gt;

&lt;p&gt;近期，系统检查发现，贵司自建了服务器发信，并且使用与企业邮相同的域名。这种行为极易被他人利用，来假冒贵司的身份发信。&lt;/p&gt;

&lt;p&gt;为了规避此类风险，近期我们将&lt;em&gt;停止接收来自于自建发信服务器，同时域名又在使用腾讯企业邮的邮件&lt;/em&gt;，特此通知。&lt;/p&gt;

&lt;p&gt;同时建议您建立另外一个二级域名来发。例如：
postmaster@&lt;em&gt;ad.&lt;/em&gt;&lt;em&gt;您的域名&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;希望您能理解并继续支持我们的服务。&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 03 Jan 2014 10:20:18 +0800</pubDate>
      <link>https://ruby-china.org/topics/16590</link>
      <guid>https://ruby-china.org/topics/16590</guid>
    </item>
    <item>
      <title>Slim 难用死了。。。。</title>
      <description>&lt;p&gt;如题，有多少人是在生产环境中在用？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 27 Nov 2013 16:20:56 +0800</pubDate>
      <link>https://ruby-china.org/topics/15839</link>
      <guid>https://ruby-china.org/topics/15839</guid>
    </item>
    <item>
      <title>有没有终极方案解决 “invalid byte sequence in UTF-8”？</title>
      <description>&lt;p&gt;经常碰到这样的问题，会在系统中修修补补，但是这不是好的实践，大家有方法么？&lt;/p&gt;

&lt;p&gt;有看到说有人用“utf8-cleaner”，这个靠谱不？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 22 Nov 2013 11:20:05 +0800</pubDate>
      <link>https://ruby-china.org/topics/15725</link>
      <guid>https://ruby-china.org/topics/15725</guid>
    </item>
    <item>
      <title>你们是如何管理生产环境中的 Rails log 信息的？</title>
      <description>&lt;p&gt;每天会有大量的 Rails log 信息产生出来，有的时候遇到 server 的一些问题，虽然有 newrelic 和 airbrake 的错误提示，但还需要到 log 里面去找问题，在几百 M 或者上 G 的 log 文件中定位问题着实很头疼。并且，有的时候是好几台 server 的日志都要一块看，效率非常差。&lt;/p&gt;

&lt;p&gt;大家是如何管理你们的日志信息的？会把这些日志以什么样的形式整理起来方便查询和定位？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 22 Nov 2013 11:14:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/15724</link>
      <guid>https://ruby-china.org/topics/15724</guid>
    </item>
    <item>
      <title>国内服务器如何为用户提供绑定顶级域名服务？</title>
      <description>&lt;p&gt;在国内是无法为用户提供自定义域名服务的，因为国内有两大限制，第一：要绑定的自定义域名必须要备案；第二：域名备案的服务商必须要和服务器的提供商一致，否则必须办理域名备案转入。&lt;/p&gt;

&lt;p&gt;更新：
用户们可以理解需要备案这一要求，但是用户备案的服务商是和我们服务器提供商是不一致的，这种情况下，服务器提供商会把这些域名的访问请求直接断掉，没有商量余地。&lt;/p&gt;

&lt;p&gt;这两大限制，阻止了 90% 的用户。。。&lt;/p&gt;
&lt;h4 id="最终解决方案："&gt;最终解决方案：&lt;/h4&gt;
&lt;p&gt;在海外的一台主机上，加了一个 nginx 做反向代理，将所有请求 pass 到国内的 server 上，nginx 配置如下：&lt;/p&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt; {
        &lt;span class="n"&gt;listen&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;;
        &lt;span class="n"&gt;server_name&lt;/span&gt; &lt;span class="n"&gt;proxy&lt;/span&gt;.域名.&lt;span class="n"&gt;com&lt;/span&gt;; &lt;span class="c"&gt;#该域名是备案过的
&lt;/span&gt;        &lt;span class="n"&gt;location&lt;/span&gt; / {
                 &lt;span class="n"&gt;proxy_pass&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;://域名.&lt;span class="n"&gt;com&lt;/span&gt;;
                 &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;referer&lt;/span&gt; $&lt;span class="n"&gt;server_name&lt;/span&gt;; &lt;span class="c"&gt;#防止被检测出来，将referer设置成该cname
&lt;/span&gt;                 &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;-&lt;span class="n"&gt;Origin&lt;/span&gt; $&lt;span class="n"&gt;host&lt;/span&gt;;  &lt;span class="c"&gt;#将原始的域名写在这里，给未来系统中使用
&lt;/span&gt;                 &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;-&lt;span class="n"&gt;Real&lt;/span&gt;-&lt;span class="n"&gt;IP&lt;/span&gt; $&lt;span class="n"&gt;remote_addr&lt;/span&gt;; &lt;span class="c"&gt;#同时将原始的访问请求的IP地址记录在这里
&lt;/span&gt;         }
  }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;让用户将自己的域名 cname 到 proxy.域名.com 即可，这样就可以绕过了。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Mon, 04 Nov 2013 16:10:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/15289</link>
      <guid>https://ruby-china.org/topics/15289</guid>
    </item>
    <item>
      <title>有支持 https 的地图 API 么？</title>
      <description>&lt;p&gt;项目中要用到地理位置获取的功能，考虑用百度地图或 google 地图，由于客户主要是国内用户，所以准备使用百度地图。但是研究了一下，发现这货的 api 不支持 https，但是我们是全站 https，所以用户在使用时会频繁的跳出一些对话框，很是惹人。&lt;/p&gt;

&lt;p&gt;求问，有没有好的支持 https 的地图 api 推荐？或者想要继续使用百度的 api，如何来 fix 这个问题呢？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 30 Oct 2013 18:04:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/15163</link>
      <guid>https://ruby-china.org/topics/15163</guid>
    </item>
    <item>
      <title>[西安][10 月 26 日] Rails Girls 活动召集！</title>
      <description>&lt;h3 id="10月26日，Rails Girls 再次来袭，这次是古城西安！"&gt;10 月 26 日，Rails Girls 再次来袭，这次是古城西安！&lt;/h3&gt;
&lt;p&gt;Rails Girls 台北刚刚落下帷幕，也许大家还对活动中的各个漂亮妹子难以忘怀，但是目光请聚焦到西安来，期待你的参与！是的，那天是 Ruby Conf China，但如果你无法去北京，而刚好在西安，那么来参加 Rails Girls 吧！&lt;/p&gt;
&lt;h3 id="Rails Girls 西安"&gt;Rails Girls 西安&lt;/h3&gt;
&lt;p&gt;时间：10 月 26 日
主页： &lt;a href="http://railsgirls.com/xian201310" rel="nofollow" target="_blank"&gt;http://railsgirls.com/xian201310&lt;/a&gt;
微博：&lt;a href="http://weibo.com/railsgirlsxian" rel="nofollow" target="_blank"&gt;http://weibo.com/railsgirlsxian&lt;/a&gt;
地点： &lt;a href="http://www.thoughtworks.com/cn/about-us" rel="nofollow" target="_blank" title=""&gt;ThoughtWorks&lt;/a&gt;  西安办公室，&lt;a href="http://j.map.baidu.com/MIAHn" rel="nofollow" target="_blank" title=""&gt;查看地图&lt;/a&gt;
教练和学员报名入口： &lt;a href="https://jinshuju.net/f/Q8XpAG" rel="nofollow" target="_blank"&gt;https://jinshuju.net/f/Q8XpAG&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="教练"&gt;教练&lt;/h3&gt;
&lt;p&gt;别被教练这个词所蒙蔽，真的不需要具备多么高深的 Rails 技术，只需要你有一颗乐于分享的心，再加上 Rails 一些基本知识即可，所以快来&lt;a href="https://jinshuju.net/f/Q8XpAG" rel="nofollow" target="_blank" title=""&gt;报名&lt;/a&gt;吧！欢迎参加 10 月 19 日下午的&lt;a href="http://weibo.com/rubyists" rel="nofollow" target="_blank" title=""&gt;西安 Rubyist&lt;/a&gt;活动，我们可以碰面聊一聊，过一下教练所需要做的一些事。&lt;/p&gt;

&lt;p&gt;活动提供了详细的教练手册，只需要和学员们一起 Pair 完成当天的 Work Shop，更多的是需要和学员们的沟通和交流，让她们了解到 Web 开发真的就是这么简单，Ruby/Rails 真的是如此有趣，鼓励她们走进技术领域和社区。&lt;/p&gt;

&lt;p&gt;PS：据说没有福利的活动不是好活动，我们为教练准备了一些小礼物，小惊喜。&lt;/p&gt;
&lt;h3 id="学员"&gt;学员&lt;/h3&gt;
&lt;p&gt;欢迎女学生、女性开发者、女性 IT 管理者、女性创业者以及拥有好奇心和时间的女性来&lt;a href="https://jinshuju.net/f/Q8XpAG" rel="nofollow" target="_blank" title=""&gt;报名&lt;/a&gt;参与。如果你是这样的人，点击报名吧；如果你身边有这样的人，推荐她们来参加吧。因为第一次活动，我们希望参加的是女生，但如果你是男生也想参加的话，那么至少带上一个女伴吧。&lt;/p&gt;
&lt;h3 id="Rails Girls 理念"&gt;Rails Girls 理念&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;让你自己的个性焕发光彩，时刻不忘统观全局。在解释、重复一个知识点的时候要把它放到大环境中去，而不是游离其外，从而使听众失去兴趣或不知所云 &lt;/li&gt;
&lt;li&gt;互联网是由人创建的，它不会因为您的把玩而崩溃。我们要不断地提醒听众网站的人性一面：鼓励教练们讨论开源社区、自己的程序员偶像和激励自己的故事。 &lt;/li&gt;
&lt;li&gt;复制粘贴是王道。编程本身并不是整个工作的核心，好比我们不可能在一天之内学会汉语，我们也无法在一天之内学会所有编程中用到的语法和表达式。活动的宗旨就是向学员授之以渔。 &lt;/li&gt;
&lt;li&gt;这个小世界是围着女孩们旋转的！但是大龄女青年、家庭主妇甚至男生们都是可以参加的。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rails Girls 里的”Girls”不仅限于字面上的“女孩”，而是指一种年轻上进的心理状态。两名发起人都是听着辣妹 (Spice Girls) 的歌长大的，他们从不觉得“女孩”这个词只是指可爱的小女生，或隐含着任何负面的意义。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 09 Oct 2013 09:57:42 +0800</pubDate>
      <link>https://ruby-china.org/topics/14603</link>
      <guid>https://ruby-china.org/topics/14603</guid>
    </item>
    <item>
      <title>9 月 下旬会到厦门远程工作一段时间，有没有厦门的 Rubyists 圈子呢？</title>
      <description>&lt;p&gt;经得老大的同意，9 月 22 日～9 月 30 日我可以到厦门远程工作一段时间。
想知道，厦门有没有火热的 IT 圈子？有没有 Rubyists 社区？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Tue, 10 Sep 2013 21:28:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/14018</link>
      <guid>https://ruby-china.org/topics/14018</guid>
    </item>
    <item>
      <title>在 Turbolinks 下，window.onbeforeunload 如何来触发呢？</title>
      <description>&lt;p&gt;相信有很多的人使用 window.onbeforeunload 在用户切换或者关闭页面时，给用户提示说“有未保存的修改，是否确定要离开该页面”。但是在 Turbolinks 开启的状态下，页面的切换时无法触发该事件，除非添加“data-no-turbolink”，在这种情况下，应该如何处理呢？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 03 Jul 2013 16:24:17 +0800</pubDate>
      <link>https://ruby-china.org/topics/12211</link>
      <guid>https://ruby-china.org/topics/12211</guid>
    </item>
    <item>
      <title>newrelic 首页背景图片中的妹子是谁？</title>
      <description>&lt;p&gt;感觉是一个亚裔，会不会是中国人呢？
&lt;img src="//l.ruby-china.com/photo/8b3db25dfdeec6f35e39f47c5d86164a.jpg" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Thu, 27 Jun 2013 20:28:14 +0800</pubDate>
      <link>https://ruby-china.org/topics/12049</link>
      <guid>https://ruby-china.org/topics/12049</guid>
    </item>
    <item>
      <title>Rails 4.0.0 正式发布了</title>
      <description>&lt;p&gt;&lt;a href="http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/" rel="nofollow" target="_blank"&gt;http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/&lt;/a&gt;
&lt;a href="http://rubygems.org/gems/rails" rel="nofollow" target="_blank"&gt;http://rubygems.org/gems/rails&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;如果你想升级，请注意查看下面的帖子
&lt;a href="http://ruby-china.org/topics/12020" rel="nofollow" target="_blank"&gt;http://ruby-china.org/topics/12020&lt;/a&gt;&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Tue, 25 Jun 2013 22:40:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/11989</link>
      <guid>https://ruby-china.org/topics/11989</guid>
    </item>
    <item>
      <title>当你无聊的时候，可以多看看 git explore</title>
      <description>&lt;p&gt;它会列出最近比较火的代码库，你会发现好多有意思的东西。
比如今天 shopify 推出的 dashing，一个能做出非常漂亮 dash board 的基于 sinatra 的开源框架，值得学习一下， &lt;a href="https://github.com/Shopify/dashing" rel="nofollow" target="_blank"&gt;https://github.com/Shopify/dashing&lt;/a&gt; 。
&lt;img src="//l.ruby-china.com/photo/53485b46936e8de26e1d4e61b5cdab2c.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;与其无所事事的刷着微博，不如多看看别人在做的东西，很有收获的。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 21 Jun 2013 21:17:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/11889</link>
      <guid>https://ruby-china.org/topics/11889</guid>
    </item>
    <item>
      <title>周末，你一般如何度过？</title>
      <description>&lt;p&gt;宅？电影？写代码？逛街？聚会？睡觉？
有时候会不会觉得生活状态很不健康？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 21 Jun 2013 20:47:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/11888</link>
      <guid>https://ruby-china.org/topics/11888</guid>
    </item>
    <item>
      <title>500 页面，应该如何设计？</title>
      <description>&lt;p&gt;网上有诸多的 404 页面的设计，但是如果不小心发生了 500 错误，这个页面，你们一般是如何设计的？或者以什么样的语气或方式来传达给用户，服务器出问题了？&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 19 Jun 2013 11:58:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/11827</link>
      <guid>https://ruby-china.org/topics/11827</guid>
    </item>
    <item>
      <title>什么影响阅读？</title>
      <description>&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/8f55e27b5a5f319c30aa796d0399e361.jpg" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 14 Jun 2013 18:17:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/11730</link>
      <guid>https://ruby-china.org/topics/11730</guid>
    </item>
    <item>
      <title>Google Reader 之后，现在，大家一般用啥工具来订阅 RSS？</title>
      <description>&lt;p&gt;目前还未找到合适的工具，求推荐。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Fri, 14 Jun 2013 13:34:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/11717</link>
      <guid>https://ruby-china.org/topics/11717</guid>
    </item>
    <item>
      <title>貌似 github 又 down 了</title>
      <description>&lt;p&gt;我在西安，打不开。。。。&lt;/p&gt;</description>
      <author>iamroody</author>
      <pubDate>Wed, 12 Jun 2013 09:44:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/11663</link>
      <guid>https://ruby-china.org/topics/11663</guid>
    </item>
  </channel>
</rss>
