Monday, May 2, 2022

Graphs simplify software development

Graphs have uses in unexpected places, like analyzing software apps in hours instead of weeks. Software development is a complex ever-evolving process. The longer any software exists in the market the more complex it is to maintain. Development frameworks like Oracle Forms have been in the market for over 40 years and used to build mission critical applications over the years by global enterprises. These companies still write code in the same application environment. So, there is need to analyze monolithic software and reduce complexity.

Stephan La Rocca from PITSS GMBH, an Oracle Partner, spoke about how they have been using graphs to find linked software modules, clustered modules, and similar patterns to help enterprises. This article is inspired by his presentation and talks about how Oracle Graph can help analyze legacy software and provide a solution to simplifying software development.

Oracle Database Exam, Oracle Database Exam Preparation, Database Career, Database Skills, Database Jobs, Database Certification, Database Preparation
Fig1: Illustration of a monolithic vs modern application architecture

What are the problems with monolithic applications?


◉ They do not differentiate between layers of responsibility and therefore are harder to maintain as distinct tasks. Data management, business logic, and user interfaces are often intertwined.

◉ They combine functionality into one mass of code rather than components with specific functionality. Therefore, it becomes cumbersome to uptake newer technology for a specific function such as security or notifications or mobile app development. In today's modern software frameworks, these functionalities are handled by independent libraries or frameworks.

◉ They are inflexible from a business perspective. These applications are loaded with features, added by the developer over time, and are difficult to adapt or customize to a new or revised business process. In contrast modern application development is driven more by a process flow.

How graph technology helps with breaking these monolithic applications


1. Bounded context identification in legacy applications

2. Support for manual software testing

3. Business process identification

Use case I: Graphs help to automatically identify bounded context


Bounded context is a process to breakdown monolithic applications into smaller deployable artifacts, like web services. This enables development and deployment of the various application functionalities to be independent of each other. For example, in the illustration below, software development and deployment of 'Order Management' context is completely different from that of 'Payment' context. Although, the user interface, business logic, and data model of these smaller deployable artifacts may not be separate.

The business logic of legacy applications can be hard to understand in detail without consulting domain experts. However, with large amounts of system data collected over 30-40 years by different applications, it becomes possible to identify the dependencies without domain or business knowledge.

Oracle Database Exam, Oracle Database Exam Preparation, Database Career, Database Skills, Database Jobs, Database Certification, Database Preparation
Fig2: Illustration shows how bounded context is identified based on dependencies

Below is a system flow of a legacy application with different modules. The modules are clustered based on bounded context. Each cluster has its own bounded context that manages the cluster. As you can see in this scenario, the 'Customers' cluster consumes other cluster data, while it is consumed fewer times by other clusters.

Oracle Database Exam, Oracle Database Exam Preparation, Database Career, Database Skills, Database Jobs, Database Certification, Database Preparation
Fig3: Illustration of a system flow showing clustering of modules based on bounded context

Traditionally, when building a complex architectural schema, domain knowledge provided by the industry/ LoB subject matter experts is essential. These experts provide a cluster-criteria to identify the functionality to a certain cluster. Along with known clusters, there can also be numerous unassigned objects adding to the complexity of an architectural schema.

Each cluster represents several modules, which could include a single screen of an application with multiple functions-validations, buttons, business logic, SQL statements etc., or multiple screens of an application with multiple functions. The sum of functions per screen gives the weighted attribute to a screen. So, the bigger the weighted attribute, the more complex the screen. Therefore, a cluster and its bounded context should follow these two principles -

◉ Each cluster should have the same weight underneath - the functionality should be evenly distributed across the various domains of the application.

◉ Interactions between these clusters should be at a minimum - to avoid any development need for additional bounded context.

How Oracle Graph helps with bounded context?

Oracle Graph has over 60 pre-built algorithms that give cluster advice based on complexity of the application. This helps define the bounded context without domain knowledge and enables implementation of both custom algorithms and built-in algorithms. Oracle Graph helps you understand the reasons, sub-domains, and creating borders while forming bounded context for a cluster.

This is possible by using an algorithm that follows community detection, which considers the weight of the modules and creates cluster recommendations.

Oracle Database Exam, Oracle Database Exam Preparation, Database Career, Database Skills, Database Jobs, Database Certification, Database Preparation
Fig4: Bounded context and clusters defined using Oracle Graph

As the complexity of the module increases the bubble size also increases, while the nodes and edges remain the same. The algorithms are compiled and assigned to Oracle Property Graph Server, which then creates a new attribute for the community ID and assigns a property weight.

When these algorithms are run, a new community ID is created, which helps to visualize the objects that the graph algorithm selects as related and clusters them. This makes it possible to see how these objects are interacting with each other, and what modules belong to this cluster - even without domain knowledge. In the figure above one such Graph selected cluster is highlighted in green, and we can create multiple granular clusters as needed.

Use case II: Support for software testing in applications


Having all the cluster information in the repository could help run a test. Using graph technology, it becomes

◉ easy to describe the shortest path or click-path for a user from login screen to specific PL/SQL unit

◉ help coordinate user tests

◉ possible to ensure code coverage, and consider condition on the path

How Oracle Graph helps with providing test support?

Release changes in large applications often require the addition of a lot of new functionality. Automatic testing is hard in legacy applications, so it becomes imperative to guide the users to the functionalities that are changed. The click-path is easy to identify with Oracle Graph algorithms in the backend - algorithms that help to visualize with mock-up integration and provide the user with step-by-step instruction--for example “Press Next”--then the screen pops up and there you press “Submit the Claim” button.

When a function changes, the user knows the exact click-path from login screen to the end, by implementing the fastest-path algorithm in Oracle Graph.

Use case III: Identifying business processes in the application using a graph


Legacy applications do not have well-defined foreign key relationships, so data model analytics becomes necessary. We can change the data model and assign foreign keys between tables; helping to identify the user interface tables with a ‘where’ clause, or tables that join Data Manipulation Language (DML) statements. Therefore, we can now identify where the user interface creates a master detail declaration between two tables. Even without the foreign keys we can still understand relationship between tables and identify important tables in the data model to track for business process information.

This information can enhance the application and help track user behavior. Oracle Graph enables users to visualize and analyze these complex relationships created to identify business processes, user interactions, and how these run through the application.

Benefits of integrating Oracle Graph into an application

Oracle Graph helps you analyze a monolithic application without domain knowledge, enabling easy solution exploration with a clear dependency analysis of various contexts. Graphs also improve user testing during new releases making it possible to guide the user directly to the changed flow for easy testing; and identify and visualize business processes.

Source: oracle.com

Related Posts

0 comments:

Post a Comment