1. Introduction to SOA Platform

1.1 overview,

Service-oriented Architecture (SOA) is a software system architecture that connects independent functional entities to accomplish specific tasks in order to meet the needs of business integration on the Internet. SOA is a component model that links different functional units of an application (called services) through well-defined interfaces and contracts between these services. Interfaces are defined in a neutral manner and should be independent of the hardware platform, operating system, and programming language that implements the service. This allows the services built on a variety of such systems to interact in a unified and common way.

The traditional Web (HTML/HTTP) technology effectively solves the problem of interaction and communication between people and information system, and greatly promotes the development of B2C mode. WEB services (XML/SOAP/WSDL) technology is to effectively solve the problem of interaction and communication between information systems, promote the development of B2B/EAI/CB2C. SOA (service-oriented system) uses service-oriented business modeling technology and WEB services technology to achieve loose coupling, integration and collaboration between systems. The essence of WEB services and SOA is to enable individual information systems to work together on the basis of communication.

SOA is revolutionizing distributed computing based on request/response patterns for synchronous and asynchronous applications. An application’s business logic or some individual function is modularized and presented to consumers or clients as a service. The key to these services is their loosely coupled nature. For example, the interface and implementation of a service are separate. Application developers or system integrators can build applications by composing one or more services without understanding the underlying implementation of the services. For example, a service can be used. NET or J2EE, and applications using the service can be on different platforms, using different languages.

1.2. Basic characteristics of SOA

The implementation of SOA has several distinct basic characteristics. A key goal of SOA implementation is to maximize the impact of enterprise IT assets. To achieve this goal, keep the following characteristics in mind when implementing SOA:

  1. Accessible from outside the enterprise

  2. Available at any time

  3. Coarse-grained service interface classification

  4. Loose coupling

  5. Reusable services

  6. Service interface design management

  7. Standardized service interfaces

  8. Support for various message patterns

  9. Precisely defined service contracts

1.3、为什么选择SOA

Different kinds of operating systems, applications, system software and application infrastructure are intertwined, which is the reality of IT enterprises. Some existing applications are used to handle current business processes, so it is not possible to build a new infrastructure from scratch. Enterprises should be able to respond quickly to business changes, leverage investments in existing applications and application infrastructure to address new business needs, and provide new channels for customers, business partners, and suppliers to interact, And present an architecture that can support organic business. With its loosely coupled SOA features, makes the enterprise can according to the modular way to add new services or update existing services, in order to solve the new business needs, provide options to provide services through different channels, and can put the enterprise existing or existing applications as services, to protect the existing IT infrastructure investment.

2. Service definition

2.1 overview,

At present, there are generally two forms of SOA platform service definition, one is to define the form of standard interface, the other is to define the service implementation in the form of standard WebService.In the figure above, SOA platform services are defined in the form of interfaces, as is the SOA implementation of RDIFramework.NET. The concrete implementation is. NET technology WCF to achieve, the service can be stored (published) in the following ways: Windows service mode (common), WinForm interface mode, IIS service mode and so on. We will introduce them separately in later articles.

2.2 principles of SOA service design

SOA requires consistency

There are many candidate technologies for creating, publishing, discovering, and invoking services. SOA should provide a reference architecture to specify specific mechanisms that service providers and consumers will use; We should aim to achieve consistency among all participants in SAO. Such conformance can reduce development, integration, and maintenance efforts.

If you need to use elements outside of the reference architecture, we recommend a complementary approach. For example, what if UDDI is the mechanism of choice for service publishing and discovery, but a particular development team is already using a development process based on other repository technologies? We will choose to focus on publishing the team’s services to both repositories simultaneously. This allows existing service consumers to use their familiar (but possibly non-standard) repositories. Consumers running on a common SOA infrastructure can use a standard repository — such as UDDI — for all services.

SOA simplifies development

We want any enterprise-level SOA infrastructure to be scalable and resilient; It should also include industry-level Enterprise Service Bus (ESB) and security technologies. Or, to put it another way, developers of SOA-targeted services and processes can leverage mature middleware and rely on SOA infrastructure to provide solutions to problems such as authentication, message transformation, and reliable message delivery.

The provision of these middleware capabilities should be based on an important principle: service and process developers should stay away from the intricacies of middleware implementations. Our ideal goal is that developers working in our SOA environment should only need business domain knowledge and basic programming skills.

Services have standard, formally defined interfaces that can be processed by computers

Knowing that tools and code generation can play an important role in AN SOA implementation, we now emphasize the importance of using machine-readable interfaces. When interfaces are described in well-defined, machine-readable languages, they actually support a variety of tool support capabilities. We want to improve separation, so we strongly recommend using a formally defined open standard language like WSDL rather than a proprietary format.

The concept of computer-processable methods should extend from service interface descriptions, such as WSDL, to all other forms of declarative information or metadata. Only an emphasis on both declarative techniques and machine-processable metadata can transfer its associated complexity from business application developers to standards-based middleware. Emerging technologies such as WS-Policy play an important role in supporting this approach.

Services should be designed to be reusable

Service designers should keep in mind that any service they develop can become a reusable asset. Instead of focusing only on the needs of the initial users of the service, designers should conduct a broader business analysis to determine more comprehensive requirements. We suggest that designers consider possible directions for service development:

The design must accommodate increased throughput; If a service can run successfully even as the number of services consumed increases, utilization increases exponentially.

As the number of services used increases, the data volume and concurrent data access patterns may be very different from when they were first put into use.

We must anticipate future growth in service requests; New users may need additional functionality, or they may need to make changes to existing functionality

Services should have a carefully chosen granularity

When choosing service granularity, we may need to compromise among several factors, such as maintainability, operability, and ease of use. Any given SOA should provide guidance to service designers to identify such trade-offs.

Services should be cohesive and integrated

Recognizing the need to be thoughtful when determining service granularity, what are the considerations when determining which operations should constitute services? We found two object design concepts useful: cohesion and integrity.

Services should encapsulate implementation details

Our motivation to encapsulate the details of service implementation — the algorithms and resources used — is to increase the separation between service consumers and providers, thus providing flexibility for future extensions.

Operation design should consider concurrency

3. Framework SOA publishing method

RDIFramework.NET SOA (WCF server) can be hosted (published) as a Windows service, as a WinForm, and as an IIS server.

To enable the framework to run in WCF mode, you must first configure the “config. XML” file in the folder of the RDIFramework.NET framework runnable files and locate the “Software Service Provider” field, which has two values: RDIFramework. ServiceAdapter and RDIFramework. ServiceClient

System default for “RDIFramework. ServiceAdapter”, namely the traditional data access method (logical three-tier structure), to the system to the WCF mode, you must set up its value is: RDIFramework. ServiceClient

With this setup and a simple deployment, the application can be run in SOA mode. The SOA pattern is configured by running the config.xml file as shown in the figure below.

Of course, the proper configuration and binding of the CLIENT and server side of the SOA pattern can be found in the relevant articles, as well as in the configuration file of our framework.

3.1. The server runs as Windows server register

In order for our framework to be hosted as a Windows service, the WCF service “rDIFramework.winService” directory of the deployed framework must contain the files necessary for our framework to be hosted as a Windows service, as shown in Figure 7.3.1. There are two batch files in the figure that can help us install and uninstall the Windows services of the framework. They are:

Install rdiFrameworkService. bat: Used to Install the WCF service of the framework to host to the Windows service.

Uninstall rdiFrameworkService. bat: used to Uninstall the installed framework WCF service.

RDIFramework.NET is used as a Windows service to store the required files.

Double-click the Install rdiFrameworkService.bat file to Install the service, as shown in Figure 7.3.2, and enter :y to Install the service. As shown below:

The words shown below will appear after successful installation.

In The Windows Service Manager, you can see that the service of our framework has been installed successfully. The service is not started by default after the first installation, so please manually start it, as shown in the picture below.

Bat file. Double-click the file and enter “Y” to Uninstall the successfully installed framework service, as shown in the following figure.

Alternatively, you can uninstall the framework service with installUtil.exe, as shown in the following figure:

The results of running the framework in SOA mode are shown below, and you can see that it is exactly the same as running it in a traditional way.

Because we started the WCF log function, we can through the VS2010 own “services to track the viewer” view WCF invocation process, advice, of course, after the system put into normal use, close the WCF logging function, so as not to affect the efficiency of the whole framework and used only for testing, in order to open the service VS trace viewer, Go to the start menu VS installation menu name, find the “Service Trace Viewer” and open it, as shown below.

Through the Service Trace Viewer, we can clearly see how our framework calls the WCF service, and the whole process is recorded in detail, as shown in the figure below. For details about how to use the Service Trace Viewer, you can refer to the related documentation or see its own help file.

This is the distributed architecture deployment solution of our framework (hosted by Windows services).

3.2. The server runs in WinForm

Our framework can not only be hosted in Windows services, but can also be hosted as A WinForm in a manner similar to Windows Services hosting. Winform means that the server starts in the form of a form interface, which is relatively easy to understand. The user can put the form main program to start the framework service on the Windows start menu, and automatically start our framework service when it is opened. RDIFramework.NET server in the form of WinForm check run directory: Bin \ FrameworkService \ RDIFramework ServiceHost. Exe, the effect after the opening as shown in the figure below:

The server has been started, now run the RDIFrmework.NET client, the effect is the same as the Windows service mode. To test the service we started, we could use the “WCF Test Client” for testing. Wcftestclient. exe is a GUI tool for testing WCF. Simply type wcfTestClient in the Visual Studio Command Line window to launch the program. The diagram below:

You can right-click My Service Project and choose Add Service (A)… To add a WCF service, in the above, we input “net. TCP: / / 127.0.0.1:8888 / RDIFramework ServiceAdapter UserService/tex-mex” added to test the user service invocation.

3.3. The server runs in the form of IIS

Our framework can be hosted not only as a Windows service, as a WinForm interface, but also as a Web service from IIS. WCFService (rDIFramework.wcfService) to host the framework’s WCF service in IIS, first we need to publish the “RDIFramework.wcfService” project to IIS. The publishing method is the same as the general Web publishing method. The rDIFramework.wcfService project is shown below:

After publishing to IIS, the following image should look like:

Note here that the framework’s services are published to IIS after the corresponding application pool. The NET Framework version must be selected. NET Framework V4.0 or later. As shown below:

At this point, we can use a browser to browse our published service and test the success of the published service, as shown in the figure below, we test the StaffService service.

We can also use the “WCF Test client” to test the WCF service we published under IIS, as shown below:

Releasing THE SOA server in the above three ways for the deployment of distributed applications can successfully run the client of our framework. Users can make their own choices according to the actual situation in the process of use.


  • New cross-platform version. NET agile development framework -RDIFramework.NET5.0 shock release
  • RDIFramework.NET agile development framework facilitates the development and implementation of ENTERPRISE BPM business process systems
  • Integrate instant messaging (IM) through SignalR technology. NET agile development framework landing
  • RDIFramework.NET WinForm added report management function module
  • RDIFramework.NET Added notification and system news modules to WinForm
  • RDIFramework.NET – Based. NET rapid information system development framework – series directory
  • RDIFramework.NET Agile development framework ━ Workflow components
  • RDIFramework.NET Agile development framework ━ Workflow component Web service platform
  • RDIFramework.NET Agile development framework ━ Workflow component WinForm business platform
  • Wechat public number development series – play wechat development – catalog summary

Over the years, thanks to supporters and users of the RDIFramework.NET framework, you can find out more at the following address.

RDIFramework.NET official website: www.rdiframework.net/

RDIFramework.NET official blog: blog.rdiframework.net/

Special note, the framework related technical articles please refer to the official website prevail, welcome everyone to collect!

RDIFramework.NET is built by the professional team of Hainan Guosi Software Technology Co., LTD., which has been updated for a long time. Please feel free to use it!

Please follow the official wechat account of RDIFramework.NET (wechat id: Guosisoft) to keep abreast of the latest developments.

Use wechat to scan the QR code for immediate attention