当前位置:网站首页>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>
边栏推荐
- (翻译)使用眉状文本提高标题点击率
- Find the length of the common part of two line segments
- Short video platform development, relying on drawerlayout to achieve side sliding menu effect
- 在unity中使用jieba分词的方法
- 十大券商有哪些?另外想问,现在在线开户安全么?
- SWT / anr problem - binder stuck
- 零基础自学SQL课程 | 窗口函数
- SWT / anr problem - SWT caused by too long dump time
- map数组函数
- MySQL insert \ pre update + judgment condition
猜你喜欢
2022年最新csdn涨薪技术栈-app自动化测试概述
![Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]](/img/6e/279dbb7a8d7a5ecd240de464c5b8b2.png)
Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]

删除重复的电子邮箱

Desai wisdom number - other charts (parallel coordinate chart): employment of fresh majors in 2021

Calculate special bonus

pycharm 软件deployment 灰色 无法点

在unity中使用jieba分词的方法

js中的图片预加载

LabVIEW计算相机图像传感器分辨率以及镜头焦距

What are the applications of SMS in enterprises?
随机推荐
(translation) use eyebrow shaped text to improve Title click through rate
How do the top ten securities firms open accounts? Also, is it safe to open an account online?
【做题打卡】集成每日5题分享(第一期)
SWT / anr problem - SWT caused by too long dump time
Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"
C#生成putty格式的ppk文件(支持passphrase)
How does the property send a text message to the owner?
机器学习9-通用逼近器径向基函数神经网络,在新观点下审视PDA和SVM
[punch in questions] integrated daily 5 questions sharing (phase I)
UE4渲染管线学习笔记
Restcloud ETl数据通过时间戳实现增量数据同步
A preliminary understanding of operator overloading
Alphabet rearrange inator 3000 (dictionary tree custom sorting)
Video tutorial | Chang'an chain launched a series of video tutorial collections (Introduction)
PMP是什麼?
Pytorch —— 基礎指北_貳 高中生都能看懂的[反向傳播和梯度下降]
Laravel event & subscription
Objects and object variables
Fix names in the table (first character uppercase, other lowercase)
Pulsar 主题压缩