## 2 Materials and Methods  
### Web Service Composition Reliability Model  
Web service composition is the process of combining different services into a single service to perform more complex functions. Owing to the lack of prior system-level information and experimental data for web service compositions, the system reliability is required to be assessed based solely on subsystem-level information. In this section, an assessment method based on a system structure with subsystem-level priors and data is introduced. The authors utilized the existing reliability prior information and testing data at sub-web services level, and integrated them to evaluate the web service composition. The authors defined an abstract web service to be a set of web services equipped with the same function, and specific web services were selected from the abstract web service to integrate the composition. Figure 1 illustrates that the web service composition includes abstract web service candidates, \(W_{i}\), where \(W_{i}=\{w_{11},w_{12},\ldots,w_{1n}\}\) and each \(w\) denotes a specific web service, and that optimal web services are selected from a set of functionally equivalent web service candidates. The web service composition integrates specific web services following a certain logic. Assuming that all alternative web service candidates are available, the communication links for user-invoked web services depend on quality of service (QoS) properties including response-time, location, and latency, and using this, the invoked web service sets: \(\{w_{11},w_{22},w_{32},w_{43}\}\), illustrated in Figure 2, can be obtained. To record the invocation of web services, the authors constructed a real-time data processing system, as depicted in Figure 3. The system includes Apache Kafka, Spark Streaming and database (DB), and web services deployed on Nginx. The invocation information of the web services was monitored and collected to calculate the associated transition probabilities. Among the constituent systems, Apache Spark exhibited high performance for both batch and streaming data, and Spark Streaming is an extension of the core Spark API that enables scalable, high-throughput, fault-tolerant stream processing of live data streams. The purpose of Kafka is to accumulate and, subsequently, re-compute the data. The authors utilized Spark Streaming to obtain data from the log of web services, which were then transmitted to the computation engine. Spark streaming was used as the computation engine, which directly programs based on SQL, to count the number of invocations and the number of errors corresponding to each web service. Considering the high dimensionality of queries, the results were stored on the OLAP database. The authors used the aforementioned real-time data processing system to record the telemetry data regarding the number of invocations and the number of errors corresponding to each web  
Figure 1: Web service composition. service. In this paper, the authors considered the overtime of response as web service failure and used the proportion of invocation failures to calculate the reliability of web services. Let us assume that corresponding to a duration \(t=t_{n}-t_{k}\), the numbers of invocations and failures of the web service \(w\) is \(C_{n}\) and \(n\), respectively, at time \(t_{n}\), and \(C_{k}\), and \(k\), respectively, at time \(t_{k}\). Therefore, the probability of failure of the web service \(w\) corresponding to the duration \(t\) is \(F(w)=\frac{n-k}{C_{n}-C_{k}}\), and its reliability is \(r(w)=1-F(w)\). In service-oriented architecture (SOA), to estimate the characteristics of dynamic and self-adaptability of web service composition, the authors used a Markov model to construct the evaluation model based on the state of software and state transition to describe the activity of software. Web service composition can be considered to be a task flow from an initial state to a final state. Corresponding to each task node, the specific web service is selected to be its state.