1.server端 支持数学运算的服务器,服务器的返回结果用json对象表示. math-server.js //通过监听3000端口使其作为Math Wizard的后台程序 var math = require('../nodejsExample3/math.js'); var express = require('express'); var app = express(); app.configure(function(){ app.use(app.router); //默认的错误处理函数
http://yanbohappy.sinaapp.com/?p=110 最新版本的Hadoop代码中已经默认了Protocol buffer(以下简称PB,http://code.google.com/p/protobuf/)作为RPC的默认实现,原来的WritableRpcEngine已经被淘汰了.来自cloudera的Aaron T. Myers在邮件中这样说的"since PB can provide support for evolving protocols in a compati
原文地址:http://yanbohappy.sinaapp.com/?p=110 最新版本的Hadoop代码中已经默认了Protocol buffer(以下简称PB,http://code.google.com/p/protobuf/)作为RPC的默认实现,原来的WritableRpcEngine已经被淘汰了.来自cloudera的Aaron T. Myers在邮件中这样说的“since PB can provide support for evolving protocols in a co
本文基于Nett4.0.26.Final版本浅析Client与Server端通讯,先看服务器端: public class Server { public static void run(int port) { /**Netty创建ServerSocketChannel,默认SelectionKey.OP_ACCEPT*/ EventLoopGroup boss = new NioEventLoopGroup(); EventLoopGroup worker = new NioEventLoop