9 anti-patterns for teams moving to node.js. Learn from the experience we've had in adopting node.js at PayPal.Read less
ソフトウェアを正しく理解する唯一の方法はコードを読むことです。 ドキュメントを読めばそのソフトウェアが何を実装しているか分かりますが、どのように実装されているかまでは分かりません。 開発中に何らかのトラブルに悩まされたときや、効率的なコーディングをしたいと思ったとき、下位レイヤのソフトウェアを理解しておけば素早く対処できるシーンが多くあります。 ただ、コードを読むことは簡単なタスクではありません。 現代的なソフトウェアはそれなりの規模のコードを含んでいることがほとんどです。アーキテクチャ間の差異を吸収するためのコードなど、本質的な機能を理解する上ではあまり重要ではないコードも含まれています。 何らかの問題が発生してからコードを読もうと思っても、準備なしでは関連する箇所を探すだけでかなりの労力が必要な作業となります。 従って、普段からコードを読んでおくことが重要です。 また、コードを読むにあ
Node.js is reaching more people than ever, it's attracting new and interesting use cases, at the same time as seeing heavy adoption from traditional engineering departments. Managing the project to make sure it continues to satisfy the needs of its end users requires a higher level of precision and diligence. It requires taking the time to communicate and reach out to new and old parties alike. It
Why ZeroMQ? ZeroMQ (also known as ØMQ, 0MQ, or zmq) looks like an embeddable networking library but acts like a concurrency framework. It gives you sockets that carry atomic messages across various transports like in-process, inter-process, TCP, and multicast. You can connect sockets N-to-N with patterns like fan-out, pub-sub, task distribution, and request-reply. It's fast enough to be the fabric
Node.js v0.6 の新機能として cluster モジュール が導入されました.cluster モジュールは,HTTP を含めた TCP 接続を複数の子プロセス (ワーカプロセス) で処理することにより,特にマルチコア環境でのスループット (リクエスト/秒) を向上するための機能です. しかし,ドキュメントにはその使い方が書かれているだけで,どのように実現されているかは書かれていないので,ここで簡単に紹介しておきます. Node.js のクラスタ機能は v0.5.10 で突然コマンドラインオプションとして導入されましたが,直後の「東京 Node 学園祭 2011」が行われた頃にはコマンドラインオプションは廃止されて cluster モジュールによって API が提供されるようになり,その翌週の v0.6.0 リリース数時間前にはその API が変更されるというドタバタぶりでした
Node.jsで、TwitterのAPIを叩こうと思ったら、結構苦労した。 まだ、納得できる解決策にたどり着いていない。 環境 node v0.10.24 2014年1月31日 Twitter API v1.1とは 2013年6月末に、Twitter APIがv1.0からv1.1に変更された。 Node.jsのTwitterモジュールはいくつかあるんだけど、ソースコードを見ると、いくつかのメソッド(あるいは大部分)がv1.1に未対応だったりして、完全にv1.1に対応しているモジュールを探すのに苦労している。 今回実験したのは、ntwitterとnode-twitterの2つのモジュールが中心だが、どちらもv1.1に完全には対応していない様子。他のモジュールも、ソースコードを見る限り、怪しいか対して便利じゃない。 たどり着いた暫定的な方法 まず結論。 Streaming APIを使う分には、
WebブラウザからJavascriptでmbedを制御できる次世代フィジカルコンピューティングソフトウェア(?)エェェェェンベッドJS (mbedJS)をリリースしました。*1 これは何? エェェェェンベッドJSは、mbed単体で稼働するネットワークフィジカルコンピューティングの用のWebサービスソフトウェアです。 HTMLとJavaScriptでHTMLを書く知識があれば、特に新しいことを覚えなくてもフィジカルコンピューティングを始めることができます。 mbedをネットワーク経由でリモート制御するためのファームウェア、及びJavascriptAPIで構成されています。Websocket上のJSON RPC 2.0を用いた高速なRPCと、mbedSDKライクなJavascriptAPIが特徴です。 例えば、よくあるLチカプログラムは次のようなJavascriptで書くことができます
Node.js + Express (Connect) でセッション管理を行うとデフォルトではメモリ上での管理になるため node が落ちるとセッションデータが消えることになりセッションの永続化ができません。そこで Node.js (JavaScript) と相性のいいNoSQLデータベースのオープンソース実装であるMongoDBでセッション管理を行います。MongoDB で Node.js + Express (Connect) のセッション管理を行うために connect-mongo パッケージを使用します。 今回使用する MongoDB では connect-mongo を使用しますが、Amazon DynamoDB で connect-dynamodb 使用するなど、他にもいくつかの選択肢が存在します。 検証した環境は Node.js 0.8.12 Express 3.0.0rc5
Captcha security check ectjs.com is for sale Please prove you're not a robot View Price Processing
サーバサイド(特にNode.js)とクライアントサイド両方で動かしたいものは最近はこんな感じで書いている。 CommonJSのwiki見ててそこに紹介されてるソースコードで(どれだったか忘れたけど。。)やってたのを見ていいなーと思って真似っこした。 (function(define) { define([], function() { 'use strict'; /** * @constructor */ var SomeClass = function() { // initialize }; /** * @type {string} * @private */ SomeClass.prototype.hoge_ = 'hoge'; /** * @return {string} */ SomeClass.prototype.getHoge = function() { return th
渋日記@shibu.jp 渋川よしきの日記です。ソフトウェア開発とか、ライフハックを中心に記事を書いていきます。 メモリリーク。一言でプログラマを死に追いやる恐怖の言葉。C/C++の世界ではmallocしたのにfreeしないとかのケアレスミスでよく起きていた問題です。その後、ガベージコレクタが掃除してくれるプログラミング言語が増え、一部の言語で循環参照に気をつけるぐらいであまり気にしなくても良い的な風潮になっています。 というものの、そうとも言ってられなくない状況も増えてきています。クラウドのスケールアウトブームも一段落というかコモディティ化し、go言語で再び性能向上方面に関心が寄せられたり、日本でErlangの勉強会が満席になったり、スケールアウトから再びスケールアップ方面に話題が移りつつあるのを感じます。長時間稼働のサーバで、スケールアップしてさらに数多くのリクエストを大量に受けるよう
One of the great things about Node.js is that it has a built in HTTP server. This means you don't need Apache or nginx. This means serving a static site can be done in few lines of code. This article goes into how this can be achieved. Express Static Middleware Express has become the defacto Node.js web framework and it has great built in capabilities to serve static content. The nice thing is tha
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く