The winfrom team also made some comments when developing sometimes online POS systems.

Source: Internet
Author: User
1. We recommend that you use Windows Services instead of WebServices;

Because WebServices are based onXMLApplication,Web ServicesInherent in possessionXMLWhile bringing all the advantages, it inevitably inheritsXMLSome restrictions.

  • Web ServicesUsually a large numberCPUResources. BecauseXMLData must be processed in multiple steps before it can be used by the system. First, verify (Validate) To check whether the format is correct.XMLAnd according to the applicationProgramDefinition (DTDOrSchema) Check whether it complies with the semantic specification, and then parse (Parse), FromXMLThe document breaks down a single element, and finally converts it into the Binary Expression required by the application (for example,12"Convert to integer12).

  • Web ServicesIt also means occupying a large amount of memory resources. In progressXMLDuring parsing, a large number of temporary memory objects are generated. Especially in ProcessingDomObject. These large numbers of temporary objectsJavaThis type of language and system for automatic memory recovery is actually a burden. A large number of temporary objects will make the system reclaim the memory at intervals, thus reducing the system performance. Of course, there areWeb ServicesSuchAxis) UsedSaxTechnology greatly reduces memory usage. For more information, see :(Http://xml.apache.org/axis/index.html).

  • The consumption of network resources is alsoWeb ServicesApplication restrictions. BecauseXMLData transmission usually has a larger data volume than binary protocols (suchRMI/IIOP. This extra consumption will have a certain impact on applications with tight network resources or frequent network transmission.

BesidesXMLRestrictions,Web ServicesIt also has some disadvantages:

  • So far, Web Services It can also be said to be stateless ( Stateless .
    The so-called Stateless This means that no information of the Client Service caller is saved. This is caused Web Services Is determined by the nature. Web Services In essence, it is necessary to provide data communication standards between applications and dynamically provide large-granularity services between enterprise applications. Web Services It is not suitable for very fine session-based method calls and complex transactions ( Transaction ) Processing.
    Someone may disagree with me! Because there are many Web Services Such Wasd ), Not only can save Session To make the service stateful ( Stateful ), And implements Remote Interface , You canWeb Services To allow the client to manipulate the remote object. For more information, see: Http://www.systinet.com ). In principle, this is not difficult to implement, because XML Any data, including Sessionid And Transactionid , With these ID From a technical point of view, implementation is stateful ( Stateful . However, this feature lacks standard support. WSDL They cannot represent these complex services. Within an enterprise, you can use any of these special functions to define the interaction protocol of the session state, because communication between the service provider and the service caller is under your control; however, to publish these services Internet Other applications cannot identify these special features according to standards.

  • Data Binding also has some shortcomings.
    Because all data transmission usesXMLFormat. Therefore, the binary data andXMLThere is a conversion between data. However, not all binary data can be conveniently used.XMLNot allJavaAll objects can beXML. Therefore, semantic loss often occurs during the conversion process ..

  • 2. Sometimes the online system requires automatic upgrade to reduce the workload;

    3. If you have to use WebServices, it is better to use romoting. At least the control is stateful.

    4. We recommend that you use an independent server, which is separate from the web server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.