当前位置: 首页 > news >正文

封面上的网站怎么做的株洲网站设计公司

封面上的网站怎么做的,株洲网站设计公司,腾讯企业邮箱基础版,网站开发框架具体使用方法zooland 我叫它动物园地#xff0c;一个构思很长时间的一个项目。起初只是觉得各种通信框架都封装的很好了#xff0c;但是就是差些兼容#xff0c;防错#xff0c;高可用。同时在使用上#xff0c;不希望有多余的代码#xff0c;像普通接口一样使用就可以了。 基于这些想…zooland 我叫它动物园地一个构思很长时间的一个项目。起初只是觉得各种通信框架都封装的很好了但是就是差些兼容防错高可用。同时在使用上不希望有多余的代码像普通接口一样使用就可以了。 基于这些想法看了很多资料有了很多启发也开发出这样一个版本而且也在实际项目中应用起来了算是小有成就吧。但同时深知一个人的力量有限希望得到整个社区帮助。帮助我完善它让它成为.net 平台下一个不错的选择。 首先介绍一下这个项目。 项目中没有实现自己的通信层代码因为大厂为我们提供了 比如 thrift、grpc、HTTP、wcf、akka.net、netty.net 等等。 其次既然我都支持了这么多种通信框架了那么他们在同一个项目中进行混用也是可以的。比如你的.net 项目内使用wcf 或 netty通信这个时候elk或者搜索引擎为你提供了thrift的接口那么用这个框架会是不错的选择。 项目中 主要的精力放在了LoadBalace、调用错误隔离、重试、缓存多种形式的Cluster、以及如何以最简单的方式让队员通过直链的方式进行开发。 服务注册和发现现在还没有很好的实现想法希望社区能帮忙当然有接口性能监控的能手和调用链或熟悉dapper的能加入我那么我会更高兴。 ioc上无赖选择了Spring.net希望spring.net 早点出.net core版本的这样我会很省心的去开发.net core 版的zooland; autofac 我正在尝试希望能作为spring.net 的替代版本可能是因为习惯了spring.net 感觉autofac我增加我的配置文档的数量这是我不喜欢的 ioc 我也不喜欢对框架内部侵入太多的它会让我觉得我的架构很臃肿让我觉得ioc 不过是虚拟工厂来生产真正的实例而且还要让我到处引用虚拟工厂的类库想想都觉得烦。 计划还是有的 准备在框架层加入过滤器这样CAS 做分布式事务的开源框架也能整合进来缓存也能独立成一个Filter 的实现 比较麻烦的是调用链需要埋点由于支持了多种通信框架而基于dapper论文的追踪访问链条的方式可能导致有些通信框架不支持比较麻烦一直在想tcp/ip协议是不是也有想http一样的可以在访问header里面添加调用链的内容。也希望社区有好的办法。当然能推动大厂们提供的通信框架的改进那就更好了。 有代码有真相下面是用于调用的代码对使用来说绝对easy static void Main(string[] args){var context ContextRegistry.GetContext();var helloServiceThrift context.GetObjectRpcContractThrift.IHelloService();var helloServiceGrpc context.GetObjectRpcContractGrpc.IHelloService();var helloServiceWcf context.GetObjectRpcContractWcf.IHelloService();var helloServiceHttp context.GetObjectRpcContractHttp.IHelloService();var helloServiceAkka context.GetObjectRpcContractAkka.IHelloService();var helloServiceRemoting context.GetObjectRpcContractRemoting.IHelloService();while (true){Console.WriteLine(请选择:wcf | grpc | thrift | http | akka | remoting);var mode Console.ReadLine().ToLower();switch (mode){case wcf:CallWhile((helloword) { WcfHello(helloServiceWcf, helloword); });break;case grpc:CallWhile((helloword) { GrpcHello(helloServiceGrpc, helloword); });break;case thrift:CallWhile((helloword) { ThriftHello(helloServiceThrift, helloword); });break;case http:CallWhile((helloword) { HttpHello(helloServiceHttp, helloword); });break;case akka:CallWhile((helloword) { AkkaHello(helloServiceAkka, helloword); });break;case remoting:CallWhile((helloword) { RemotingHello(helloServiceRemoting, helloword); });break;case all:for (int i 0; i 3; i){Task.Run(() {try{WcfHello(helloServiceWcf);}catch (Exception ex){throw ex;}});Task.Run(() {try{GrpcHello(helloServiceGrpc);}catch (Exception ex){throw ex;}});Task.Run(() {try{ThriftHello(helloServiceThrift);}catch (Exception ex){throw ex;}});Task.Run(() {try{HttpHello(helloServiceHttp);}catch (Exception ex){throw ex;}});Task.Run(() {try{AkkaHello(helloServiceAkka);}catch (Exception ex){throw ex;}});}break;}if (mode end){break;}}}private static void ThriftHello(RpcContractThrift.IHelloService helloServiceThrift, string helloword world){var callNameVoid helloServiceThrift.CallNameVoid();Console.WriteLine(callNameVoid);helloServiceThrift.CallName(helloword);Console.WriteLine(CallName called);helloServiceThrift.CallVoid();Console.WriteLine(CallVoid called);var hello helloServiceThrift.Hello(helloword);Console.WriteLine(hello);var helloResult helloServiceThrift.SayHello(helloword perfect world);Console.WriteLine(${helloResult.Name},{helloResult.Gender},{helloResult.Head});helloResult.Name helloword show perfect world;var showResult helloServiceThrift.ShowHello(helloResult);Console.WriteLine(showResult);}private static void GrpcHello(RpcContractGrpc.IHelloService helloServiceGrpc, string helloword world){var callNameVoid helloServiceGrpc.CallNameVoid(new RpcContractGrpc.Void());Console.WriteLine(callNameVoid);helloServiceGrpc.CallName(new RpcContractGrpc.NameResult { Name helloword });Console.WriteLine(CallName called);helloServiceGrpc.CallVoid(new RpcContractGrpc.Void());Console.WriteLine(CallVoid called);var hello helloServiceGrpc.Hello(new RpcContractGrpc.NameResult { Name helloword });Console.WriteLine(hello.Name);var helloResult helloServiceGrpc.SayHello(new RpcContractGrpc.NameResult { Name ${helloword} perfect world });Console.WriteLine(${helloResult.Name},{helloResult.Gender},{helloResult.Head});helloResult.Name helloword show perfect world;var showResult helloServiceGrpc.ShowHello(helloResult);Console.WriteLine(showResult.Name);}private static void WcfHello(RpcContractWcf.IHelloService helloServiceWcf, string helloword world){var callNameVoid helloServiceWcf.CallNameVoid();Console.WriteLine(callNameVoid);helloServiceWcf.CallName(helloword);Console.WriteLine(CallName called);helloServiceWcf.CallVoid();Console.WriteLine(CallVoid called);var helloWcf helloServiceWcf.Hello(helloword);Console.WriteLine(helloWcf);var helloResultWcf helloServiceWcf.SayHello(${helloword} perfect world);Console.WriteLine(${helloResultWcf.Name},{helloResultWcf.Gender},{helloResultWcf.Head});helloResultWcf.Name helloword show perfect world;var showResultWcf helloServiceWcf.ShowHello(helloResultWcf);Console.WriteLine(showResultWcf);}private static void HttpHello(RpcContractHttp.IHelloService helloServiceHttp, string helloword world){var callNameVoid helloServiceHttp.CallNameVoid();Console.WriteLine(callNameVoid);helloServiceHttp.CallName(helloword);Console.WriteLine(CallName called);helloServiceHttp.CallVoid();Console.WriteLine(CallVoid called);var helloWcf helloServiceHttp.Hello(helloword);Console.WriteLine(helloWcf);var helloResultWcf helloServiceHttp.SayHello(${helloword} perfect world);Console.WriteLine(${helloResultWcf.Name},{helloResultWcf.Gender},{helloResultWcf.Head});helloResultWcf.Name helloword show perfect world;var showResultWcf helloServiceHttp.ShowHello(helloResultWcf);Console.WriteLine(showResultWcf);}private static void AkkaHello(RpcContractAkka.IHelloService akkaServiceHttp,string helloword world){var callNameVoid akkaServiceHttp.CallNameVoid();Console.WriteLine(callNameVoid);akkaServiceHttp.CallName(new RpcContractAkka.NameResult { Name helloword });Console.WriteLine(CallName called);akkaServiceHttp.CallVoid();Console.WriteLine(CallVoid called);var hello akkaServiceHttp.Hello(new RpcContractAkka.NameResult { Name helloword });Console.WriteLine(hello.Name);var helloResult akkaServiceHttp.SayHello(new RpcContractAkka.NameResult { Name ${helloword} perfect world });Console.WriteLine(${helloResult.Name},{helloResult.Gender},{helloResult.Head});helloResult.Name helloword show perfect world;var showResultWcf akkaServiceHttp.ShowHello(helloResult);Console.WriteLine(showResultWcf.Name);}private static void RemotingHello(RpcContractRemoting.IHelloService remotingServiceHttp, string helloword world){var callNameVoid remotingServiceHttp.CallNameVoid();Console.WriteLine(callNameVoid);remotingServiceHttp.CallName(helloword);Console.WriteLine(CallName called);remotingServiceHttp.CallVoid();Console.WriteLine(CallVoid called);var hello remotingServiceHttp.Hello(helloword);Console.WriteLine(hello);var helloResult remotingServiceHttp.SayHello(${helloword} perfect world);Console.WriteLine(${helloResult.Name},{helloResult.Gender},{helloResult.Head});helloResult.Name helloword show perfect world;var showResult remotingServiceHttp.ShowHello(helloResult);Console.WriteLine(showResult);}private static void CallWhile(Actionstring map){var helloword world;while (true){try{map(helloword);var mode Console.ReadLine().ToLower();helloword mode;if (helloword end){break;}}catch (Exception ex){Console.WriteLine(ex.StackTrace);}}}} 目前只支持了spring.net ,有autofac的高手欢迎加入 希望为一部分使用.net framework 的WCF做通信层框架转微服务架构作为一个不错的并且平滑的升级选择。 新技术不要怕不稳定源码都有了而且框架结构这么简单大胆用有问题了可以联系技术支持啥。 奉上项目开源地址 https://github.com/wutao0315/zooland 现在还没有搞明白怎么编译好一个版本怎么弄到nuget上而且版本管理经验也欠缺也需要依赖社区了。 联系作者 mail:wutao0315qq.com qq:1164636434 想加入我的邮件给我吧欢迎每一个热爱编程的同学。转载于:https://www.cnblogs.com/jweiswu/p/zooland.html
http://www.pierceye.com/news/658649/

相关文章:

  • 惠州建设工程交易网站网络营销专业的职业生涯规划
  • 网站页面架构图阿里云的企业网站建设
  • 做微商网站有专门做网站的公司吗
  • 潍坊网站建设方案托管天津建站网
  • 前端如何做双语网站信誉好的唐山网站建设
  • 创建网站目录应注意电子商务类网站设计
  • 哪个网站专做进口商品的企业网站建设的方案ppt
  • 网站结构如何优化wordpress4.7.10漏洞
  • 官方网站举例流量型网站
  • DW个人网站怎么做长沙民企人才网
  • 电脑做网站教学友情链接交易
  • 为什么选php语言做网站重庆网站优化seo公司
  • 仿站侵权吗字体设计图片
  • 王建设医生个人网站智能网站搭建
  • 博物馆网站做的好的山东企业站点seo
  • 网站做视频怎么赚钱的平面设计公司哪家好
  • 合作建设网站协议php 个人网站 源码
  • 广州外贸营销型网站手机网站如何推广
  • 市总工会网站建设经验材料湖州建设局投标网站
  • ftp网站备份网上北京网站制作公司
  • ps海报模板素材免费怎样给网站做关键词优化
  • 做网站套餐wordpress 显示excel
  • 免费网站搭建临西做网站报价
  • 网站搭建详细步骤app应用网站html5模板下载
  • 苏州网站制作工作室宜宾网站开发公司
  • 哪些网站使用vue做的自己做服务器和网站
  • 怎样查看网站备案号自己录入数据做问卷的网站
  • 怎么提高网站的百度收录网页设计师考试报名
  • 北京网站建设公司联系方式常德网站建设专业品牌
  • 福州网站设计哪家做的好男科医院网站开发策划