Jupiter
Jupiter copied to clipboard
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Hey there! I belong to an open source security research community, and a member (@siebene) has found an issue, but doesn’t know the best way to disclose it. If not...
1. RegistryService 这个接口有点冗余, 职责不单一了, 并且其抽象层实现会导致 client 启动一个订阅者也浪费一个线程持续阻塞在服务发布队列上, 这样是否会导致资源的浪费?  2. 服务发布操作 AbstractRegistryService#doPublish0()启动了一个线程池去进行发布; 其实这个操作可以延迟到 server.start() 去做; 这里我认为存在一个风险: 如果服务publish了,但是服务本身没有起来, ( _因为我并没有看到有 registerServer连接到 server 的代码, 意味着服务可用性无法通过 RPC连接来检查, 只有一个 RegisterService 来检查_) 那这时候可能就会导致...
个人提出一个在学习 Jupiter 过程中的疑惑 我看到代码中 DefaultClient#watchConnection(Directory ) 这个方法实现内匿名实现了一个 JConnector.ConnectionWatcher; 其中重写的start() 方法用到了一些同步机制让我感到不解: 1. 为何需要通过这样的线程唤醒来做同步? 2. 是为了应对什么样的场景呢? 以下是我的个人的一些猜测: 1. 为了应对一个远程地址同时发布两个服务? 2. 为了应对远程服务出现了 register -> deregister -> register 这样的操作?  如果有阅读过代码或者对分布式服务注册发现熟练的大佬能帮忙解惑, 那将感激不尽了
- [Jupiter源码解析:服务](http://www.code-sea.com/?p=486) - [Jupiter源码解析(二):客户端远程调用](http://www.code-sea.com/?p=510) - [一起学RPC(零)](https://www.jianshu.com/p/2df868381b9a) - [一起学Netty(十四)之 Netty生产级的心跳和重连机制](https://blog.csdn.net/linuu/article/details/51509847)
### Your question DefaultRegistryServer#handlePublish(...)方法中提到putIfAbsent和config.newVersion()需要是原子操作, 所以需要加锁。按照我的理解,if (config.getConfig().putIfAbsent(meta.getAddress(), meta) == null) 这一步已经是原子操作了,相应地保证了 config.newVersion() 不会被执行多次,是不是这里不需要加锁呢? ### Your scenes Describe your use scenes (why need this feature) ### Your advice Describe the advice or...
### Your question demo项目中如果在启动时将service.Init()放置在model.Init()代码之前,则启动时不会报错,但是调用gorm时则会抛出异常 ### Your scenes 应用能否正确初始化不应该依赖于代码位置 ### Your advice 在Repository工厂方法中加入gorm的空值判断用于提示开发者 func NewMysqlImpl(gh *gorm.DB) sys_user.Repository { if nil == gh { panic("model Init need before service Init") } return...
Jupiter 目前技术架构,只能运行在JAVA技术栈上。 在我接触的场景中,一个 SOA 架构的系统内,会存在多种语言栈的微服务系统,比如 node go php 等。 Jupiter 通过提供 **RestApi** 来对接其他语言,使用 http(s) 协议解决 协议的问题,提供标准 RestApi 定义为其他语言客户端提供便利。 参考 [https://dangdangdotcom.github.io/dubbox/rest.html](https://dangdangdotcom.github.io/dubbox/rest.html) [https://github.com/brpc/brpc/blob/master/docs/cn/http_client.md](https://github.com/brpc/brpc/blob/master/docs/cn/http_client.md)
## TODO LIST: - [x] 不再支持 java7,仅支持 java8 及以上版本,需要支持 java11 - [x] 移除 AbstractFuture,直接使用 java8 的CompletableFuture - [x] ReadWriteLock -> StampedLock - [x] InvokeType.AUTO #82 - [ ] Pipeline invoke...