Skip to content

Commit

Permalink
Detach rey to rey-spring-boot-starter (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Mar 24, 2022
1 parent c7623f8 commit 5418622
Show file tree
Hide file tree
Showing 23 changed files with 11 additions and 1,069 deletions.
30 changes: 1 addition & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
@EnableDistributionLock @Lock or
{ DistributionLock.by(key).lock(task) }
rey
@EnableReySupport and { private ReyTemplate reyTemplate }
@EnableReyClient @ReyClient
@EnableFallback @Fallback
x7-spring-boot-starter
Expand All @@ -34,28 +29,5 @@
1. A method, coded with io.xream/reliable or seata, maybe we can not use:
@Lock or
{ DistributionLock.by(key).lock(task) }
2. If deploy many copies of a set of microservices, how to route to the service?
public class FooRouter implements GroupRouter{
public String replaceHolder(){
return "#xxx#";
}
public String replaceValue(Object obj) {
// See the demo: CatServiceGroupRouterForK8S.java
// Anyway, coding to ensure all the data only in the dbs connected by the target services
// each set of services connect diffent db and cache, one set include: storage, db, cache,
// and your program
// all in docker, all in k8s, set/k8s namespace
}
}
@ReyClient(value = "http://${service.demo}/xxx", groupRouter = FooRouter.class)
config:
# when write/read db, sharding db can't support more TPS
# we set the k8s namespace: prod_0, prod_1, prod_2 ....
# k8s ingress to front service(no connection to DB), front service call service-demo
# by this way, one set of services' TPS is 10000, deploy 10 sets, TPS become almost 100000
service.demo=service-demo.prod#xxx#

24 changes: 7 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.15.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
Expand Down Expand Up @@ -162,17 +157,12 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.xream.internal-util</groupId>
<artifactId>internal-util</artifactId>
<version>1.0.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.xream.internal-util</groupId>-->
<!-- <artifactId>internal-util</artifactId>-->
<!-- <version>1.0.0</version>-->
<!-- </dependency>-->

<dependency>
<groupId>io.xream.rey</groupId>
<artifactId>rey</artifactId>
<version>1.0.0</version>
</dependency>

</dependencies>

Expand Down Expand Up @@ -223,7 +213,7 @@
</execution>
</executions>
</plugin>

<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -238,7 +228,7 @@
</execution>
</executions>
</plugin>

-->
</plugins>
<resources>
<resource>
Expand Down
31 changes: 0 additions & 31 deletions x7-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,6 @@
<version>3.0.0</version>
</dependency>


<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-jaeger-starter</artifactId>
<version>3.3.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-web-starter</artifactId>
<version>4.1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.15.0</version>
</dependency>

</dependencies>

</project>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Map;


public class L2CacheStarter implements ImportBeanDefinitionRegistrar {
class L2CacheStarter implements ImportBeanDefinitionRegistrar {

@Override
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry beanDefinitionRegistry) {
Expand Down
Loading

0 comments on commit 5418622

Please sign in to comment.