Skip to content

Instantly share code, notes, and snippets.

View ndzj081221130's full-sized avatar

zhangjieinnjucs ndzj081221130

View GitHub Profile
@ndzj081221130
ndzj081221130 / 2014_2_21配置apache和mod_jk
Created February 27, 2014 05:12
2014_2_21配置apache、mod_jk
> Written with [StackEdit](https://stackedit.io/).
[参考日志1][1] :22号早上,看了这篇日志,也没做什么,就可以了?
不对,改了一样,在/ect/apache2/mods-available/jk.conf中
mount app的时候,将**JkMount /* loadbalancer**
@ndzj081221130
ndzj081221130 / 2014_2_19_JBoss集群
Created February 27, 2014 05:12
2014_2_19JBOSS Clustering
> Written with [StackEdit](https://stackedit.io/).
还是去找boss。
看一下CF的支持websocket部分
@ndzj081221130
ndzj081221130 / router均衡负载
Created February 19, 2014 14:54
负载均衡
> Written with [StackEdit](https://stackedit.io/).
----------
查看路由表信息的
@ndzj081221130
ndzj081221130 / 2014_2_17
Created February 18, 2014 12:50
2014_2_17
> Written with [StackEdit](https://stackedit.io/).
任务?先去找老板吧。老板不在,hoho~
看一下warden的资料:
资源隔离:
network(stack per container)
@ndzj081221130
ndzj081221130 / 2014_2_17部署2个dea
Created February 18, 2014 01:28
2014_2_17部署2个dea
> Written with [StackEdit](https://stackedit.io/).
下面开始验证router,确实可以做到负载均衡,就是将一个应用的两个不同的实例,分别部署到2个dea节点上。
首先,一个dea对应于一个warden容器?。
**上层DEA通过warden client来调用warden server提供的api创建并控制container,container可以添加诸多限制,且container之间互相隔离**
dea启动时,会向router去注册自己。
@ndzj081221130
ndzj081221130 / 求N!中0的个数
Created February 17, 2014 10:59
N!中0的个数
> Written with [StackEdit](https://stackedit.io/).
其实就是求质数分解中,5的指数k
N! = 2^i * 3^j * 5^k * ...
变体:N!中二进制表示中最低位1的位置
@ndzj081221130
ndzj081221130 / 求二进制中1的个数
Created February 17, 2014 10:58
求二进制中1的个数
> Written with [StackEdit](https://stackedit.io/).
右移,与0x1比较
除2,比较余数
编程之美p121,解法三
@ndzj081221130
ndzj081221130 / 发帖水王
Created February 17, 2014 10:57
发帖水王
> Written with [StackEdit](https://stackedit.io/).
排序,扫描一遍
排序,N / 2肯定是发帖水王
两两PK,剩下的一定是水王
@ndzj081221130
ndzj081221130 / 2014_2_14
Created February 14, 2014 11:23
2014_2_14_研究tuscany
-
> Written with [StackEdit](https://stackedit.io/).
编译tuscany2.0.1源码,mvn install
生成的jar包,拷贝到可运行版本的具体的目录下。
或者使用一个插件maven-antrun-plugin,自动拷贝到相应的目录下
修改日志等级:INFO改为FINE,再次CF push,看一下更全的日志。
@ndzj081221130
ndzj081221130 / 2014_2_13修改tuscnay
Created February 14, 2014 08:08
2014_2_13_warden
> Written with [StackEdit](https://stackedit.io/).
错误日志dea.log:
droplet.healthy
start instance