spring-io / start.spring.io

https://start.spring.io
Apache License 2.0
2.25k stars 906 forks source link

Add Spring Cloud Alibaba #217

Closed szihai closed 4 years ago

szihai commented 5 years ago

The git repo is at : https://github.com/alibaba/spring-cloud-alibaba currently there are 2169 forks and 7973 stars. We have several active maintainers addressing the issues raised by the community.

Licence

Apache 2.0

Issue Tracker URL

https://github.com/alibaba/spring-cloud-alibaba/issues

Continuous integration

https://circleci.com/gh/alibaba/spring-cloud-alibaba/tree/master

Maven Central

spring-cloud-starter-alibaba-nacos-config

spring-cloud-starter-alibaba-nacos-discovery

spring-cloud-starter-alibaba-sentinel

spring-cloud-starter-dubbo

spring-cloud-starter-alibaba-seata

spring-cloud-starter-stream-rocketmq

spring-cloud-starter-bus-rocketmq

spring-cloud-starter-alicloud-oss

spring-cloud-starter-alicloud-acm

spring-cloud-starter-alicloud-ans

spring-cloud-starter-alicloud-schedulerx

spring-cloud-starter-alicloud-sms

Configuration metadata

via maven dependency spring-boot-configuration-processor and file additional-spring-configuration-metadata.json

Version mappings

version 2.1.0.RELEASE is compatible with the Spring Cloud Greenwich, that is to say,compatible with Spring Boot 2.1.x.

Version 2.0.0.RELEASE is compatible with the Spring Cloud Finchley, that is to say, compatible with Spring Boot 2.0.x.

Version 1.5.0.RELEASE is compatible with the Spring Cloud Edgware, that is to say, compatible with Spring Boot 1.5.x.

Links to additional resources

Sentinel: https://github.com/alibaba/sentinel Nacos: https://github.com/alibaba/nacos Apache RocketMQ: https://github.com/apache/rocketmq Apache Dubbo: https://github.com/apache/dubbo Seata: https://github.com/seata/seata Alibaba Cloud: https://www.alibabacloud.com

snicoll commented 5 years ago

See #47

fangjian0423 commented 5 years ago

@snicoll we are ready!

snicoll commented 5 years ago

First of all, I apologize for the delay in handling this issue.

I had a look to the repo and your proposal and here are some observations on which I'd like some feedback on:

We require submissions like yours to provide a Bill of Materials with only the dependencies that are directly managed by the project. Unfortunately, I don't think spring-cloud-alibaba-dependencies is doing that at the moment. Namely, it has dependency management for Apache projects.

The submission contains 12 starters which I understand as a wish to add 12 entries on start.spring.io. While we usually restrict new projects to a single entry, we understand this is harder for a IaaS use case. Please pick the top 3 starters you'd like to add to the site and we can iterate based on that.

Having a "core" starter (an entry point starter, something that allows you to access the platform) is also interesting as we can use it as a signal when composing dependencies. For instance, when selecting the "Alibaba support" starter and "Spring Cloud Stream" starter we could automatically configure the stream rocketmq binder for it. Not having such starter makes it harder to do this.

Thanks for the update on #47 and your work on Spring Cloud Alibaba.

fangjian0423 commented 5 years ago

@snicoll thanks for your reply.

Spring Cloud Alibaba contains components from both open-source and commercialized Alibaba Cloud products. Open-source components contains Nacos, Sentinel, Apache Dubbo, Apache RocketMQ and Seata. We prefer to pick open-source components firstly.

Spring Cloud Alibaba don't have a "core" starter like spring-cloud-alibaba-starter now. Each open-source component can be used independently. For instance, Nacos Discovery is a new implementation of Spring Cloud Discovery like Consul Discovery. Nacos Config is a new implementation of Spring Cloud Config like Consul Configuration. Sentinel is a new implementation of Spring Cloud Circuit Breaker like Hystrix.

Spring Cloud Alibaba won't join Spring Cloud Release Train, it has been illustrated in https://spring.io/blog/2019/07/24/simplifying-the-spring-cloud-release-train. So i think adding spring-cloud-alibaba-dependencies bom is necessary.

Finally, i have a little confused about the apache projects in spring-cloud-alibaba-dependencies bom, i found io.reactivex: rxjava dependency in spring-cloud-netflix-dependencies bom, it is not directly managed by the spring-cloud-netflix project.

snicoll commented 5 years ago

Thanks for the feedback.

We prefer to pick open-source components firstly

Yes, we're considering open source components here as well.

Spring Cloud Alibaba don't have a "core" starter

A core starter basically means that the auto-configuration of the infrastructure is shared and adding a library to the classpath is a possible alternative to the starter. I find this arrangement quite powerful and have advocated that in the past.

Having said that, it's ok if you don't have one. It means however we won't be able to combine Alibaba with existing entries (such as Spring Cloud Stream). Our policy is to not duplicate concepts, which is why having such an entry is interesting and why I mentioned it.

Spring Cloud Alibaba won't join Spring Cloud Release Train, it has been illustrated in https://spring.io/blog/2019/07/24/simplifying-the-spring-cloud-release-train. So i think adding spring-cloud-alibaba-dependencies bom is necessary.

I am aware of that and, yes, a BOM should be added as part of this request. What I am saying is that the BOM you have does not respect our guidelines as I have indicated above.

i found io.reactivex: rxjava dependency in spring-cloud-netflix-dependencies bom

Thanks for bringing this to our attention. I believe this is a mistake and I have reported that to the Spring Cloud team.

fangjian0423 commented 5 years ago

sorry for the late reply.

A core starter basically means that the auto-configuration of the infrastructure is shared and adding a library to the classpath is a possible alternative to the starter. I find this arrangement quite powerful and have advocated that in the past.

Thanks for the suggestion, we're considering to create a core starter in the future.

For instance, when selecting the "Alibaba support" starter and "Spring Cloud Stream" starter we could automatically configure the stream rocketmq binder for it. Not having such starter makes it harder to do this.

I think it also could automatically configure the stream rocketmq binder by "Spring Cloud Stream" starter & "Spring For Apache RocketMQ" starter, we have RocketMQ Spring Boot Project.

I am aware of that and, yes, a BOM should be added as part of this request. What I am saying is that the BOM you have does not respect our guidelines as I have indicated above.

I have a misunderstand about the direct/specific dependencies. Spring Cloud Alibaba Dubbo need Apache Dubbo dependencies & Spring Cloud Stream RocketMQ Binder need Apache RocketMQ dependencies. I think the apache projects you said are direct/specific dependencies.

Could you please explain in detail why spring-cloud-alibaba-dependencies BOM not match the guidelines? very thanks.

snicoll commented 5 years ago

I understand that you need it (and other Spring Cloud projects as well as other 3rd party entries have the same need) but it's about having an opinion to which version to use. It's not an Alibaba specific project as far as I know so it can't have that opinion.

I am not asking you to break anything in your project, you can move the things you are actually managing to a separate bom and we could use that, e.g. spring-cloud-alibaba-dependencies could inherit from spring-cloud-alibaba-bom and the latter only contains directly managed dependencies as well as Alibaba-specific artifacts.

If you agree, the next step is to focus on the getting started experience (day 1) and figure out what are the best candidates in this list.

fangjian0423 commented 5 years ago

Oh, i have optimized the dependencies. Could you please have a review about it?

If ok, what should we prepare for the next step and what do you mean about the getting started experience? Thanks

snicoll commented 5 years ago

We had a call today to discuss our options and we've decided to focus on Nacos Config , Nacos Discovery and Sentinel.

@fangjian0423 apologizes for the delay, I'll review that PR shortly.

fangjian0423 commented 5 years ago

thank you @snicoll .

I update the apache things you mentioned above.please review it, if any other problem.let me know :)

This is the link for latest BOM and this is the compare with last version.

snicoll commented 5 years ago

@fangjian0423 the latest BOM looks good to me, thank you.

fangjian0423 commented 5 years ago

thanks for the review @snicoll .

Should we release a new version about the BOM modifications before adding these 3 entries? If so, we will do it in next 2 weeks.

snicoll commented 5 years ago

We still need to process the suggested entries. We'll report here when we've made progress or if we have questions.

fangjian0423 commented 5 years ago

hi @snicoll, any updates about the entries?

I list the dependencies to help you to review them conveniently:

Naocs Config Module & Nacos Config Starter

Nacos Discovery Module & Nacos Discovery Starter

Sentinel Module & Sentinel Starter

snicoll commented 5 years ago

Hello @fangjian0423, I don't have an update for this I am afraid. Things are very busy and we haven't had the time to look into more details, sorry.

fangjian0423 commented 5 years ago

I understand you guys are very busy recently.

but because the entries are very important to us, may i know an approximate time about when it will be done? thx so much

snicoll commented 5 years ago

@fangjian0423 I couldn't find a release that is compatible with the upcoming Spring Boot 2.2.x, is there a milestone available somewhere?

snicoll commented 5 years ago

I've created https://github.com/alibaba/spring-cloud-alibaba/issues/994 as the starter definitions are currently invalid.

snicoll commented 5 years ago

@fangjian0423 for each of the 3 entries you've summarized above, we need the following please:

Thanks!

fangjian0423 commented 5 years ago

thanks @snicoll , very happy to see Spring Boot 2.2 has been released.

I couldn't find a release that is compatible with the upcoming Spring Boot 2.2.x, is there a milestone available somewhere?

Master branch compatible with Spring Boot 2.2.x, the version of spring-cloud-build is "2.2.0.BUILD-SNAPSHOT" now.

This is Spring Cloud Alibaba & Spring Cloud & Spring Boot compatibility Table:

Spring Cloud Version Spring Cloud Boot version Spring Cloud Alibaba Version branch name
Spring Cloud Hoxton 2.2.x.RELEASE 2.2.x.RELEASE(not release) master
Spring Cloud Greenwich 2.1.x.RELEASE 2.1.x.RELEASE greenwich
Spring Cloud Finchley 2.0.x.RELEASE 2.0.x.RELEASE finchley
Spring Cloud Edgware 1.5.x.RELEASE 1.5.x.RELEASE 1.x

is there a milestone available somewhere?

I update the milestone, we will release 2.1.1 & 2.0.1 & 1.5.1 soon.

I've created alibaba/spring-cloud-alibaba#994 as the starter definitions are currently invalid.

yes, i have fixed it. All branches fixed. This is the compare with last version.

A short description proposal (that will be displayed on start.spring.io)

Nacos Discovery: Service discovery with Alibaba Nacos

Nacos Configuration: Enable and configure common patterns inside your application and build large distributed systems with Alibaba's Nacos based components. The provided patterns include Service Discovery and Configuration

Sentinel: Flow control and circuit breaking with Alibaba Sentinel

A link to the reference guide, documentation or any other resource that explains the concept in more details

Nacos Discovery: https://spring-cloud-alibaba-group.github.io/github-pages/hoxton/en-us/index.html#_spring_cloud_alibaba_nacos_discovery

Nacos Configuration: https://spring-cloud-alibaba-group.github.io/github-pages/hoxton/en-us/index.html#_spring_cloud_alibaba_nacos_config

Sentinel: https://spring-cloud-alibaba-group.github.io/github-pages/hoxton/en-us/index.html#_spring_cloud_alibaba_sentinel

A link to sample (ideally on the form of a small app similar as what would have been generated by start.spring.io with additional code that showcases how to use the feature).

Nacos Discovery: https://github.com/alibaba/spring-cloud-alibaba/tree/master/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/nacos-discovery-provider-example

Nacos Configuration: https://github.com/alibaba/spring-cloud-alibaba/tree/master/spring-cloud-alibaba-examples/nacos-example/nacos-config-example

Sentinel: https://github.com/alibaba/spring-cloud-alibaba/tree/master/spring-cloud-alibaba-examples/sentinel-example/sentinel-core-example

snicoll commented 5 years ago

the version of spring-cloud-build is "2.2.0.BUILD-SNAPSHOT" now.

There are several milestones of Hoxton as well for spring-cloud-build. There is a 2.2.0.M6 milestone available. The reason why I am mentioning this is that adding the support for Alibaba right now means it will be disabled by default (as Spring Boot 2.2 is the default).

Have you considered publishing milestones on your side as well? I would not advise to use Maven Central as those bits would rely on content from another repo which is not really recommended. It is by no way a blocker, but I wanted you to be aware of it.

I update the milestone, we will release 2.1.1 & 2.0.1 & 1.5.1 soon.

There's no rush for those. What I am interested in is a milestone we can use with Spring Boot 2.2

Thank you very much for the link to the documentation and the samples, this is really good stuff!

fangjian0423 commented 5 years ago

Have you considered publishing milestones on your side as well?

Thanks for your suggestion. After the discussion of team, we won't publish milestones.

Spring Cloud Alibaba will release 2.2.0.RELEASE after Spring Cloud Hoxton release(it will release in Nov 07) ASAP.

ghost commented 4 years ago

expectation

snicoll commented 4 years ago

@Xanthuim if I understood the question correctly, we're stuck as we'd need a GA release that works against our GA and a clarification of how things are going to be handled moving forward with regards to milestones. We're in touch with the Alibaba team. I've added an additional status to make that more clear.