[原创]我的WCF之旅(2):Endpoint Overview

.net WCF Windows Communication Foundation(WCF)是由微软发展的一组数据通信的应用程序开发接口,可以翻译为Windows通讯接口,它是.NET框架的一部分。由 .NET Framework 3.0 开始引入WCF合并了Web服务、.net Remoting、消息队列和Enterprise Services的功能并集成在Visual Studio中。 阅读详情

WCF实际上是构建了一个框架,这个框架实现了在互联系统中各个Application之间如何通信。使得Developers和Architect在构建分布式系统中,无需在考虑如何去实现通信相关的问题,更加关注与系统的业务逻辑本身。而在WCF Infrastructure中,各个Application之间的通信是由Endpoint来实现的。

Endpoint的结构

Endpoint包含以下4个对象:

  • Address: Address通过一个URI唯一地标识一个Endpoint,并告诉潜在的WCF service的调用者如何找到这个Endpoint。所以Address解决了Where to locate the WCF Service?
  • Binding: Binding实现在Client和Service通信的所有底层细节。比如Client与Service之间传递的Message是如何编码的——text/XML, binary,MTOM;这种Message的传递是采用的哪种Transport——TCP, Http, Named Pipe, MSMQ; 以及采用怎样的机制解决Secure Messaging的问题——SSL,Message Level Security。所以Binding解决的是How to communicate with service?
  • Contract: Contract的主要的作用是暴露某个WCF Service所提供的所有有效的Functionality。从Message Exchange的层面上讲,Contract实际上是抱每个Operation转化成为相对应的Message Exchange Pattern——MEP(Request/Response; One-way; Duplex)。所以Contract解决的是What functionalities do the Service provide?
  •  Behavior: Behavior的主要作用是定制Endpoint在运行时的一些必要的Behavior。比如Service 回调Client的Timeout;Client采用的Credential type;以及是否支持Transaction等。

当我们Host一个WCF Service的时候,我们必须给他定义一个或多个Endpoint,然后service通过这个定义的Endpoint进行监听来自Client端的请求。当我们的Application需要调用这个Service的时候,因为Client 和Service是通过Endpoint的进行通信的, 所以我们必须为我们的Application定义Client端的Endpoint。只有当Client的Endpoint和Service端某个Endpoint相互匹配(Service端可以为一个Service定义多个Endpoint),Client端的请求才能被Service端监听到。也就是说,我们只有在Client具有一个与Service端完全匹配的Endpoint,我们才能调用这个Service。而这种匹配是比较严格的,比如从匹配Address方面,Client端和Service端的Endpoint Address不仅仅在URI上要完全匹配Service, 他们的Headers也需要相互匹配。对于Binding, 一般地,Client需要有一个与Service端完全一样的Binding,他们之间才能通信。 

Sample

首先给一个Sample,以便我们对在WCF Service Aplication中如何定义Endpoint有一个感性的认识。整个Solution的结构参照下图,我的上一篇Blog([原创]我的WCF之旅(1):创建一个简单的WCF程序 )中有详细的介绍。你也可以通过后面的Link下载相应的Source Code(http://www.cnblogs.com/files/artech/Artech.WCFService.zip )


1. Service Contract:Artech..WCfService.Contract/ServiceContract/IGeneralCalculator.cs

using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.ServiceModel;

namespace  Artech.WCFService.Contract
{
    [ServiceContract]
    
public interface IGeneralCalculator
    
{
        [OperationContract]
        
double Add(double x, double y);
    }

}

2. Service: Artech.WCFSerice.Service/GeneralCalculatorService.cs

using  System;
using  System.Collections.Generic;
using  System.Text;

using  Artech.WCFService.Contract;

namespace  Artech.WCFService.Service
{
    
public class GeneralCalculatorService:IGeneralCalculator
    
{
        
IGeneralCalculator Members
    }

}


3. Hosting: Artech.WCFService.Hosting/Program.cs

using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.ServiceModel;
using  Artech.WCFService.Contract;
using  Artech.WCFService.Service;
using  System.ServiceModel.Description;

namespace  Artech.WCFService.Hosting
{
    
class Program
    
{
        
static void Main(string[] args)
        
{
            
//HostCalculatorServiceViaCode();
            HostCalculatorSerivceViaConfiguration();
        }


        
/// <summary>
        
/// Hosting a service using managed code without any configuraiton information. 
        
/// Please note that the related configuration data should be removed before calling the method.
        
/// </summary>

        static void HostCalculatorServiceViaCode()
        
{
            Uri httpBaseAddress 
= new Uri("http://localhost:8888/generalCalculator");
            Uri tcpBaseAddress 
= new Uri("net.tcp://localhost:9999/generalCalculator");
            
            
using (ServiceHost calculatorSerivceHost = new ServiceHost(typeof(GeneralCalculatorService), httpBaseAddress, tcpBaseAddress))
            
{           
                BasicHttpBinding httpBinding 
= new BasicHttpBinding();
                NetTcpBinding tcpBinding 
= new NetTcpBinding();

                calculatorSerivceHost.AddServiceEndpoint(
typeof(IGeneralCalculator), httpBinding, string.Empty);
                calculatorSerivceHost.AddServiceEndpoint(
typeof(IGeneralCalculator), tcpBinding, string.Empty);

                ServiceMetadataBehavior behavior 
= calculatorSerivceHost.Description.Behaviors.Find<ServiceMetadataBehavior>();
                
{
                    
if(behavior == null)
                    
{
                        behavior 
= new ServiceMetadataBehavior();
                        behavior.HttpGetEnabled 
= true;
                        calculatorSerivceHost.Description.Behaviors.Add(behavior);
                    }

                    
else
                    
{
                        behavior.HttpGetEnabled 
= true;
                    }

                }


                calculatorSerivceHost.Opened 
+= delegate
                
{
                    Console.WriteLine(
"Calculator Service has begun to listen  ");
                }
;

                calculatorSerivceHost.Open();

                Console.Read();
            }

        }


        
static void HostCalculatorSerivceViaConfiguration()
        
{
            
using (ServiceHost calculatorSerivceHost = new ServiceHost(typeof(GeneralCalculatorService)))
            
{               
                calculatorSerivceHost.Opened 
+= delegate
                
{
                    Console.WriteLine(
"Calculator Service has begun to listen  ");
                }
;

                calculatorSerivceHost.Open();

                Console.Read();
            }

        }
        
    }

}

4. Service.svc: http://localhost/WCFService/ GeneralCalculatorService.svc

< %@ ServiceHost  Language ="C#"  Debug ="true"  Service ="Artech.WCFService.Service.GeneralCalculatorService"  % >

5. Client: Artech.WCFService.Client/ GeneralCalculatorClient.cs & Program.cs 

using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.ServiceModel;
using  System.ServiceModel.Channels;
using  Artech.WCFService.Contract;

namespace  Artech.WCFService.Client
{
    
class GeneralCalculatorClient:ClientBase<IGeneralCalculator>,IGeneralCalculator
    
{
        
public GeneralCalculatorClient()
            : 
base()
        
{ }

        
public GeneralCalculatorClient(string endpointConfigurationName)
            : 
base(endpointConfigurationName)
        
{ }

        
public GeneralCalculatorClient(Binding binding, EndpointAddress address)
            : 
base(binding, address)
        
{ }

        
IGeneralCalculator Members
    }

}


using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.ServiceModel;
using  System.ServiceModel.Channels;
using  Artech.WCFService.Contract;

namespace  Artech.WCFService.Client
{
    
class Program
    
{
        
static void Main()
        
{
            
try
            
{
                
//InvocateCalclatorServiceViaCode();

                InvocateCalclatorServiceViaConfiguration();
            }

            
catch (Exception ex)
            
{
                Console.WriteLine(ex.Message);
            }


            Console.Read();    
        }


        
static void InvocateCalclatorServiceViaCode()
        
{
            Binding httpBinding 
= new BasicHttpBinding();
            Binding tcpBinding 
= new NetTcpBinding();

            EndpointAddress httpAddress 
= new EndpointAddress("http://localhost:8888/generalCalculator");
            EndpointAddress tcpAddress 
= new EndpointAddress("net.tcp://localhost:9999/generalCalculator");
            EndpointAddress httpAddress_iisHost 
= new EndpointAddress("http://localhost/wcfservice/GeneralCalculatorService.svc");

            Console.WriteLine(
"Invocate self-host calculator service ");

            
Invocate Self-host service

            Console.WriteLine(
"/n/nInvocate IIS-host calculator service ");

            
Invocate IIS-host service
        }


        
static void InvocateCalclatorServiceViaConfiguration()
        
{
            Console.WriteLine(
"Invocate self-host calculator service ");

            
Invocate Self-host service

            Console.WriteLine(
"/n/nInvocate IIS-host calculator service ");

           
Invocate IIS-host service
        }

    }

}


6. Self-Hosting Configuration: Artech.WCFService.Hosting/App.config

<? xml version="1.0" encoding="utf-8"  ?>
< configuration >
  
    
< system .serviceModel >
        
< behaviors >
            
< serviceBehaviors >
                
< behavior  name ="calculatorServieBehavior" >
                    
< serviceMetadata  httpGetEnabled ="true"   />
                
</ behavior >
            
</ serviceBehaviors >
        
</ behaviors >
      
        
< services >
            
< service  behaviorConfiguration ="calculatorServieBehavior"  name ="Artech.WCFService.Service.GeneralCalculatorService" >
                 
< endpoint  address =""  binding ="basicHttpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator" >
                
</ endpoint >
                
< endpoint  address =""  binding ="netTcpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator"   />
                
< host >
                    
< baseAddresses >
                        
< add  baseAddress ="http://localhost:8888/generalcalculator"   />
                        
< add  baseAddress ="net.tcp://localhost:9999/generalCalculator"   />
                    
</ baseAddresses >
                
</ host >
            
</ service >
        
</ services >
    
</ system.serviceModel >
</ configuration >

7. IIS-Host Configuration:

<? xml version="1.0" ?>
< configuration  xmlns ="http://schemas.microsoft.com/.NetConfiguration/v2.0" >
  
< system .serviceModel >
    
< behaviors >
      
< serviceBehaviors >
        
< behavior  name ="calculatorServiceBehavior" >
          
< serviceMetadata  httpGetEnabled  ="true" ></ serviceMetadata >
        
</ behavior >
      
</ serviceBehaviors >
    
</ behaviors >

    
< services >
      
< service  name ="Artech.WCFService.Service.GeneralCalculatorService"  behaviorConfiguration ="calculatorServiceBehavior" >
        
< endpoint  binding ="basicHttpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator" ></ endpoint >
      
</ service >
    
</ services >
  
</ system.serviceModel >
  
    
< system .web >
        
< compilation  debug ="true" >
            
< assemblies >
                
< add  assembly ="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                
< add  assembly ="Microsoft.Transactions.Bridge, Version=3.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                
< add  assembly ="SMDiagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                
< add  assembly ="System.IdentityModel.Selectors, Version=3.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                
< add  assembly ="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                
< add  assembly ="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                
< add  assembly ="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                
< add  assembly ="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                
< add  assembly ="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></ assemblies ></ compilation >
    
</ system.web >
</ configuration >

8. Client configuration: Artech.WCFService.Client/App.config

<? xml version="1.0" encoding="utf-8"  ?>
< configuration >
  
< system .serviceModel >
    
< client >
    
< endpoint  address ="http://localhost:8888/generalCalculator"  binding ="basicHttpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator"  name ="selfHostEndpoint_http" />
       
< endpoint  address ="net.tcp://localhost:9999/generalCalculator"  binding ="netTcpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator"  name ="selfHostEndpoint_tcp" />
       
< endpoint  address ="http://localhost/wcfservice/GeneralCalculatorService.svc"  binding ="basicHttpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator"  name ="iisHostEndpoint" />
    
</ client >
  
</ system.serviceModel >
 
</ configuration >

如何在Application中定义Endpoint

对于Self-Host的Service,绝大部分的Endpoint相关的信息都具有两种定义方式——Managed Code 和Configuration。而对于把Service Host到IIS中的情况, Endpoint的信息一般虚拟根目录下的Web.Config中定义。一般的我们我们不推荐使用代码的方式Host和调用Service,这主要是基于以下的理由。首先我们开发的环境往往与部署的环境不尽相同,才用configuration的方式是的我们可以在部署的时候通过修改配置文件以适应新的需要。其次,对于不要出现的新的需要,比如对于一个原来只供Internet内部使用的Service,我们一般会定义一个基于TCP的Endpoint,现在出现来自于Internet的潜在用户,我们只需要通过修改Config文件的方式为这个Service添加一个新的基于Http的Endpoint就可以了。 把Endpoint的信息写在config文件中的优势在于,修改config文件的内容是不需要重新编译和重新部署的。相应的定义方式清参照以上的Sample。

下面我们来看看在host 一个Service的时候,置于配置文件的信息是如何起作用的。在上面的例子中我们通过下面一段代码Host一个Serivice(对应得Service Type是GeneralCalculatorService)。

using  (ServiceHost calculatorSerivceHost  =   new  ServiceHost( typeof (GeneralCalculatorService)))
{               
        calculatorSerivceHost.Opened 
+= delegate
         
{
              Console.WriteLine(
"Calculator Service has begun to listen  ");
          }
;
         calculatorSerivceHost.Open();
         Console.Read();
}


下面是Service相关的配置信息:

< services >
            
< service  behaviorConfiguration ="calculatorServieBehavior"  name ="Artech.WCFService.Service.GeneralCalculatorService" >
                 
< endpoint  address =""  binding ="basicHttpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator" >
                
</ endpoint >
                
< endpoint  address =""  binding ="netTcpBinding"  contract ="Artech.WCFService.Contract.IGeneralCalculator"   />
                
< host >
                    
< baseAddresses >
                        
< add  baseAddress ="http://localhost:8888/generalcalculator"   />
                        
< add  baseAddress ="net.tcp://localhost:9999/generalCalculator"   />
                    
</ baseAddresses >
                
</ host >
            
</ service >
</ services >

首先我们创建一个ServiceHost对象calculatorSerivceHost,同时指定对用的Service Type 信息(typeof(GeneralCalculatorService))。WCF Infrastructure为在配置文件在Services Section寻找是否有相对用的service定义。在这个例子中,他会找到一个name属性为Artech.WCFService.Service.GeneralCalculatorService的Service。然后他会根据定义在Service中的Endpoint定义为calculatorSerivceHost添加相应的Endpoint。 如果有对应的Endpoint Behavior设置存在于配置文件中,这些Behavior也会设置到改Endpoint中。最后调用Open方法,calculatorSerivceHost开始监听来自Client端的请求。

Address

每一个Endpoint都必须有一个Address,Address定位和唯一标志一个Endpoint。在Managed code 中,Address由System.ServiceModel.EndpointAddress对象来表示。下面是一个Adress的结构:

  • URI:指定的Endpoint的Location。URI对于Endpoint是必须的。
  • Identity:当另一个Endpoint与此Endpoint进行消息交互时,可以获取该Identity来Authenticate正在与之进行消息交互的Endpoint是否是它所希望的。Identity对于endpoint是可选的。
  • Headers:Address可以包含一些可选的Headers, 这些header最终会加到相应的Soap Message的Header中。Header存放的多为Address相关的信息,用于进行Addressing Filter。 

Address的主要作用就是同过Uri为Service提供一个监听Address。但在某些特殊的场景中,我们可以借助Address的Headers提供一些扩展的功能。在大多数的情况下Client可以直接访问Service,换句话说,如果我们把Message 传递的路径看成是以系列连续的节点(Node)的话,Message直接从Client所在的节点(Node)传递到最终的Service的节点。但在某些情况下,考虑的实现负载平衡,安全验证等因素,我们需要在Client和最终的Service之间加入一些中间节点(Intermediaries),这些中间节点可以在Message到达最终Service Node之前作一些工作,比如为了实现负载平衡,它可以把Message Request分流到不同的节点——Routing;为了在Message达到最终Node之前,验证Client是否是一个合法的请求,他可以根据Message存储的Credential的信息验证该请求——Authentication。
这些Intermediaries操作的一般不会是Message Body的内容(大多数情况下他们已经被加密),而是Message Header内容。他们可以修改Header的内容,也可以加入一些新的Header。所以为了实现Routing,我们需要在Message加入一些Addressing相关的内容,为了实现Authentication我们需要加入Client Credential的信息, 而这些信息都放在Header中。实际上你可以把很多内容加到Header中。
我们可以通过config文件加入这些Header:

< service  behaviorConfiguration ="calculatorServieBehavior"  name ="Artech.WCFService.Service.DuplexCalculatorService" >
                
< endpoint  binding ="wsDualHttpBinding"  contract ="Artech.WCFService.Contract.IDuplexCalculator" >
                    
< headers >
                        
< role > admin </ role >
                    
</ headers >
                
</ endpoint >
                
< host >
                    
< baseAddresses >
                        
< add  baseAddress ="http://localhost:7777/DuplexCalculator"   />
                    
</ baseAddresses >
                
</ host >
            
</ service >

< client >
      
< endpoint  address ="http://localhost/WCFService/SessionfulCalculatorService.svc"
        binding
="wsHttpBinding"  bindingConfiguration =""  contract ="Artech.WCFService.Contract.ISessionfulCalculator"   >
< headers >
         
< role > admin </ role >
                    
</ headers >
                
</ endpoint >
    
</ client >

Binding

WCF,顾名思义就是实现了分布式系统中各Application之间的Communication的问题。上面我们说过, Client和Service之间的通信完全有他们各自的Endpoint的担当。Address解决了寻址的问题,通过Address,Client知道在哪里可以找到它所希望的Service。但是知道了地址,只是实现的通信的第一步。

对于一个基于SOA的分布式系统来说,各Application之间的通信是通过Message Exchange来实现的。如何实现在各个Application之间 进行Message的交互,首先需要考虑的是采用怎样的Transport,是采用Http呢,还是采用TCP或是其他,比如Named Pipe、MSMQ。其次需要考虑的是Message应该采取怎样的编码,是text/XML呢,还是Binary,或是MTOM;此外,对于一个企业级的分布式应用,Security与Robustness是我们必须考虑的问题——我们应该采用Transport Level的Security(SSL)还是Message Level的Security;如何确保我们的Message的传递是可靠的(Reliable Messaging); 如何把在各application中执行的操作纳入同一个事物中(Transaction)。而这一些都是Binding需要解决的问题。所以我们可以说Binding实现了Client和Service通信的所有底层细节。

在WCF中,Binding一个Binding Element的集合,每个Binding Element解决Communication的某一个方面。所有的Binding Element大体上可以分为以下3类:

1. Transport Binding Element:实现Communication的Transport选取,每个Binding必须包含一格Transport Element。

2. Encoding Binding Element:解决传递数据的编码的问题,每个Binding必须包含一个Encoding Element,一般由Transport Binding Element来提供。

3. Protocol Binding Element:解决Security,Reliable Messaging和Transaction的问题。

下边这个表格列出了Binding中的各个层次结构。

Layer

Options

Required

Transactions

TransactionFlowBindingElement

No

Reliability

ReliableSessionBindingElement

No

Security

SecurityBindingElement

No

Encoding

Text, Binary, MTOM, Custom

Yes

Transport

TCP, Named Pipes, HTTP, HTTPS, MSMQ, Custom

Yes


WCF相关内容:
[原创]我的WCF之旅(1):创建一个简单的WCF程序
[原创]我的WCF之旅(2):Endpoint Overview
[原创]我的WCF之旅(3):在WCF中实现双向通信(Bi-directional Communication)
[原创]我的WCF之旅(4):WCF中的序列化(Serialization)- Part I
[原创]我的WCF之旅(4):WCF中的序列化(Serialization)- Part II
[原创]我的WCF之旅(5):Service Contract中的重载(Overloading)
[原创]我的WCF之旅(6):在Winform Application中调用Duplex Service出现TimeoutException的原因和解决方案
[原创]我的WCF之旅(7):面向服务架构(SOA)和面向对象编程(OOP)的结合——如何实现Service Contract的继承
[原创]我的WCF之旅(8):WCF中的Session和Instancing Management
[原创]我的WCF之旅(9):如何在WCF中使用tcpTrace来进行Soap Trace
[原创]我的WCF之旅(10): 如何在WCF进行Exception Handling
[原创]我的WCF之旅(11):再谈WCF的双向通讯-基于Http的双向通讯 V.S. 基于TCP的双向通讯

[原创]我的WCF之旅(12):使用MSMQ进行Reliable Messaging
[原创]我的WCF之旅(13):创建基于MSMQ的Responsive Service

Tinder养号防封攻略来了:最新Tinder养号流程和运营攻略 今天,我就来给大家分享一下Tinder养号的具体操作,以及针对Tinder账号被封的一些常见问题为大家做个答疑。 阅读详情

相关推荐

Ansys Zemax | 利用OpticStudio实现衍射光学元件(DOE)与超透镜(metalens)的高效建模与验证

本文详细介绍了如何利用Ansys Zemax的OpticStudio软件实现衍射光学元件(DOE)与超透镜(metalens)的高效建模与验证。通过混合建模策略、相位面等效建模法、POP与FDTD联合验证等多种方法,帮助工程师快速解决跨尺度仿真难题,提升设计效率与精度。文章还分享了实战案例与高级技巧,适用于AR、医疗内窥镜等应用场景。

weixin_29268331的博客 501

WCF终结点——终结点地址(EndpointAddress)

终结点的地址的Uri属性作为终结点地址的唯一标示。 包括客户端终结点和服务端终结点。 一、服务端终结点: 服务端的终结点通过宿主的添加方法暴露出来,从而成为可以调用的资源。 下面是将服务绑定到宿主的代码: 定义宿主时使用的是契约的实现类,也即服务类,添加终结点到宿主的使用的是契约接口。 1.1代码实现 代码实现往指定服务的宿主上添加终结点: 1.2配置实现 下面通过配...

weixin_34037977的博客 745

【实战解析】RTL8306MB交换芯片驱动开发中的RMII接口调试陷阱

本文深入剖析了RTL8306MB交换芯片驱动开发中RMII接口的典型调试陷阱。通过一个工业网关项目的实战案例,揭示了因硬件原理图设计疏忽导致TX_EN与CRS_DV信号线错接,从而引发网络“哑火”的根本原因。文章详细展示了使用示波器从时钟、数据到控制信号的系统性排查方法,并总结了关键的设计警示与自查清单,为嵌入式网络开发中的软硬件协同调试提供了宝贵经验。

qqq44的博客 1029

WCF初探-21:WCF终结点(endpoint)

WCF终结点概述 在之前文章的示例中,我们都是通过配置服务的终结点(endpoint)发布的服务,供客户端调用,这是因为WCF服务的所有通信都是通过该服务的终结点进行的。每个终结点(endpoint)包含四个属性。 一个指示可以查找终结点的位置的地址。 一个指定客户端如何与终结点进行通信的绑定。 一个标识可用操作的协定。 一组指定终结点的本地实现细节的行为。   ...

weixin_30800807的博客 446

避开这些坑!医疗影像数据增强的6个安全操作指南(附PyTorch代码)

本文详细介绍了医疗影像数据增强的六大安全准则,包括解剖结构守恒、密度值物理意义保留和病灶特征保护等关键原则,并提供了PyTorch实战代码。通过具体案例和参数建议,帮助开发者在肺结节检测和MRI分割等医疗AI应用中实现安全有效的数据增强,避免因不当操作导致的诊断误差。

cola5的博客 555

面板数据分析中的随机前沿软件FRONTIER Version 4.1应用

随机前沿模型是一种用于评估单位效率的统计方法。它考虑了输入和输出的随机性,允许我们在效率评估中引入不确定性。随机前沿模型通常用于评估生产单位、金融机构、医院等各种类型的决策单元的效率。FRONTIER是一个广泛使用的随机前沿分析软件,具有用户友好的界面和强大的功能。它提供了估计效率、前沿分析和模型比较的工具,使用户能够深入研究单位的效率和绩效。面板数据是一种包含多个单位(通常是时间序列数据)的数据类型,可以用于分析单位在不同时间点的变化和效率。

目标检测专栏持续更新中,改进YOLO系列通用,适用v5、v7、v8、所有博客均是团队原创博客,所有文章禁止转载,违者必究。 2982

我的WCF之旅(2):Endpoint Overview

WCF实际上是构建了一个框架,这个框架实现了在互联系统中各个Application之间如何通信。使得Developers和Architect在构建分布式系统中,无需在考虑如何去实现通信相关的问题,更加关注与系统的业务逻辑本身。而在WCFInfrastructure中,各个Application之间的通信是由Endpoint来实现的。 Endpoint的结构 Endpoint包含以下4...

dianzudi1839的博客 130

轴承寿命预测实战:手把手教你用IEEE PHM2012数据集训练模型(附Python代码)

本文详细介绍了如何利用IEEE PHM2012数据集构建轴承剩余寿命预测模型,从数据预处理、特征工程到LSTM模型训练与部署,提供了完整的Python代码实现。通过实战案例,帮助读者掌握预测性维护中的关键技术,提升工业设备的运行安全与效率。

weixin_29186249的博客 311

[WCF学习笔记] Endpoint

WCF提供了一个框架/平台来构建分布的互联系统,WCF是SOA的,是面向服务的。但一个Service必须至少包含一个Endpoint,否则,试想一下,客户端连到哪里来获得一个Service?一个服务(Service)必须告诉外部在某个Endpoint提供什么和沟通什么。换句话说:“服务就是: 在某个地方、使用某种通讯协议、传输某种数据类型的消息”。   客户只能通过服务的Endpoint来访问...

weixin_34378045的博客 304

教你搞懂RT-Thread的移植和配置ENV工具环境

RT-Thread的移植和配置ENV工具环境

Troubadour~的博客 8263

Unity开源游戏源码精选:17个亲测可运行教学项目

Unity游戏开发中,掌握真实项目结构与工程实践远比熟记API更重要。本文围绕‘Unity开源项目’和‘游戏源码’两大核心概念,解析高质量开源资源的本质特征——结构清晰、逻辑可溯、修改即时反馈。从基础的MonoBehaviour生命周期组织,到进阶的ScriptableObject数据驱动、事件总线解耦,再到架构级的DOTS ECS设计与网络同步模式,技术价值在于将抽象原理落地为可调试、可验证、可迁移的代码范式。适用于新手建立开发直觉、中级开发者突破系统设计瓶颈,以及团队构建可维护框架。所有项目均基于Uni

weixin_31528001的博客 720

wcf 值 endpoint

WCF实际上是构建了一个框架,这个框架实现了在互联系统中各个Application之间如何通信。使得Developers和Architect在构建分布式系统中,无需在考虑如何去实现通信相关的问题,更加关注与系统的业务逻辑本身。而在WCF Infrastructure中,各个Application之间的通信是由Endpoint来实现的。 Endpoint的结构 Endpoint包含以下4个对象:

u010158775的专栏 621

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

WCF Learning(2):Endpoint Overview

WCF实际上是构建了一个框架,这个框架实现了在互联系统中各个Application之间如何通信。使得Developers和Architect在构建分布式系统中,无需在考虑如何去实现通信相关的问题,更加关注与系统的业务逻辑本身。而在WCF Infrastructure中,各个Application之间的通信是由Endpoint来实现的。 Endpoint的结构 Endpoint包含以下4个对象:

技术发烧友 674

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

上一篇: [原创]我的WCF之旅(1):创建一个简单的WCF程序
下一篇: [原创].NET Remoting: 如何通过Remoting实现双向通信(Bidirectional Communication)
artech
博客等级 码龄20年 20粉丝 155原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值