Update README.md and assets
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
parent
cda4f7e13b
commit
409d63347c
36
README.md
36
README.md
|
|
@ -11,7 +11,7 @@
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before.
|
As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before.
|
||||||
Sentinel takes "flow" as breakthrough point, and works on multiple fields including **flow control**, **circuit breaking** and **system adaptive protection**, to guarantee service reliability.
|
Sentinel takes "flow" as breakthrough point, and works on multiple fields including **flow control**, **circuit breaking** and **system adaptive protection**, to guarantee reliability of microservices.
|
||||||
|
|
||||||
Sentinel has the following features:
|
Sentinel has the following features:
|
||||||
|
|
||||||
|
|
@ -20,15 +20,23 @@ Sentinel has the following features:
|
||||||
- **Widespread open-source ecosystem**: Sentinel provides out-of-box integrations with commonly-used frameworks and libraries such as Spring Cloud, Dubbo and gRPC. You can easily use Sentinel by simply add the adapter dependency to your services.
|
- **Widespread open-source ecosystem**: Sentinel provides out-of-box integrations with commonly-used frameworks and libraries such as Spring Cloud, Dubbo and gRPC. You can easily use Sentinel by simply add the adapter dependency to your services.
|
||||||
- **Various SPI extensions**: Sentinel provides easy-to-use SPI extension interfaces that allow you to quickly customize your logic, for example, custom rule management, adapting data sources, and so on.
|
- **Various SPI extensions**: Sentinel provides easy-to-use SPI extension interfaces that allow you to quickly customize your logic, for example, custom rule management, adapting data sources, and so on.
|
||||||
|
|
||||||
|
Features overview:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
See the [中文文档](https://github.com/alibaba/Sentinel/wiki/%E4%BB%8B%E7%BB%8D) for Chinese readme.
|
See the [中文文档](https://github.com/alibaba/Sentinel/wiki/%E4%BB%8B%E7%BB%8D) for document in Chinese.
|
||||||
|
|
||||||
See the [Wiki](https://github.com/alibaba/Sentinel/wiki) for full documentation, examples, blog posts, operational details and other information.
|
See the [Wiki](https://github.com/alibaba/Sentinel/wiki) for full documentation, examples, blog posts, operational details and other information.
|
||||||
|
|
||||||
If you are using Sentinel, please [**leave a comment here**](https://github.com/alibaba/Sentinel/issues/18) to tell us your scenario to make Sentinel better.
|
If you are using Sentinel, please [**leave a comment here**](https://github.com/alibaba/Sentinel/issues/18) to tell us your scenario to make Sentinel better.
|
||||||
It's also encouraged to add the link of your blog post, tutorial, demo or customized components to [**Awesome Sentinel**](./doc/awesome-sentinel.md).
|
It's also encouraged to add the link of your blog post, tutorial, demo or customized components to [**Awesome Sentinel**](./doc/awesome-sentinel.md).
|
||||||
|
|
||||||
|
## Ecosystem Landscape
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
Below is a simple demo that guides new users to use Sentinel in just 3 steps. It also shows how to monitor this demo using the dashboard.
|
Below is a simple demo that guides new users to use Sentinel in just 3 steps. It also shows how to monitor this demo using the dashboard.
|
||||||
|
|
@ -37,13 +45,14 @@ Below is a simple demo that guides new users to use Sentinel in just 3 steps. It
|
||||||
|
|
||||||
**Note:** Sentinel requires Java 7 or later.
|
**Note:** Sentinel requires Java 7 or later.
|
||||||
|
|
||||||
If your application is build in maven, just add the following code in pom.xml.
|
If your application is build in Maven, just add the following dependency in `pom.xml`.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
<!-- replace here with the latest version -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.csp</groupId>
|
<groupId>com.alibaba.csp</groupId>
|
||||||
<artifactId>sentinel-core</artifactId>
|
<artifactId>sentinel-core</artifactId>
|
||||||
<version>x.y.z</version>
|
<version>1.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -51,23 +60,16 @@ If not, you can download JAR in [Maven Center Repository](https://mvnrepository.
|
||||||
|
|
||||||
### 2. Define Resource
|
### 2. Define Resource
|
||||||
|
|
||||||
Wrap code snippet via Sentinel API: `SphU.entry("resourceName")` and `entry.exit()`. In below example, it is `System.out.println("hello world");`:
|
Wrap your code snippet via Sentinel API: `SphU.entry(resourceName)`.
|
||||||
|
In below example, it is `System.out.println("hello world");`:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
Entry entry = null;
|
try (Entry entry = SphU.entry("HelloWorld")) {
|
||||||
|
// Your business logic here.
|
||||||
try {
|
|
||||||
entry = SphU.entry("HelloWorld");
|
|
||||||
|
|
||||||
// BIZ logic being protected
|
|
||||||
System.out.println("hello world");
|
System.out.println("hello world");
|
||||||
} catch (BlockException e) {
|
} catch (BlockException e) {
|
||||||
// handle block logic
|
// Handle rejected request.
|
||||||
} finally {
|
e.printStackTrace();
|
||||||
// make sure that the exit() logic is called
|
|
||||||
if (entry != null) {
|
|
||||||
entry.exit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
BIN
doc/image.gif
BIN
doc/image.gif
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 558 KiB |
Loading…
Reference in New Issue