Examples of SOA

Source: Internet
Author: User

In the previous article, we spoke about the architectural principles of SOA, and today we present our specific development examples. First of all, the development of the idea: 1. Putting all the interface functions under the same project, this project is very important, because our service providers and consumers will use; 2. For the specific implementation of the interface function, and to expose the corresponding services to the zookeeper registry; 3. Consumers only need to reference the interface function of the project; In the configuration file, The address in the registration and the generation of the remote service proxy can be called in the Java code. This is done for the consumer in fact the specific implementation details are not at this end but on the service provider side, if the service side of the code is updated (for example: the algorithm made a certain adjustment), then after the release, the consumer automatically call to the latest way. The specific engineering structure is as follows:

To parse the code focus:

Interface

The main is to define some basic functions of the interface Java files, provided for the consumer, service provider reference use; Relatively simple not to do more detailed description



Service Provider

Reference Interface Engineering (this place refers to the generation of the interface project, which means to put the production of the interfaces into this project), and implement this interface function; In this project, you also need to declare the Zookeeper registry address of the exposed service in the configuration file;




Consumers

Referencing the interface engineering, and obtaining the corresponding service address through the Zookeeper registry, making the call



The specific invocation situation is as follows:


This is just a simple implementation of the architecture process, we can flexibly apply to the actual project development process, so-called million change, this is an example. The project uses MAVEN engineering, everyone try ....


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Examples of SOA

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.