首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

playframe 处置高并发请求

2012-10-29 
playframe 处理高并发请求http://www.playframework.org/documentation/1.2.1/asynchronous 参考此例子进

playframe 处理高并发请求

http://www.playframework.org/documentation/1.2.1/asynchronous

参考此例子进行优化

?http://www.playframework.org/documentation/1.2.1/jobs

具某同事说,本来并发200就崩溃的 项目(输出到tomcat),使用了以上配置,居然上到接近1000?

下面是部分代码:


?public static void updateLiveData(Integer id, String nv, String f) {
??Promise<String> promise = new LiveResponse(id, nv, f).now();
??String response = await(promise);
??renderText(response);
?}
这是controller的方法

public class AnalysisResponse extends Job<String> {
?private String mid;

?public AnalysisResponse(String mid) {
??this.mid = mid;
?}

?@Override
?public String doJobWithResult() throws Exception {}
}

热点排行