220 likes | 329 Views
.NET Framework and Web Service:A Profit Combination to Implement and Enhance the IEEE 1451.1 Standard. IEEE Transactions on instrumentaion and measurement,VOL.56,NO.6 December 2007. 學號: 69721502 學生:張欽天. Outline. the 1451.1 Standard served as a reference model
E N D
.NET Framework and Web Service:A Profit Combination to Implement and Enhance the IEEE 1451.1 Standard IEEE Transactions on instrumentaion and measurement,VOL.56,NO.6 December 2007 學號:69721502 學生:張欽天 1/22
Outline • the 1451.1 Standard served as a reference model • the .NET Framework supported the software development • the IVI interface was used to acquire field signals • Web Services provided inter-NCAP communication 2/22
Evolution of DMCSs(Distributes Measurement and Control Systems) 3/22
傳統傳感器檢測系統設計 工程師 Sensor 開發系統 傳感器檢測系統 4/22
1451網絡傳感器檢測系統設計 NCAP 1451智能傳感器 信息網 對傳感器進行自動識別、 學習,完成信息獲取。 5/22
NCAP(Network Capable Application Processor) • Operating System:The operating system manages the NCAP hardware resources offering an execution environment for the applications. • Network Library:The network library provides services to handle network requests, including client/server and publisher/subscriber ports. • Transducer Library:The transducer library provides services to implement the interface between the NCAP and the smart transducer. • IEEE 1451.1 Object Model: The IEEE 1451.1 object model specifies the object classes that are used to design and implement application systems. 7/22
.Net Remoting Formatter:Binary,SOAP Channel:TcpChannel,HttpChannel 9/22
.Net Remoting • Client-activated objects:遠端物件的建立和銷毀是在Client AppDomain控制,當用戶端想要建立遠端物件實體時,戶端端代理程式會建立一個物件參考(object reference),參考到服務端遠端物件,給定一個物件存活的預設生命週期,時間一到,遠端物件詢問用戶端是否讓遠端物件繼續存活,如果是,再給定一段存活時間。如果在生命週期內,用戶端已經不存在了,也是會等到生命週期時間一到,才將遠端物件回收。而不是傳統方式持續性的詢問用戶端或是服務端是否存活。 10/22
.Net Remoting • Server-activated objects:遠端物件的生命週期是由Server AppDomain控管,Server AppDomain是在用戶端呼叫某一個方法才建立遠端物件,不是在用戶端使用new或Activator.GetObject建立遠端物件。Server-activated objects又分為Single call和Singleton二類。 • Single call:一個Single call遠端物件的執行個體,一次只能處理一個用戶端的要求。當用戶端呼叫一個Single call遠端物件,遠端物件會自己建立,執行用戶所需要的方法。Single call是不需要儲存狀態資訊,每個呼叫(call)之間沒辦法留下狀態資訊作溝通。(Application狀態) • Singleton:Single call和Singleton的不同在於生命週期管理,Single call沒有留下狀態資訊,而Singleton會留下狀態資訊,也就是說多個呼叫之間,可以使用保留下來的狀態來溝通。(Session狀態) 11/22
Web Services • Step 0: The client gets the metadata that describes the Web Service. • Step 1: At runtime, the client generates the proxy object based on that metadata. • Step 2: The client calls a method on the proxy. • Step 3: The proxy converts the call to a SOAP message over HTTP and sends it to the server. • Step 4: ASP .NET creates a new instance of the Web Service. • Step 5: ASP .NET calls the specified method on the Web Service. • Step 6: The Web Service returns the results to ASP .NET and then dies. • Step 7: ASP .NET converts the results to a SOAP message and returns to the client via HTTP. • Step 8: The client receives the return value from the proxy. 12/22
ASP.NET Web Services和.Net Remoting的比較 • 作業平台:Web Services是一種標準、規格,用來作應用程式和應用程式之間的溝通,開發人員可以遵守標準在不同的平台上作溝通,來達到系統的整合,這也是Web Services最大的好處之一。而.Net Remoting只能在.Net平台上或支援.Net Remoting的平台上作溝通。 • 傳輸通道:ASP.NET Web Services經由IIS只能透過HTTP傳輸。.Net Remoting存取則可以透過任何傳輸協定,也可以存取任何形式的應用,例如 Windows Form、ASP.NET、Windows Service、Console應用程式,並提供二種通道(Channel)-TCP通道和HTTP通道,而且二種通道可以共存。 13/22
ASP.NET Web Services和.Net Remoting的比較 • 訊息格式:Web Services是將物件序列化成SOAP訊息,SOAP訊息是XML格式,也就是一堆標籤(tag)包覆著資料,可以看作是文字的方式,所以資料量會比較大。.Net Remoting除了可以透過SOAP訊息方式,也可使用二進位訊息傳送方法,二進位訊息量會比SOAP小,所以傳送速度比較快。 • 安全性:ASP.NET Web Services 是透過IIS提供標準的HTTP驗證、授權,好處是不用更改任何程式。在.Net Remoting需採用HTTP通道,而且服務端是在IIS,才能使用IIS所提供的安全性機制;如果是採用TCP 通道,開發人員就自己必須實作驗證、授權等安全性機制。 14/22
ASP.NET Web Services和.Net Remoting的比較 • 架構延展性:Web Services架構較無延展性,只能以值(pass by value)的方式傳遞訊息,並且不支援call back。.Net Remoting 架構較有延展性,開發人員可以自行定義傳輸通道(Transport Channel)、訊息格式(Message Formatter)、代理程式(Proxy),並支援call back、可以值(pass by value)或是參考(pass by reference)傳送物件。 15/22
NCAP PROTOTYPE-Architecture • NCAP Web Services • It is open because it uses XML-based communication; • It is Internet oriented • It is scalable by separating the NCAP application from the ASP .NET infrastructure Web Server The Web Server acts like a “doorman” listening for HTTP requests on port 80 and routing them to the application that will serve them 16/22
NCAP PROTOTYPE-Transducer Interface • IVI(Interchangeable Virual Instruments) • Class Driver • Instrument Driver 17/22
CONCLUSION • 1) Productivity: Commercial frameworks increase productivity because they handle low-level programming details and provide good development tools, which allows usto produce reusable and robust code. • 2) Interoperability: Web Services provide a high degree of interoperability to our solution. Any device with a compatible Web Service middleware can locate and communicate with our prototype. On the field side, signals can be acquired using any IVI-compliant DMM. 22/22