基于CSE的微服务架构实践-基础架构

在Spring Boot中使用华为云微服务CSE 概述   Spring Boot可以让开发者能够更加快速的构建Spring应用。主要提供了如下功能: 创建独立可执行的Spring应用。通过将应用程序打包为jar,就可以通过java -jar来执行应用程序。 内嵌Tomcat, Jetty等WEB服务器,而不需要开发者打包war。 提供starter简化maven依赖关系配置。 将Spring Boot用于微服务... 阅读详情

点击上方蓝色字体,关注我们

LOMO

采用微服务架构开发业务应用,让架构本身变得不再重要。

“动手”开始做对于项目的推动作用,远大于“思考”如何做。在单体应用微服务改造实践中,分析了一种“持续迭代演进”进行微服务改造的方法学,这个方法学同样适用于从头开始进行微服务开发。 

CSE提供了非常多场景的开发支持,对于开发者,应该尽可能选择统一的技术栈,这样技术积累会比较快,不同微服务开发者之间也能够更好的进行交流和共享经验。CSE推荐的技术栈有三种:

  • 基于CSE的轻量级微服务架构

  • 基于Spring Boot + CSE轻量级微服务架构

  • 基于Spring Boot的Web技术栈微服务架构

上述架构均采用CSE运行时这种处理流程,只是底层依赖的HTTP服务器不同,以及上层依赖的组件不同。轻量级架构的HTTP服务器和上层组件都相对简单,更加节省资源,运行也更加高效;Spring Boot架构下,则能够使用更多的组件,满足更多场景的需要。两种技术栈的微服务是可以并存和相互访问的。

对于Web应用,建议采用静态页面技术(html+js+css等)设计UI,而不要采用动态页面技术(比如jsp等)。因为静态页面部署方式更加灵活,更能够适配不同的微服务部署架构。

基础的微服务弹性架构

基础弹性架构包括接入层和业务层。接入层负责进行域名解析、路由转发,常用的技术包括DNS,ELB、LVS等。业务层的所有服务均采用多实例部署,解决性能问题和防止单点故障。

静态页面部署到边缘服务

静态页面可以部署到网关里面。CSE的Edge Service可以直接挂载静态页面。

静态页面部署到系统外部

静态页面可以部署业务层外部。比如有些产品,页面是第三方开发的,业务层对于第三方是一个黑盒,只公布了REST接口供第三方调用。有些产品静态页面不是第三方开发的,他们有自己的nginx服务器做为ELB,把静态页面部署到nginx里面。

静态页面部署到系统内部

还可以将静态页面作为一个微服务,部署到业务层。网关负责转发静态页面请求。

往期精彩回顾

大规模微服务实战经验
【性能测试】压榨一下ServiceComb
[学习微服务第9天] Service-Center使用入门

好看点一下 大家都知道

戳“阅读原文”一起来充电吧!

轻量级微服务架构(上、下册) 轻量级微服务架构(上、下册) 轻量级微服务架构(上、下册) 轻量级微服务架构(上、下册) 立即下载

相关推荐

如何实现chrome谷歌浏览器多开(独立环境 独立cookie)

由于各种各样的原因,你可能需要在一个电脑登录某个平台,比如一个电脑登录3个公众号,或者3个知乎等等。最简单的方案是,直接安装3个不同的浏览器,比如一个谷歌浏览器,一个火狐浏览器,一个 Edge 浏览器。这个方案也能解决,但如果想多开10个呢?安装10个不同的浏览器也能解决,但感觉这样比较复杂,另外一方面安装太多的应用,会导致电脑卡顿。这里给大家介绍,我在 Win 和 Mac 系统下的躲开解决方案。Win 系统下的解决方案最为简单,原理就是给不同的谷歌浏览器,指向不同的用户存储路径即可。

lzqial1987的专栏 1万+

华为CSE框架的一些知识点

华为后端框架CSE

须臾徐的博客 5512

STM32F4串口接收ATGM336H GPS数据,手把手教你解析NMEA协议并转换经纬度格式

本文详细介绍了如何使用STM32F4开发板通过串口接收ATGM336H GPS模块的NMEA协议数据,并解析GNRMC语句获取经纬度信息。内容涵盖硬件连接、NMEA协议深度解析、数据校验实现以及经纬度格式转换的数学原理与代码实现,为嵌入式开发者提供完整的GPS数据处理解决方案。

weixin_42522575的博客 505

跟我学CSE系列之1:CSE开发框架系统架构

CSE(Cloud Service Engine) Java SDK是华为推出的产品级微服务开发框架,已经在华为内部多个大型产品上得到了使用和验证。使用CSE Java SDK开发微服务,可以最大化的简化开发门槛,提升产品上线速度。同时可以获得微服务运行时高可靠性保证、运行时动态治理等一系列开箱即用的能力。框架概述主要设计意图1.编程模型和通信模型分离,不同的编程模型可以灵活组合不同的通信模型。应...

微服务技术与实践专栏 7903

团结引擎+OpenHarmony 2实战篇:从零构建鸿蒙应用开发环境

本文详细介绍了如何从零开始构建鸿蒙应用开发环境,重点讲解了团结引擎与OpenHarmony 2的实战配置步骤。内容包括DevEco Studio安装、OpenHarmony SDK配置、团结引擎集成及项目创建等关键环节,帮助开发者快速搭建高效的开发环境,提升鸿蒙应用开发效率。

weixin_29294395的博客 270

YOLO26升级:CVPR2026 WDAM小波方向注意力+C2PSA,频域高频引导低频暗区复原,小目标检测精度跃升!

将 WDAM 引入 YOLO 的 C2PSA 模块,核心优势在于用极低的计算开销,为模型装上了一个“结构感知”的增强器,尤其适合处理密集小目标与边缘部署场景。

①答疑群聊服务;②YOLO大模型知识问答系统;③计算机视觉论文生成智能体; 393

ServiceComb/CSE和Spring Cloud技术栈对比

当Spring Cloud和CSE都构建于Spring Boot基础之上的时候,可以方便地将基于Spring Cloud技术栈的应用迁移到CSE上来。 上图中展示了CSE和Spring Cloud通常情况下的一种开发组合。实际上,CSE和Spring Cloud都提供了非常良好的扩展性,它们能够使用的组件都不是完全互斥的,而是可以相互融合使用。比如在配置更新下发方面,CSE可以通过实现archa...

微服务技术与实践专栏 5592

【DRAM存储器四十三】LPDDR5介绍--寻址

简要说明LPDDR5 X16、x8 die的寻址

highman110的博客 984

Spring Boot 2.0集成和使用CSE

点击上方“微服务蜂巢”可以订阅哦本文通过一个IoT的应用展现在SpringBoot 2.0中集成和使用CSE。IoT应用原来使用SpringBoot 2.0开发,通过少量...

微服务技术与实践专栏 1465

SAP会计凭证导入ABAP开发模板+注意点—附带源码

开发并不仅仅只要考虑实现的功能,只实现功能的是程序,考虑到使用场景的是工程。使用bapi校验创建会计凭证的数据,报错和参数和正式创建一致。用途,防止产生错误的凭证,即使财务凭证可以冲销。正式创建会计凭证。隐藏的坑。

小九啥也不会 1241

论文复现《基于最大李雅普诺夫指数的电力系统暂态电压稳定评估方案》

电力系统暂态电压稳定评估方案 摘要 本研究提出了一种基于最大李雅普诺夫指数的电力系统暂态电压稳定评估方法。通过分析相空间中相邻轨迹的收敛或发散特性,该方法能够提前判别系统稳定性。论文首先阐述了暂态电压稳定机理,详细介绍了最大李雅普诺夫指数的计算方法。针对IEEE-39节点系统,建立了仿真模型并获取不同故障场景下的数据。研究开发了完整的评估程序,包括数据预处理、相空间重构、指数计算等模块,并通过与时域仿真结果的对比验证了方法的准确性。实验结果表明,该方法能够快速有效地评估电力系统的暂态电压稳定性,为系统安全运

max500600的博客 190

ServiceComb微服务框架

华为提供的微服务解决方案:Service Comb

学习记录和总结 1万+

ADC的有效位数(ENOB)、信噪比(SNR)和无杂散动态范围(SFDR)——详细分析

设计提示(从文本):选择ADC时,看数据手册的SNR、ENOB、SFDR vs 频率图。减小抖动:用低抖动时钟、优化PCB、电源滤波。对于大信号:关注SFDR(失真);小信号:关注SNR/ENOB(噪声)。如果ENOB不足,用过采样或多ADC并行提升(但增加复杂度)。为什么这段重要?它解释了为什么高速ADC(如用于5G、雷达)的规格那么贵:抖动和失真限制了高频性能。理解这些,能帮你避免设计陷阱。

VectorShift的博客 1420

使用华为云CSE开发微服务应用

概述   CSE(Cloud Service Engine) Java SDK是华为推出的产品级微服务开发框架,已经在华为内部多个大型产品上得到了使用和验证。使用CSE Java SDK开发微服务,可以最大化的简化开发门槛,提升产品上线速度。同时可以获得微服务运行时高可靠性保证、运行时动态治理等一系列开箱即用的能力。 为了描述简单,本文会使用CSE指代CSE Java SDK,使用Servi...

qq_43620668的博客 8853

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

消费者云CSE微服务实践

华为架构师李林锋分享华为消费云CSE的微服务实践。

wangluoanquan111的博客 1139

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

基于CSE的微服务架构实践-轻量级架构技术选型

【摘要】 本文在前一篇“基于CSE的微服务架构实践-基础架构”基础上,介绍了使用CSE进行轻量级架构的技术选型参考。文末提供了基于JWT的微服务认证鉴权方案。 轻量级架构模式下,可以选择CSE作为RPC开发框架的基础,并选择其他开源技术实现微服务业务功能。 Spring BootBoot的maven插件提供了良好的打包功能,将一个应用打包为jar包,可以方便的分发应用程序,同时使用Servic...

华为云官方博客 2139

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

基于CSE的微服务架构实践-Spring Cloud技术栈选型

点击箭头处“蓝色字”,关注我们哦!!Spring Cloud技术栈用户选型建议当Spring Cloud和CSE都构建于Spring Boot基础之上的时候,可以将CSE...

微服务技术与实践专栏 387

基于CSE的微服务架构实践-Spring Boot技术栈选型

【摘要】 本文在前一篇“基于CSE的微服务架构实践-基础架构”基础上,介绍了在Spring Boot中集成CSE的技术选型参考。本文介绍了Spring Boot集成CSE的基本原理和工作流程,Spring Boot进行微服务开发组件选型参考,以及CSE的Edge Service的选型考量。 Spring Boot技术使得用户开发Spring应用更加容易,而Spring是JAVA领域被广泛使用的框...

华为云官方博客 2428

基于CSE的微服务工程实践-多微服务框架演进

【摘要】 本文介绍了在微服务架构持续演进过程中,如何解决多种REST开发框架并存的问题。重点描述了网关在将请求转发给不同框架的微服务实例时,治理能力的差异;描述了CSE在提供第三方微服务访问方面的治理能力增强和开发。 开发团队选择同样的开发框架能够更好的进行经验积累和知识共享,从而提高开发效率。在实际项目中,这个过程经常被打破。团队需要根据用户需求的变化,选择更好的开发框架来解决面对的新问题。每...

华为云官方博客 2172

基于CSE的微服务工程实践-以契约为中心

本文介绍了CSE“以契约为中心”设计理念在管理、设计、开发、测试、部署、治理和运维等软件开发环节上的应用。重点介绍了在微服务治理方面的应用场景。通过这些场景介绍,可以帮助用户更加深入理解服务治理需要解决的一些问题,从而区分不同的微服务框架,以及Istio等在微服务治理方面的差异。 微服务架构有一个核心特征:采用REST进行通信。微服务之间通过网络进行通信,不通过共享文件、数据库、内存等方式进行通信...

华为云官方博客 1827

Spring Cloud应用接入华为云微服务CSE

概述   Spring Cloud应用可以方便的接入CSE提供的基础服务。接入CSE服务有如下好处: 开发者可以专注于业务系统的开发,把精力从中间件的可靠性评估、集群部署、运维监控等复杂的事情中解放出来。 实现业务快速交付和敏捷开发。利用PaaS平台,根据业务规模,动态的调整资源使用,降低业务风险。 下图展现了CSE基础服务、PaaS平台服务和第三方服务的关系: CS...

qq_43620668的博客 4700

华为云PaaS平台微服务治理3微服务引擎CSE

3微服务引擎CSE 3.1华为云PaaS平台介绍 华为云PaaS平台以华为FusionStage2.0项目为基础,基于Docker、Kubernetes等主流开源容器项目,提供了开 发、测试、部署、运维的全流程自动化流水线能力,提供先进的微服务框架和丰富的服务组件,致力于让开发者专 注于代码开发本身,提升开发效率,支持丰富的应用生态,推动企业更好的云化转型。 什么是PaaS? PaaS是云计算...

kai46385076的专栏 4958

基于CSE/ServiceComb的微服务工程实践-多微服务框架演进

开发团队选择同样的开发框架能够更好的进行经验积累和知识共享,从而提高开发效率。在实际项目中,这个过程经常被打破。团队需要根据用户需求的变化,选择更好的开发框架来解决面对的新问题。每个开发团队都不得不采取“持续迭代演进”的方法,来改造旧系统,开发新系统。 在[单体应用微服务改造实践](https://bbs.huaweicloud.com/blogs/17ad483f325f11e9bd5a7c...

微服务技术与实践专栏 1070
上一篇: 单体应用微服务改造实践
下一篇: 基于CSE的微服务架构实践-轻量级架构技术选型
looook
博客等级 码龄20年 147粉丝 195原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值