官术网_书友最值得收藏!

  • Mastering ASP.NET Web API
  • Mithun Pattankar Malendra Hurbuns
  • 410字
  • 2021-07-02 20:52:19

Services in SOA

A service is a piece of software which provides a functionality to other pieces of software within your system or outside the system.

The other pieces of software (clients) could be anything from a web application (website) to a mobile app (native or hybrid), or a desktop app, or even another service which uses another service in order to carry out a particular type of functionality.

In an e-commerce website context, when a user places an order, the web application communicates with the service to carry out the create, read, update, and delete (CRUD) operations on the database.

The communication between the software components (clients) and the service normally happens over a network with some kind of a communication protocol, for example, a mobile app communicating to a service via internet.

A system which uses a service or multiple services in this fashion, is known to have a Service-Oriented Architecture.

The main idea behind this architecture is that, instead of using modules within each client application, it lets us use a service(s) to provide functionality to them. This allows us to have many client applications using the same functionality.

SOA was successful, because of its following characteristics:

  • It allows us to scale our software when the demand increases by enabling it to have a copy of the service on multiple servers, so when the traffic comes in, a load balancer redirects that request to a specific instance of the service, and we can have multiple instances of the service. Thus, when the demand increases, increasing the number of instances on the servers helps us scale it.
  • SOA boasts of having standardized contracts or interfaces. When a client application calls the service, it calls the service by calling a method. The signature of that method normally doesn't change when the service changes, so we can upgrade our service without having to upgrade our clients as long as the contract and the interface do not change.
  • Services are, in fact, stateless, so when a request comes in from a website to our service, that instance of the service does not have to remember the previous request from that specific customer. It, basically, has all the information from the request that it needs in order to retrieve all the data associated with the previous requests within the service, so, the service does not have to remember the previous calls a client has made to that particular instance of the service.
主站蜘蛛池模板: 于都县| 西贡区| 布尔津县| 东宁县| 泗水县| 昭平县| 靖安县| 陇川县| 岳阳县| 天长市| 台南市| 安阳县| 建昌县| 沙河市| 荥阳市| 乳山市| 龙里县| 洛浦县| 鄂托克旗| 雷波县| 图片| 永川市| 泽州县| 霍林郭勒市| 河北省| 延吉市| 岱山县| 钦州市| 姚安县| 万全县| 武定县| 新化县| 年辖:市辖区| 于田县| 揭东县| 龙海市| 滨海县| 芦溪县| 札达县| 阿克陶县| 三门县|