JRT监听程序

本次设计避免以往设计缺陷,老的主要为了保持兼容性,在用的设计就不好调了。

在这里插入图片描述

首先,接口抽象时候就不在给参数放仪器ID和处理类了,直接放仪器配置实体,接口实现想用什么属性就用什么属性,避免老方式要扩参数时候就波动接口定义,导致不兼容。
在这里插入图片描述

对返回命令取图或者上传文件等不在组串了,直接约定命令,返回查询上传数据或保存数据返回时候直接返回命令的JSON列表,再有监听提供的命令虚拟机执行命令

/*
本框架版权归属于JRT计划,任何单位或个人未经许可,不得以任何方式复制、传播、展示、发布、分发、重新分发、修改、反编译、
反向编译或以其他方式使用本框架的任何部分,包括但不限于源代码、二进制文件、文档、演示文稿、示例代码和API。
使用本框架的用户需遵守以下条款:
用户只能以个人学习和研究为目的使用本框架,不得将其用于商业用途。
用户在使用本框架时,应遵守所有适用的法律和法规,包括但不限于版权法、商标法、专利法和隐私权法。
用户在使用本框架时,应自行承担风险和责任,并确保不会侵犯任何知识产权或个人权利。
本框架的使用仅限于用户自己使用,不得将其分发给其他用户或将其用于任何形式的共享或传播。
在使用本框架时,用户应尊重和保护其他用户的隐私和个人信息,不得将其泄露给任何第三方。
违反以上条款将视为侵权行为,将采取法律手段维护JRT合法权益。*/
package JRTMachineImpl.Cmd;import java.util.List;
import JRTMachineImpl.Base.CmdDto;/*** 构造指令,监听再也不按以前固定拼串方式来实现附加功能了,转而提供一系列指令约定,让后台虚拟M按需要返回指令列表,* 由监听实现的简单指令执行虚拟机执行,从而达到解耦和实现更灵活和强大的功能*/
public class MakeCmd {/*** 添加一个SQL更新或者插入数据的指令到指令列表* @param cmdList 指令列表* @param setStatusKey 设置状态主键,有的话用该注解调用SetQryStatus设置状态* @param sql SQL语句* @param Address 连接串,如果上传要单独指定地址的话就传* @param UserName 用户名,如果上传要单独指定地址的话就传* @param UserPass 密码,如果上传要单独指定地址的话就传* @param Driver 驱动,如果上传要单独指定地址的话就传*/public static void AddSqlCmd(List<CmdDto> cmdList,String setStatusKey,String sql,String Address,String UserName,String UserPass,String Driver){CmdDto dto=new CmdDto();dto.Cmd="SQL";dto.P0=sql;dto.P1=Address;dto.P2=UserName;dto.P3=UserPass;dto.P4=Driver;dto.SetStatusKey=setStatusKey;cmdList.add(dto);}/*** 添加一个SQL更新或者插入数据的指令到指令列表* @param cmdList 指令列表* @param setStatusKey 设置状态主键,有的话用该注解调用SetQryStatus设置状态* @param sql SQL语句*/public static void AddSqlCmd(List<CmdDto> cmdList,String setStatusKey,String sql){AddSqlCmd(cmdList,setStatusKey,sql,"","","","");}/*** 添加一个写文本数据的指令到指令列表* @param cmdList 指令列表* @param setStatusKey 设置状态主键,有的话用该注解调用SetQryStatus设置状态* @param path 文本路径* @param str 写入的串* @param isAppend 是否追加* @param encode 编码 空默认系统编码,可为:UTF-8 UTF-16 ISO-8859-1 US-ASCII GB2312 GBK Big5 Shift-JIS EUC-KR Windows-1252*/public static void AddTxtCmd(List<CmdDto> cmdList,String setStatusKey,String path,String str,String isAppend,String encode){CmdDto dto=new CmdDto();dto.Cmd="TXT";dto.P0=path;dto.P1=str;dto.P2=isAppend;dto.P3=encode;dto.SetStatusKey=setStatusKey;cmdList.add(dto);}/*** 添加一个删除文件或者文件夹的指令到指令列表* @param cmdList 指令列表* @param path 路径*/public static void AddRMCmd(List<CmdDto> cmdList,String path){CmdDto dto=new CmdDto();dto.Cmd="RM";dto.P0=path;dto.SetStatusKey="";cmdList.add(dto);}/*** 添加一个拷贝文件的指令到指令列表* @param cmdList 指令列表* @param filePathOld 源文件路径* @param filePathNew 新文件路径*/public static void AddCPCmd(List<CmdDto> cmdList,String filePathOld,String filePathNew){CmdDto dto=new CmdDto();dto.Cmd="CP";dto.P0=filePathOld;dto.P1=filePathNew;dto.SetStatusKey="";cmdList.add(dto);}/*** 添加一个获取图片的指令到指令列表* @param cmdList 指令列表* @param epis 流水号* @param imgClass 图片类别代码* @param imgPath 图片路径* @param newName 新名称,不给的话就是文件名*/public static void AddGetImageCmd(List<CmdDto> cmdList,String epis,String imgClass,String imgPath,String newName){if(newName==null){newName="";}CmdDto dto=new CmdDto();dto.Cmd="GETIMAGE";dto.P0=epis;dto.P1=imgClass;dto.P2=imgPath;dto.P3=newName;dto.SetStatusKey="";cmdList.add(dto);}
}

命令执行器

/*
本框架版权归属于JRT计划,任何单位或个人未经许可,不得以任何方式复制、传播、展示、发布、分发、重新分发、修改、反编译、
反向编译或以其他方式使用本框架的任何部分,包括但不限于源代码、二进制文件、文档、演示文稿、示例代码和API。
使用本框架的用户需遵守以下条款:
用户只能以个人学习和研究为目的使用本框架,不得将其用于商业用途。
用户在使用本框架时,应遵守所有适用的法律和法规,包括但不限于版权法、商标法、专利法和隐私权法。
用户在使用本框架时,应自行承担风险和责任,并确保不会侵犯任何知识产权或个人权利。
本框架的使用仅限于用户自己使用,不得将其分发给其他用户或将其用于任何形式的共享或传播。
在使用本框架时,用户应尊重和保护其他用户的隐私和个人信息,不得将其泄露给任何第三方。
违反以上条款将视为侵权行为,将采取法律手段维护JRT合法权益。*/
package JRTMachineImpl.Cmd;import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.List;import JRTMachineImpl.Base.BaseDeal;
import JRTMachineImpl.Base.CmdDto;
import JRTMachineImpl.Base.ConfDto;
import JRTMachineImpl.Util.FileService;
import JRTMachineImpl.Util.LogUtils;
import JRTMachineImpl.WebService.OutValue;
import JRTMachineImpl.WebService.Parameters;
import JRTMachineImpl.WebService.WebGetData;
import JRTMachineImpl.DB.DBHelper;/*** 指令执行的虚拟机,按指令约定执行指令*/
public class CmdVM {/*** 执行指令* @param cmdList 指令列表* @param conf 监听配置* @return 返回值,正常返回空,否则返回错误*/public static String ExeCmd(List<CmdDto> cmdList, JRTMachineImpl.Base.ConfDto conf) throws Exception{//循环执行指令for(CmdDto cmd:cmdList){try {ExeOneCmd(cmd, conf);}catch (Exception ex){StringWriter stringWriter = new StringWriter();ex.printStackTrace(new PrintWriter(stringWriter));LogUtils.WriteDebugLog("执行命令异常:" + stringWriter.toString());LogUtils.WriteExceptionLog("执行命令异常", ex);}}return "";}/*** 执行指令* @param cmd 指令* @param conf 监听配置* @return 返回值,正常返回空,否则返回错误*/public static String ExeOneCmd(CmdDto cmd, JRTMachineImpl.Base.ConfDto conf) throws Exception{//执行SQLif(cmd.Cmd.equals("SQL")){ConfDto confNew=new ConfDto();confNew.Address=conf.Address;confNew.UserName=conf.UserName;confNew.UserPass=conf.UserPass;confNew.Driver=conf.Driver;//命令指定了要换驱动if(cmd.P1!=null&&!cmd.P1.isEmpty()){confNew.Address=cmd.P1;confNew.UserName=cmd.P2;confNew.UserPass=cmd.P3;confNew.Driver=cmd.P4;}JRTMachineImpl.DB.DBHelper dbHelper=new DBHelper(confNew);LogUtils.WriteDebugLog("执行SQL:"+cmd.P0);//执行SQL语句int ret=dbHelper.ExecUpdateSQL(cmd.P0);LogUtils.WriteDebugLog("执行SQL返回:"+ret);//设置状态if(ret==1&&!cmd.SetStatusKey.isEmpty()){Parameters param=new Parameters();param.P0=conf.MachID;param.P1=cmd.SetStatusKey;OutValue session = new OutValue();OutValue out = new OutValue();LogUtils.WriteDebugLog("调用:"+conf.DealProcess+"的:SetQryStatus设置状态");String setStatusRet=WebGetData.GetData(BaseDeal.WebServicAddress,conf.DealProcess,"SetQryStatus",param,session,out);LogUtils.WriteDebugLog("设置状态返回:"+setStatusRet);}}//写文件else if(cmd.Cmd.equals("TXT")){File fi=new File(cmd.P0);boolean isAppend=false;if(cmd.P2.equals("1")){isAppend=true;}String model=",模式:覆盖";if(isAppend==true){model=",模式:追加";}LogUtils.WriteDebugLog("往文件:"+cmd.P0+",写入:"+cmd.P1+model+",编码:"+cmd.P3);JRTMachineImpl.Util.TxtUtil.WriteText2File(fi,cmd.P1,isAppend,cmd.P3);//设置状态if(!cmd.SetStatusKey.isEmpty()){Parameters param=new Parameters();param.P0=conf.MachID;param.P1=cmd.SetStatusKey;OutValue session = new OutValue();OutValue out = new OutValue();LogUtils.WriteDebugLog("调用:"+conf.DealProcess+"的:SetQryStatus设置状态");String setStatusRet=WebGetData.GetData(BaseDeal.WebServicAddress,conf.DealProcess,"SetQryStatus",param,session,out);LogUtils.WriteDebugLog("设置状态返回:"+setStatusRet);}}//删除文件和目录else if(cmd.Cmd.equals("RM")){LogUtils.WriteDebugLog("删除:"+cmd.P0);JRTMachineImpl.Util.DirUtil.DeleteFileOrDir(new File(cmd.P0));}//拷贝文件else if(cmd.Cmd.equals("CP")){Path source = Paths.get(cmd.P0);Path target = Paths.get(cmd.P1);LogUtils.WriteDebugLog("拷贝:"+cmd.P0+"到:"+cmd.P1);Files.copy(source,target, StandardCopyOption.REPLACE_EXISTING);}//得到图片else if(cmd.Cmd.equals("GETIMAGE")){FileService fileService=new FileService();Parameters param=new Parameters();param.P0=conf.MachID;OutValue session = new OutValue();OutValue out = new OutValue();LogUtils.WriteDebugLog("调用:"+conf.DealProcess+"的:GetFileService得到文件服务路径");String fileServerPath=WebGetData.GetData(BaseDeal.WebServicAddress,conf.DealProcess,"GetFileService",param,session,out);LogUtils.WriteDebugLog("文件服务路径:"+fileServerPath);File fi=new File(cmd.P2);if(fi.exists()){String [] arr=fileServerPath.split("\\^");LogUtils.WriteDebugLog("准备上传:"+cmd.P2+",新名称:"+cmd.P3+",相对路径:"+arr[1]+"到:"+arr[0]);String ret=fileService.Upload(arr[0],cmd.P2,cmd.P3,arr[1]);LogUtils.WriteDebugLog("上传返回:"+ret);if(ret.isEmpty()){param=new Parameters();param.P0=conf.MachID;param.P1=cmd.P0;param.P2=cmd.P1;param.P3=fi.getName();param.P4=fi.getAbsolutePath();LogUtils.WriteDebugLog("调用:"+conf.DealProcess+"的:SaveImage保存文件路径");String saveRet=WebGetData.GetData(BaseDeal.WebServicAddress,conf.DealProcess,"SaveImage",param,session,out);LogUtils.WriteDebugLog("保存文件返回:"+saveRet);}else{LogUtils.WriteDebugLog("上传文件服务失败:"+ret);}}else{LogUtils.WriteDebugLog("文件:"+cmd.P2+"不存在");}}return "";}
}

定时上传执行命令
在这里插入图片描述

保存返回执行命令
在这里插入图片描述

仪器业务处理示例

import JRT.Core.Dto.CmdDto;
import JRT.Core.Dto.OutValue;
import JRT.Core.Util.LogUtils;
import JRT.Core.Util.MakeCmdUtil;
import JRT.Core.Util.TimeParser;
import JRTBLLBase.BaseHttpHandlerNoSession;
import JRTBLLBase.Helper;import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;/*** 监听模式的仪器测试*/
public class JRTMachineTest extends BaseHttpHandlerNoSession {/*** 记录已经上传的数据*/private static HashMap<String, Boolean> hasUpData = new HashMap();/*** 保存仪器数据** @param mi        仪器主键* @param data      数据* @param epis      流水号* @param fileName  文件全名* @param DBColName 数据库列名* @param index     序号,-1为最后一行* @param P6* @param P7* @param P8* @param P9* @param P10* @param P11* @param P12* @param P13* @param Session* @param Output* @return* @throws Exception*/public String SaveData(String mi, String data, String epis, String fileName, String DBColName, String index, String P6, String P7, String P8, String P9, String P10, String P11, String P12, String P13, OutValue Session, OutValue Output) throws Exception {//先写Log测试LogUtils.WriteDebugLog("mi:" + mi + ",data:" + data + ",epis:" + epis + ",fileName:" + fileName + ",DBColName:" + DBColName);//返回的数据List<CmdDto> cmdList = new ArrayList<>();MakeCmdUtil.AddGetImageCmd(cmdList, "998", "P2", "D:\\OUT\\2.bmp", "");return Helper.Object2Json(cmdList);}/*** 得到文件服务地址供接口上传图片** @param mi* @param P1* @param P2* @param P3* @param P4* @param P5* @param P6* @param P7* @param P8* @param P9* @param P10* @param P11* @param P12* @param P13* @param Session* @param Output* @return* @throws Exception*/public String GetFileService(String mi, String P1, String P2, String P3, String P4, String P5, String P6, String P7, String P8, String P9, String P10, String P11, String P12, String P13, OutValue Session, OutValue Output) throws Exception {//返回文件服务路径return "http://localhost:8080/JRTWeb/FileService/^/zlzmach/" + TimeParser.GetNowDate();}/*** 保存文件到数据库** @param mi* @param epis* @param ImageClass* @param fileName* @param FullName* @param P5* @param P6* @param P7* @param P8* @param P9* @param P10* @param P11* @param P12* @param P13* @param Session* @param Output* @return* @throws Exception*/public String SaveImage(String mi, String epis, String ImageClass, String fileName, String FullName, String P5, String P6, String P7, String P8, String P9, String P10, String P11, String P12, String P13, OutValue Session, OutValue Output) throws Exception {//先写Log测试LogUtils.WriteDebugLog("mi:" + mi + ",epis:" + epis + ",ImageClass:" + ImageClass + ",fileName:" + fileName + ",FullName:" + FullName);return "";}/*** 查询要上传的指令** @param mi      仪器* @param P1* @param P2* @param P3* @param P4* @param P5* @param P6* @param P7* @param P8* @param P9* @param P10* @param P11* @param P12* @param P13* @param Session* @param Output* @return* @throws Exception*/public String QryUpdata(String mi, String P1, String P2, String P3, String P4, String P5, String P6, String P7, String P8, String P9, String P10, String P11, String P12, String P13, OutValue Session, OutValue Output) throws Exception {//先写Log测试LogUtils.WriteDebugLog("mi:" + mi + ",调用上传查询");//返回的数据List<CmdDto> cmdList = new ArrayList<>();//读文本仪器if (mi.equals("1")) {if (!hasUpData.containsKey("0947809")) {MakeCmdUtil.AddTxtCmd(cmdList, "0947809", "D:\\OUT\\uptxt.dttmp", "这是JRT上传的文本串", "0", "");MakeCmdUtil.AddCPCmd(cmdList, "D:\\OUT\\uptxt.dttmp", "D:\\OUT\\uptxt.dt");MakeCmdUtil.AddRMCmd(cmdList, "D:\\OUT\\uptxt.dttmp");}}//读数据库仪器else if (mi.equals("2")) {if (!hasUpData.containsKey("0947810")) {MakeCmdUtil.AddSqlCmd(cmdList, "0947810", "insert into DBUpHistory(DataCode,KeyData,DateStr,Data) values('0947809','1','这是JRT用SQL插入的数据','1')");}}MakeCmdUtil.AddGetImageCmd(cmdList, "999", "P1", "D:\\OUT\\1.bmp", "");return Helper.Object2Json(cmdList);}/*** 设置上传指令执行状态** @param mi           仪器* @param setStatusKey 设置状态的主键* @param P2* @param P3* @param P4* @param P5* @param P6* @param P7* @param P8* @param P9* @param P10* @param P11* @param P12* @param P13* @param Session* @param Output* @return* @throws Exception*/public String SetQryStatus(String mi, String setStatusKey, String P2, String P3, String P4, String P5, String P6, String P7, String P8, String P9, String P10, String P11, String P12, String P13, OutValue Session, OutValue Output) throws Exception {//先写Log测试LogUtils.WriteDebugLog("mi:" + mi + ",setStatusKey:" + setStatusKey + "设置状态");hasUpData.put(setStatusKey, true);return "";}
}

这样,一套超越以前设计的监听架构就出来了。JRT拥有Web、打印导出Client、JRT浏览器、JRTMachine、jrt运维命令、齐全了

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/671891.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java的excel列行合并模版

1.效果 2.模版 <tableborder"1"cellpadding"0"cellspacing"0"class"tablebor"id"TABLE"><tr align"center" class"bg217"><td style"background-color: #008000; color: #ffffff;p…

archlinux 使用 electron-ssr 代理 socks5

提前下载好 pacman 包 https://github.com/shadowsocksrr/electron-ssr/releases/download/v0.2.7/electron-ssr-0.2.7.pacman 首先要有 yay 和 aur 源&#xff0c;这个可以参考我之前的博客 虚拟机内使用 archinstall 安装 arch linux 2024.01.01 安装依赖 yay 安装的&#…

WebGL+Three.js入门与实战——绘制水平移动的点、通过鼠标控制绘制(点击绘制、移动绘制、模拟画笔)

个人简介 &#x1f440;个人主页&#xff1a; 前端杂货铺 &#x1f64b;‍♂️学习方向&#xff1a; 主攻前端方向&#xff0c;正逐渐往全干发展 &#x1f4c3;个人状态&#xff1a; 研发工程师&#xff0c;现效力于中国工业软件事业 &#x1f680;人生格言&#xff1a; 积跬步…

JVM 性能调优 - 常用的垃圾回收器(6)

垃圾收集器 在 JVM(Java虚拟机)中,垃圾收集器(Garbage Collector)是负责自动管理内存的组件。它的主要任务是在程序运行过程中,自动回收不再使用的对象所占用的内存空间,以便为新的对象提供足够的内存。 JVM中的垃圾收集器使用不同的算法和策略来实现垃圾收集过程,以…

第4章——深度学习入门(鱼书)

第4章 神经网络的学习 本章的主题是神经网络的学习。这里所说的“学习”是指从训练数据中自动获取最优权重参数的过程。本章中&#xff0c;为了使神经网络能进行学习&#xff0c;将导入损失函数这一指标。而学习的目的就是以该损失函数为基准&#xff0c;找出能使它的值达到最…

一些常见的电源方案

开关电源&#xff1a; RM C 板&#xff1a;&#xff08;24V电压&#xff0c;10A电流&#xff09; SMBJ30CA&#xff1a;静电和浪涌保护(TVS/ESD) 一般使用NMOS管&#xff0c;因为PMOS管导通电阻与NMOS管比较会较大 模电非基础01——从一种常见的防反接&#xff0c;上电缓启…

Mysql大表添加字段失败解决方案

背景 最近遇到一个问题&#xff0c;需要在user用户表千万级别数据中添加两个字段&#xff0c;发现老是加不上去&#xff0c;一直卡死。表数据量不仅大&#xff0c;而且是一个热点表&#xff0c;访问频率特别高&#xff0c;而且该表的访问是在一个大事务中。加字段的时候一直在…

挑战杯 python 爬虫与协同过滤的新闻推荐系统

1 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; python 爬虫与协同过滤的新闻推荐系统 &#x1f947;学长这里给一个题目综合评分(每项满分5分) 难度系数&#xff1a;3分工作量&#xff1a;3分创新点&#xff1a;4分 该项目较为新颖&…

【人工智能】神奇的Embedding:文本变向量,大语言模型智慧密码解析(10)

什么是嵌入&#xff1f; OpenAI 的文本嵌入衡量文本字符串的相关性。嵌入通常用于&#xff1a; Search 搜索&#xff08;结果按与查询字符串的相关性排序&#xff09;Clustering 聚类&#xff08;文本字符串按相似性分组&#xff09;Recommendations 推荐&#xff08;推荐具有…

鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之RichText组件

鸿蒙&#xff08;HarmonyOS&#xff09;项目方舟框架&#xff08;ArkUI&#xff09;之RichText组件 一、操作环境 操作系统: Windows 10 专业版、IDE:DevEco Studio 3.1、SDK:HarmonyOS 3.1 二、RichText组件 鸿蒙&#xff08;HarmonyOS&#xff09;富文本组件&#xff0c;…

【学习心得】Python好库推荐——tqdm

在很多时候&#xff0c;你都需要一个进度条来告知当前程序的运行状况和进展。tqdm 是一个在Python中广泛使用的命令行进度条工具库&#xff01;下面是这个库的主页&#xff1a;https://tqdm.github.io/ 一、快速入门 &#xff08;1&#xff09;for循环中 代码&#xff1a; …

句子嵌入: 交叉编码和重排序

这个系列目的是揭开嵌入的神秘面纱&#xff0c;并展示如何在你的项目中使用它们。第一篇博客介绍了如何使用和扩展开源嵌入模型&#xff0c;选择现有的模型&#xff0c;当前的评价方法&#xff0c;以及生态系统的发展状态。第二篇博客将会更一步深入嵌入并解释双向编码和交叉编…

C语言的起源

1940年代&#xff0c;最早的开始&#xff0c;编程语言是机器语言&#xff0c;用0/1表示的、计算机能直接识别和执行的一种机器指令的集合。最早的编程方式&#xff0c;就是给纸带打孔或者卡片机打孔。机器语言直接与硬件沟通&#xff0c;极具针对性&#xff0c;但是非常难于理解…

IP地址如何保护网络安全

面对网络攻击时&#xff0c;仅依靠常态化的网络安全防御系统已捉襟见肘&#xff0c;如联合使用IP地址数据可以形成多元化的安全解决方案&#xff0c;全面监控网络活动&#xff0c;发现潜在威胁&#xff0c;制定有针对性的应对措施。 网络攻击追踪 当网站或应用遭受DDoS等网络攻…

基于YOLOv8的暗光低光环境下(ExDark数据集)检测,加入多种优化方式---DCNv4结合SPPF ,助力自动驾驶(一)

&#x1f4a1;&#x1f4a1;&#x1f4a1;本文主要内容:详细介绍了暗光低光数据集检测整个过程&#xff0c;从数据集到训练模型到结果可视化分析&#xff0c;以及如何优化提升检测性能。 &#x1f4a1;&#x1f4a1;&#x1f4a1;加入 DCNv4结合SPPF mAP0.5由原始的0.682提升至…

在 VMware 虚拟机上安装 CentOS系统 完整(全图文)教程

一、前期准备&#xff1a; 1.安装VMware 虚拟机软件&#xff08;不在讲解&#xff0c;可自行去下载安装&#xff09;。官网&#xff1a;https://customerconnect.vmware.com/cn/downloads/details?downloadGroupWKST-PLAYER-1750&productId1377&rPId111471 2.下载iso…

【AWS】step-functions服务编排

文章目录 step-functionsState machine typeStandard workflowsExpress workflows design skillsError handlingsaga Transaction processing控制分布式系统中的并发性 收费 作为AWS Serverless无服务器的一个重要一环 使用step-functions方法将 AWS 服务链接在一起 step-funct…

用python编写爬虫,爬取二手车信息+实验报告

题目 报告要求 工程报告链接放在这里 https://download.csdn.net/download/Samature/88805518使用 1.安装jupyter notebook 2.用jupyter notebook打开工程里的ipynb文件&#xff0c;再run all就行 注意事项 可能遇到的bug 暂无&#xff0c;有的话私信我

如何决定K8S Pod的剔除优先级

在Kubernetes&#xff08;k8s&#xff09;中&#xff0c;当节点资源面临压力时&#xff0c;如何决定Pod的优先级是一个关键问题。在Kubernetes 1.8版本之后&#xff0c;引入了基于Pod优先级的调度策略&#xff0c;即Pod Priority Preemption。这种策略允许在资源不足的情况下&a…

iOS平台如何实现低延迟RTSP转RTMP推送?

技术背景 好多开发者都知道我们有Windows、Android、Linux平台的RTSP转RTMP推送模块&#xff0c;实际上&#xff0c;iOS平台我们也有&#xff0c;并在2016年就已发布。我们都知道&#xff0c;一个好的RTSP转RTMP推送模块&#xff0c;需要足够稳定的前提下&#xff0c;还要低延…