how to design a hardware service use .net remoting
2008-03-24 19:15
501 查看
This is a simple document about Hardware service and purposes of resources lock issue.
About the hardware resources lock issue:
1. Add a member named IsLocked to the Remote Service Object, and this lock member indicates that the Hardware resource is available or already be used by other client application. I think it is better if we add a resource queue to manage several Hardware resources in the future.
2. Add a property named Timeout that specifies the time-out period to the Remote Service Object. I think the default is 5 minutes and the minimum allowed value is 0 minute, if 0 minute it means that the session should never timeout. If the client does not to communicate with the service within the time-out period, then the session ends, and the service tear down the state of the Hardware resource to clean up and free the memory.
Hardware service API overview:
IDevice
The interface of the devices
Acquire ()
Request a device from Hardware service by .net Remoting. If the device hardware is available return true, then initialize device resource and lock this device. Otherwise if the device hardware is busy or unconnected, return false.
Release ()
Called once when the device stops, unlock the device and clean up the resources used by the device.
a) User requests a Signature Pad resource to Hardware Service.
b) If the Signature Pad resource is not available, then pop message “Signature Pad is busy. Please try later.
c) If the Signature Pad resource is available, then get the resource and lock it.
d) User sign on Signature pad.
e) If user never does anything within the time-out period, then session ends, pop message “Session timeout” to user, and Hardware service auto unlock the resource.
f) After finished sign, User will unlock the device resources
About the hardware resources lock issue:
1. Add a member named IsLocked to the Remote Service Object, and this lock member indicates that the Hardware resource is available or already be used by other client application. I think it is better if we add a resource queue to manage several Hardware resources in the future.
2. Add a property named Timeout that specifies the time-out period to the Remote Service Object. I think the default is 5 minutes and the minimum allowed value is 0 minute, if 0 minute it means that the session should never timeout. If the client does not to communicate with the service within the time-out period, then the session ends, and the service tear down the state of the Hardware resource to clean up and free the memory.
Hardware service API overview:
IDevice
The interface of the devices
Acquire ()
Request a device from Hardware service by .net Remoting. If the device hardware is available return true, then initialize device resource and lock this device. Otherwise if the device hardware is busy or unconnected, return false.
Release ()
Called once when the device stops, unlock the device and clean up the resources used by the device.
a) User requests a Signature Pad resource to Hardware Service.
b) If the Signature Pad resource is not available, then pop message “Signature Pad is busy. Please try later.
c) If the Signature Pad resource is available, then get the resource and lock it.
d) User sign on Signature pad.
e) If user never does anything within the time-out period, then session ends, pop message “Session timeout” to user, and Hardware service auto unlock the resource.
f) After finished sign, User will unlock the device resources
相关文章推荐
- How to use an ASP.NET application to query an Indexing Service catalog by using Visual Basic .NET
- How to use ASP.NET State Service
- [Windows Azure] How to use the Windows Azure Blob Storage Service in .NET
- How to use .Net Remoting Configuration files(zz)
- How to use .net Remoting
- How to Use .Net Remoting Using C#
- How to use WinDbg to debug .net programs
- How to invoke Java web service in ASP.net using C#
- 7 TIPS How to Become a Good Hardware Design Engineer
- RESTful WCF Services with No svc file and No config and How to use Service Route
- How to use the WCF Service Configuration Editor
- How to use jquery or ajax to update razor partial view in c#/asp.net for a MVC project
- How to use xxnet for linux
- How to Use Hive-based Registry IN WINCE.NET
- httpurlconnection - How to use java.net.URLConnection to fire and handle HTTP requests? - Stack Overflow
- How to Use Design Patterns(转载)
- How to use HttpWebRequest and HttpWebResponse in .NET
- How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET(利用Ado.net导出到Excel)
- Responsive Web Design: What It Is and How To Use It
- 转:ASP.NET Web Services or .NET Remoting: How to Choose