当前位置:网站首页>Cluster method synchronous execution framework suona
Cluster method synchronous execution framework suona
2022-07-01 02:25:00 【Cocowwy dot cn】
Suona
Suona A decentralized cluster method synchronous execution framework
Git Address : Poke me
explain
Project reference XXL-job Source code , as well as SpingCloud Service registration for , Realize the method of waking up the rest of the cluster nodes when the single node method is called , To achieve decentralized broadcasting effect
scene
The situation a : Like in use caffine/ hashMap As the memory cache of the service node , There are drawbacks to this , Because in the cluster , If cache cleanup is required , Cache cleaning is required for each node
Scenario two : Similar to scenario 1 , Each node of the cluster that needs this service executes a certain method
If you need to solve this kind of solution , should MQ Wait for middleware to realize broadcast operation , So if the middleware hangs , Or what if you don't want to bother to rely on external components ?
that , You can try to use @Suona, It aims to enable developers to call methods on a single node , Trigger the synchronization of other nodes to call , To simulate the operation of broadcasting , And developers Just use an annotation to mark this method , It can be used immediately after unpacking
Usage mode
You just need to use it like this :
@Service
public class ServiceA {
@Suona
public void sayA() {
// do sth.
}
}
such , When the method of any node in the cluster is called , Other nodes will also call at the same time
Usage environment
| TECHNOLOGY | ENV |
|---|---|
| JDK | 1.8+ |
| SpringCloud | discovery |
Be careful
If you use the permission framework or customize web The interceptor needs attention :
because Suona The trunking communication adopts embedded web interfaces , Therefore, it is necessary to web Request release : /suona/call
Stable version
<dependency>
<groupId>cn.cocowwy</groupId>
<artifactId>suona</artifactId>
<version>1.0.0</version>
</dependency>
See the following for snapshot version , Release the latest code
<dependency>
<groupId>cn.cocowwy</groupId>
<artifactId>suona</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<repositories>
<repository>
<id>snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
边栏推荐
- [punch in questions] integrated daily 5 questions sharing (phase I)
- Template: globally balanced binary tree
- Windows quick add boot entry
- Int and bit group turn to each other
- Ernie-gram, 显式、完备的 n-gram 掩码语言模型,实现了显式的 n-gram 语义单元知识建模。
- 零基础自学SQL课程 | 窗口函数
- centos 安装多个版本的php并切换
- 如何学习和阅读代码
- Clickhouse 消除由group by产生的间隙
- 機器學習10-信念貝葉斯分類器
猜你喜欢
![SQL语句关联表 如何添加关联表的条件 [需要null值或不需要null值]](/img/91/0efbc13597be4dba5b9cf4e8644e35.png)
SQL语句关联表 如何添加关联表的条件 [需要null值或不需要null值]

FL studio20.9 fruit software advanced Chinese edition electronic music arrangement

Find the length of the common part of two line segments

计算特殊奖金

How to maintain efficient collaboration in remote office and achieve stable growth of projects | community essay solicitation

(summary I) Halcon Foundation's target finding features + becoming a regular

最新微信ipad协议 CODE获取 公众号授权等

SWT/ANR问题--StorageManagerService卡住

Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"

修复表中的名字(首字符大写,其他小写)
随机推荐
如何在智汀中实现智能锁与灯、智能窗帘电机场景联动?
视觉特效,图片转成漫画功能
(翻译)实时内联验证更容易让用户犯错的原因
halcon变量窗口的图像变量不显示,重启软件和电脑都没用
手机上怎么开户?还有,在线开户安全么?
A preliminary understanding of operator overloading
URLs and URIs
Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]
522. 最长的特殊序列 II
In the fourth week of June, the list - flying melon data up main growth ranking list (BiliBili platform) was released!
Ernie-gram, 显式、完备的 n-gram 掩码语言模型,实现了显式的 n-gram 语义单元知识建模。
7_ Openresty installation
十大劵商如何开户?还有,在线开户安全么?
模板:全局平衡二叉树
CentOS installs multiple versions of PHP and switches
SWT / anr problem - binder stuck
Short video platform development, relying on drawerlayout to achieve side sliding menu effect
What other hot spots are hidden under 1500W playback? Station B 2 future trends you can't miss
[2022] Jiangxi postgraduate mathematical modeling scheme and code
When facing the industrial Internet, they even use the ways and methods of consuming the Internet to land and practice the industrial Internet