websocketに対応していないロードバランサを使うといくつか問題が起きる
- upgradeヘッダを捨ててしまい接続できない(L7スイッチなど)
- ポート番号枯渇により新規接続ができなくなる
- タイムアウトの設定が短いと定期的に切断されてしまう
| var createBulkInsertBuilder = function(tbl, keys, count){ | |
| var f = function(keys, count){ | |
| var w = []; | |
| for(var i = 0; i<count; ++i){ | |
| w.push('(' + keys.map(function(v){ return '?'}).join(',') + ')') | |
| } | |
| return w; | |
| } | |
| var q = [ | |
| 'INSERT INTO', |
| var vpass = require('./vpass'); | |
| var auth = { | |
| userid:process.env['ID'], | |
| password:process.env['PASS'], | |
| strURL:'https%3A%2F%2Fwww%2Esmbc-card%2Ecom%2Fmem%2Fvps%2Findex%2Ejsp', | |
| }; | |
| var v = new vpass(); | |
| v.doLogin(auth). | |
| then(v.thenDownload()). | |
| then(v.thenPoint()). |
| var mysql = require("mysql"); | |
| var Promise = require("bluebird"); | |
| Promise.promisifyAll(mysql); | |
| Promise.promisifyAll(require("mysql/lib/Connection").prototype); | |
| Promise.promisifyAll(require("mysql/lib/Pool").prototype); | |
| var getConnection = exports.getConnection = function() { | |
| return pool.getConnectionAsync().disposer(function(connection) { | |
| try { | |
| connection.release(); |
| http://www.chriscalender.com/iops-innodb_io_capacity-and-the-innodb-plugin/ | |
| 15k rpm: 180-210 IOPS | |
| 10k rpm: 130-150 IOPS | |
| 7200 rpm: 80-100 IOPS | |
| 5400 rpm: 50-80 IOPS | |
| http://www.atmarkit.co.jp/fnetwork/tokusyuu/66ssd01/01.html | |
| 7.2K SATA/SAS 100~125 IOPS | |
| 15K SATA/SAS 200~300 IOPS |
メモリリークは起きない
var hoge = function(){
var x = 0;
return function(){
return x++;
}
}
var h = hoge();
console.log(h());
| # mono2.10と古くてもいいなら | |
| rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| yum -y install mono-* mod_mono-* monodoc-* monotools-* | |
| var addtioalTask(pipeline){ | |
| pipeline.push(function(p){ return p.then(function(v){console.log(v);return v}) }); | |
| } | |
| var pipeline = []; | |
| addtionalTask(pipeline); | |
| pipeline.push(function(p){ return p.then(function(v){return v}) }); | |
| pipeline.reduce(function(p, f){ return f(p) }, promiseAync()); |
| 名前 | 要約 | ライセンス | URL |
|---|---|---|---|
| flatbuffers | IDLを用いたオブジェクトシリアライザ | Apache2 | https://github.com/google/flatbuffers |
| thrift | IDLを用いたRPCフレームワーク | Apache2 | https://thrift.apache.org/ |
| RakNet | ネットワークエンジン | 修正BSD | https://github.com/OculusVR/RakNet |
| bullet | OpenCLなどのGPUが使える物理エンジン | ZLib | https://github.com/bulletphysics/bullet3 |
| recastnavigation | ナビゲーションメッシュ作成に使えるエディター | ZLib | https://github.com/memononen/recastnavigation |