Skip to content

Commit

Permalink
添加测试缓存实现,以及注册发现实现,在不安装redis,zk的情况下也能进行源码测试
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Dec 29, 2016
1 parent 015c59e commit 39ffe38
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 33 deletions.
30 changes: 16 additions & 14 deletions Changelog.md
Expand Up @@ -4,20 +4,22 @@
2. 增加websocket接入层,和原接入层共享线程资源,增加websocket js client
3. 抽象出cache层,不再直接依赖redis模块,支持自定义缓存实现
4. 抽象出服务注册与发现层,不再直接依赖Zookeeper模块, 支持自定义服务注册发现
5. 推送中心模块重构,支持不同的消息来源,支持自定义消息来源,编写从MQ订阅消息demo
6. Gateway Client代码重构,支持多线程,多连接数配置
7. 线程池优化,重新设计各模块线程配置方式,EventBus使用动态线程池,增加Netty线程池监控
8. PushClient任务超时代码优化, 优化Timer任务线程池,在任务取消后直接从队列里删除
9. PushSender同步调用直接返回PushResult不再兼容老的返回Boolean类型
10. 修改TimeLine多线程bug,优化PushRequest多线程下代码
11. 修复ID_SEQ在高并发下重复的问题,不再使用LongAdder
12. 代码优化,内存优化,修复推送超时问题
13. 增加推送压测代码,增加推送统计及流控QPS监控等
14. 增加tcp/udp 发送接收缓冲区配置
15. 增netty write-buffer-water-mark配置
16. 代码优化, 内存优化,及时释放无用的对象
17. 流控调优,默认关闭流量整形
18. 增加jmx监控统计, 脚本加入JMX设置,jvm设置
5. 添加测试用的默认缓存实现以及注册发现实现,在不安装redis,zk的情况下也能进行源码测试
6. 推送中心模块重构,支持不同的消息来源,支持自定义消息来源,编写从MQ订阅消息demo
7. Gateway Client代码重构,支持多线程,多连接数配置
8. 线程池优化,重新设计各模块线程配置方式,EventBus使用动态线程池,增加Netty线程池监控
9. PushClient任务超时代码优化, 优化Timer任务线程池,在任务取消后直接从队列里删除
10. PushSender同步调用直接返回PushResult不再兼容老的返回Boolean类型
11. 修改TimeLine多线程bug,优化PushRequest多线程下代码
12. 修复ID_SEQ在高并发下重复的问题,不再使用LongAdder
13. 代码优化,内存优化,修复推送超时问题
14. 增加推送压测代码,增加推送统计及流控QPS监控等
15. 增加tcp/udp 发送接收缓冲区配置
16. 增netty write-buffer-water-mark配置
17. 代码优化, 内存优化,及时释放无用的对象
18. 流控调优,默认关闭流量整形
19. 增加jmx监控统计, 脚本加入JMX设置,jvm设置
20. 其他bug fix及代码优化



Expand Down
Expand Up @@ -29,7 +29,7 @@
* @author ohun@live.cn (夜色)
*/
@Spi(order = 2)
public final class FileCacheMangerFactory implements CacheManagerFactory {
public final class SimpleCacheMangerFactory implements CacheManagerFactory {
@Override
public CacheManager get() {
return FileCacheManger.I;
Expand Down
Expand Up @@ -29,7 +29,7 @@
* @author ohun@live.cn (夜色)
*/
@Spi(order = 2)
public final class FileDiscoveryFactory implements ServiceDiscoveryFactory {
public final class SimpleDiscoveryFactory implements ServiceDiscoveryFactory {
@Override
public ServiceDiscovery get() {
return FileSrd.I;
Expand Down
Expand Up @@ -29,19 +29,21 @@
* @author ohun@live.cn (夜色)
*/
@Spi(order = 2)
public final class TestMQClientFactory implements com.mpush.api.spi.common.MQClientFactory {
@Override
public MQClient get() {
return new MQClient() {
@Override
public void subscribe(String topic, MQMessageReceiver receiver) {

}
public final class SimpleMQClientFactory implements com.mpush.api.spi.common.MQClientFactory {
private MQClient mqClient = new MQClient() {
@Override
public void subscribe(String topic, MQMessageReceiver receiver) {
System.err.println("subscribe " + topic);
}

@Override
public void publish(String topic, Object message) {
@Override
public void publish(String topic, Object message) {
System.err.println("publish " + topic + " " + message);
}
};

}
};
@Override
public MQClient get() {
return mqClient;
}
}
Expand Up @@ -29,7 +29,7 @@
* @author ohun@live.cn (夜色)
*/
@Spi(order = 2)
public final class FileRegistryFactory implements ServiceRegistryFactory {
public final class SimpleRegistryFactory implements ServiceRegistryFactory {
@Override
public ServiceRegistry get() {
return FileSrd.I;
Expand Down
@@ -1 +1 @@
com.mpush.test.spi.FileCacheMangerFactory
com.mpush.test.spi.SimpleCacheMangerFactory
@@ -1 +1 @@
com.mpush.test.spi.TestMQClientFactory
com.mpush.test.spi.SimpleMQClientFactory
@@ -1 +1 @@
com.mpush.test.spi.FileDiscoveryFactory
com.mpush.test.spi.SimpleDiscoveryFactory
@@ -1 +1 @@
com.mpush.test.spi.FileRegistryFactory
com.mpush.test.spi.SimpleRegistryFactory

0 comments on commit 39ffe38

Please sign in to comment.