
In this section, we will perform the learning phase, where we will understand how to collect data for architectural analysis.
In the learning phase, vFunction agent collects data while the application is running i.e. - When we run the OMS application and execute the script that invokes OMS API’s - vFunction agents collects the data required for analyzing the application.
This process is called Learning and the result is called Measurement.
The OMS application is deployed in the linux instance which we are accessing thru the windows VM.
A vFunction controller is a software component designed to monitor and send data to the vFunction server for both dynamic and static analysis. vFunction can collect data simultaneously from multiple controller for the same application (orchestrated learning).
As we logged into the OMS application in the previous section while setting up the VM’s, next step is to select the controller to start the learning. Click on the “+” button, next to Name and select the “oms controller” and click on “APPLY”.

Once the controller is selected, click on “Start Learning”.

The learning phase will start as shown below

Now, we need to execute the script so that it invokes the OMS API’s and vFunction collects the data for the learning process.
So, in the linux terminal which we SSH’d into using Putty execute the below mentioned commands:
Change your current directory to “oms-test-script” folder
cd ~/oms-test-script/execute the script to invoke OMS API’s
for i in `seq 1000`; do ./use-apis.sh ; sleep 0.5; done

While waiting for the script to finish execution, open another putty session, and check the content of /home/workshop/ oms-test-script/use-apis.sh to understand what oms apis are being invoked.
press “control + c” to stop the script execution in the putty terminal
click on “Stop” on the portal where the learning details should be populated as shown below with 9 domains

The OMS application is deployed on a tomcat server on the Linux machine located at /opt/tomcat/latest/. To stop tomcat execute(or simply kill the process):
sudo bash /opt/tomcat/apache-tomcat-9.0.56/bin/shutdown.sh To start tomcat execute:
sudo bash /opt/tomcat/apache-tomcat-9.0.56/bin/startup.shSo, we’ve seen how to start the Learning process in which vFunction collects data from a running application and the measurement is created.
The measurement enables analysis of learning outcomes, architectural insights, and helps track architectural debt and drift patterns.
