# Daily Note 17/07/2020
###### tags: `Daily Notes` , `O-RAN` , `Acumos`
## Name : Christofel Rio Goenawan
## University : Bandung Institute of Technology (ITB)
---
## Schedule:
1. Study detailed architectures of xApps.
2. Study detailed of external interface of Near- RT RIC.
3. Study comparison of Acumos AI and Other AI/ML Tools.
## Outcome :
1. Explain the detailed architectures and works of xApp in Near- RT RIC.
2. Explain detailed works open APIs for xApps.
3. Explain detailed Acumos AI Design and Process.
## Further Plan :
- Study more detailed about current xApps
- Study more detailed about AIO Installation in Kubernets
- Try to deploy Acumos AIO in NTUST server
---
## Daily Log
### 1. Study detailed architectures of xApps. <mark>(9.00)</mark>
- Study more detail explanation in [Documentation](https://wiki.o-ran-sc.org/display/RICA/Architecture)and other resources.
### 2. Study detailed of external interface of Near- RT RIC. <mark>(10.30)</mark>
- Study more detail explanation in [Work Group's Notes](https://www.o-ran.org/specification-access) and [Ferlinda's Notes](https://hackmd.io/@ferlinda/SkvEbeWRI).
### 3. Study comparison of Acumos AI and Other AI/ML Tools. <mark>(12.00)</mark>
- Study more detail explanation in [Zhui Sao's Paper](https://drive.google.com/file/d/1zKe5CBkIy35jH2PFl2hngqndKHMbpmjo/view?usp=sharing).
---
## Report
### 1. Detailed Architectures of xApps.
In this note Writer use [Documentation](https://wiki.o-ran-sc.org/display/RICA/Architecture) and [Akmal's Notes](https://hackmd.io/@akmalns/HkNBqO6kw) as study sources.
#### xApps Architectures
Simple xApp Architectures scheme can be seen as below.

From documentation, the architecture of an xApp consists of the code implementing the xApp's logic and the RIC libraries that allow the xApp to
1. **Send and receive messages**.
2. **Read from, write to, and get notifications from the SDL layer**.
3. **Write log messages**.
#### xApps Functionality
xApps can use access libraries to access specific name-spaces in the SDL layer. The O-RAN standard interfaces (O1, A1, and E2) are exposed to the xApps as follows:
- xApp will receive its configuration via K8s ConfigMap.
- xApp can send statistics (PM) either by (a) sending it directly to VES collector in VES format, (b ) by exposing statistics via a REST interface for Prometheus to collect
- xApp will receive A1 policy guidance via an RMR message of a specific kind.
- xApp can subscribe to E2 events by constructing the E2 subscription ASN.
In addition to A1 and E2 related messages, xApps can send messages that are processes by other xApps and can receive messages produced by other xApps.
#### Current xApps
From the documentation, there are 6 main current xApps as below.
1. Admission Control xApp
2. KPI Monitor xApp
3. Measurement Campaign xApp
4. ML-based xApp
5. Traffic Steering Use Case xApps
6. UE Manager xApps
:::info
**Next Writer will learn more detailed about current xApps.**
:::
---
### 2. External Interface of Near- RT RIC
> In this note Writer use [WG3 - The Near-real-time RIC and E2 Interface Workgroup](https://www.o-ran.org/specification-access) and [Ferlinda's Notes](https://hackmd.io/@ferlinda/SkvEbeWRI) as study sources.
#### General Architectures
General Architectures of O- RAN architectures can be shown as below.

#### Functionality
Based on scheme above, the Near-RT RIC supports the following functions:
1. **A1 interface termination** : Terminates the A1 interface from the non-RT RIC and forwards A1 messages.
2. **O1 interface termination** : Terminates the O1 interface from Service Management & Orchestration layer and forwards management messages to the Near-RT RIC management function;
3. **E2 interface termination** :
- Terminates the E2 interface from an E2 Node.
- Routes xApp-related messages to the target xApp.
- Routes non xApp-related messages to the E2 Manager.
4. **Hosted xApps** :
- Allow RRM control functionalities to be executed at the Near-RT RIC and enforced in the E2 Nodes via E2 interface.
- Initiates xApp-related transactions over E2 interface.
- Handles xApp-related responses from the E2 interface.
- Handles A1 messages from A1 interface.
#### External Interfaces of Near- RT RIC
There are 3 main interfaces of Near- RT RIC as below.
1. **E2 Interfaces**
2. **A1 Interfaces**
3. **O1 Interfaces**
#### E2 Interface
That is **interface connecting the Near-RT RIC and one or more O-CU-CPs, one or more O-CU-UPs, and one or more O-DUs**.
**E2 Node** is a logical node terminating E2 interface. In this version of the specification, ORAN nodes terminating E2 interface are:
- for NR access: O-CU-CP, O-CU-UP, O-DU or any combination;
- for E-UTRA access: O-eNB.
#### A1 Interface
That is **interface between non-RT RIC and Near-RT RIC to enable policy-driven guidance of Near-RT RIC applications/functions, and support AI/ML workflow**.
#### O1 Interface
That is **interface between orchestration & management entities (Orchestration/NMS) and O-RAN managed elements, for operation and management, by which FCAPS management, Software management, File management and other similar functions shall be achieved**.
---
### 3. Comparison of Acumos AI and Other AI/ML Tools
> In this note Writer use [Zhui Sao's Paper](https://drive.google.com/file/d/1zKe5CBkIy35jH2PFl2hngqndKHMbpmjo/view?usp=sharing) as study sources.
#### Comparison to Other AI/ML Tools
Some comparison of Acumos AI with other famous AI/ML tools on **the integration of ML models into application development and sharing models** can be shown as below.
:::info
This comparison don't include model development or improving model performance.
:::
- **Tensorflow**
- Tensorflow-Serving (TFS) encapsulates the production infrastructure of Google and serves TensorFlow-based models in production.
- **Clipper** was developed concurrently with Tensorflow-Serving, and it shares similar goals and components with Tensorflow-Serving. The major difference is that Clipper was created and is maintained by research communities, and it is more general, also applying to nonTensorflow models.
- The two platforms above **are unable to share models with other users. Those platforms were designed only to deploy ML models in production environments**.
- **ModelDB**
- ModelDB is sharing AI/ML model tools where models can be archived and accessed via source code, specifically those in the area of computational neuroscience.
- To actually use these models, ML experts **have to go through the tedious task of configuring the model’s specific environment manually**.
- **OpenML**
- OpenML is a social sharing cloud for ML experts to share raw models.
- Same as ModelDB , ML experts **have to go through the tedious task of configuring the model’s specific environment manually**.
- **Some AI/ML Cloud Services as Google Cloud ML Engine, Amazon AWS ML , and Microsoft Azure ML**
- Those platforms provide APIs to upload data and train models.
- Unfortunately,**the designs and implementation specifications of these products are not publicly available** . One common limitation of these platforms is that they are restricted to their own particular proprietary cloud service and specific ML libraries, due to their **commercial nature**.
- Another problem with these platforms is the challenge of **protecting user privacy while running models in the cloud**.
- Thus,they create a **technical burden for data scientists to transfer and share their models with application developers, who may use other cloud providers or their own hardware**.
#### Acumos AI Advantages
Acumos AI advantages in the integration of ML models into application development and sharing models can be seen as below.
- Compared to ModelDB and OpenML, Acumos offers **easy-to-deliver end-to end runnable services by packaging the model into a Docker image, which can be executed without any environment restrictions**.
- **Kubeflow1**, an ongoing project to deploy models into Kubernetes containers, could be integrated into Acumos in order to complement the containerization features of Acumos.
- Acumos gives the **option to deploy the models either in the cloud or on the local hardware**.
#### Comparison Summary
Comparison of Acumos AI and other famous AI/ML Tools can be summarized as below.

---
## Reference
1. https://wiki.o-ran-sc.org/display/RICA/Architecture
2. https://www.o-ran.org/specification-access
3. https://drive.google.com/file/d/1zKe5CBkIy35jH2PFl2hngqndKHMbpmjo/view?usp=sharing