Monday, December 5, 2022

Model-driven Software development

 


Model driven Software development evolves existing systems and facilitates the creation of new software systems.

The salient features of model driven software development include:

1.       Domain-specific languages (DSLs) that express models at different abstraction levels.

2.       DSL notation syntaxes that are collected separately

3.       Model transformations for generating code from models either directly by model-to-text transformations or indirectly by intermediate model-to-model transformations.

An abstract syntax is defined by a metamodel that uses a metamodeling language to describe a set of concepts and their relationships. These languages use object-oriented constructs to build metamodels. The relationship between a model and a metamodel can be described by a “conforms-to” relationship.

There are seven metamodels including Knowledge Discovery Metamodel, Abstract Syntax Tree Metamodel, the Software Measurement Metamodel, analysis program, visualization, refactoring and transformation

ASTM and KDM are complimentary in modeling software systems’ syntax and semantics. ASTMs use Abstract Syntax Trees to mainly represent the source code’s syntax, KDM helps to represent semantic information about a software system, ranging from source code to higher level of abstractions. KDM is the language of architecture and provides a common interchange format intended for representing software assets and tools interoperability. Platform, user interface or data can each have its own KDM and are organized as packages. These packages are grouped into four abstraction layers to improve modularity and separation of concerns: infrastructure, program elements, runtime resource and abstractions.

SMM is the metamodel that can represent both metrics and measurements. It includes a set of elements to describe the metrics in KDM models and their measurements.

Taking the example of the modernization of a database forms application and migrating it to a Java platform, an important part of the migration could involve PL/SQL triggers in legacy Forms code. In a Forms application, the sets of SQL statements corresponding to triggers are tightly coupled to the User Interface. The cost of the migration project is proportional to the number and complexity of these couplings. The reverse engineering process involves extracting KDM models from the SQL code.

An extractor that generates the KDM model from SQL code can be automated. A framework that provides domain specific languages for extraction of model is available and this can be used to create a model that conforms to a target KDM from program that conforms to grammar. Dedicated parsers can help with this code-to-model transformation.

With the popularity of machine learning techniques and softmax classification, extracting domain classes according to syntax tree meta-model and semantic graphical information has become more meaningful. The two-step process of parsing to yield Abstract Syntax Tree Meta-model and restructuring to express Abstract Knowledge Discovery Model becomes enhanced with collocation and dependency information. This results in classifications at code organization units that were previously omitted. For example, code organization and call graphs can be used for such learning. The discovery of KDM and SMM can also be broken down into independent learning mechanisms with the Dependency Complexity being one of them.

Sunday, December 4, 2022

 

The summary of the book “How The Secret changed my life” – Real people Real stories by Rhonda Byrnes

This book is a collection of stories from people of all walks of life who bring forward their testimonies of the book “The Secret” by Rhonda Byrnes.

The short stories that follow are categorizded by the daily teachings

“Ask believe receive”

                A lady from Kerala talks about undergoing divorce from her husband of just under a year and possible deportation at the same time. When she stopped worrying and whenever asked about her status, she would say that things are following the process, she started feeling better. She just kept visualizing her greencard to have an expiry several years later. She got a greencard that had an even later expiration date.

                A lady had lost her pet. She put the pet’s bed in her bedroom and constantly believed he was around and even put out the dish for his food daily. She put posters around. Finally, she received a call from a person returning from out of state whose niece had found a lost dog, asked around and finally took it to her state.

See it feel it receive it

                A lady had a tough time and wanted to get a scholarship. She kept feeling good that she will get a scholarship and how it will end all her concerns. She finally did it and it worked well for her.

                A person did not have a great romance. She started writing a romance book by putting pictures and visualizing the ring she wanted. She forgot about the book as she got busy with a new job but kept feeling exactly how she wanted to feel. Finally, she did meet a man who took her to the same place and even happened to give her the engagement ring she had pictured.

Be happy now, feel good now

                We are entirely free to choose how we feel now and that power can change the outcomes we face.

                A new couple was trying to get a second baby and move into their first home but their attempts had not been successful. Instead they started feeling happy now and soon they started seeing results their way.

Abundance

                Many people feel the pinch and money is a very real problem but some have found the way to even wish it and realize it into their life.

                A soldier deployed to Iraq had been praying to get a revelation from all the bad things she was seeing around her. She had downloaded this book and read it in two days. Initially she started attracting small things then she started attracting big things such as a civilian high paying job, three raises and a wonderful husband. She started believing in abundance and made a goal for an amount that would give her the financial freedom she wanted. She put it on her corkboard along with all her wish lists. She kept visiting it year after year. Each year she would manage to work through all the items on her board except for the large amount. In the process, she learned a lot about her financial responsibilities. Then one year she finally found that she had attained it even though she had stopped keeping track of her progress and started to believe that she was already getting there.

                A lady in Manhattan had started following the book by getting up early, going to her balcony and expressing her gratitude for the day. One day she found a penny on her balcony. Several months later she found seven-dollar bills. One fine day she found two twenty-dollar bills. Each time she asked people around her missing money, she found none.

                A family living in a dilapidated house had struggled for fourteen years to move but could neither afford it nor cope with their place. They collectively watched The Secret and started believing. They remembered a house on sale they had liked and wanted to live there but couldn’t afford it. They collectively visualized it. Soon their house appreciated while the one they wanted to live in remained on the market and even had a price drop. Finally, they moved into their dream house.

                A lady wanted to go on a world tour of all the landmarks she had collected in. She heard about a dream job of selling high-end jewelry on a cruise ship. She ended up visiting all the places she had put in her yearbook. The highlight of her belief was that she wished for a commission from her sales to match a certain number specified to the last digit and on one of her cruised she got a round number commission of that very amount.

Think good thoughts, take good actions, get good results

Change relationships

There are more examples that are uplifting to hear about people believing and getting ready and finally receiving what they want

A single mother desperate to find a loving partner accidentally runs into a wedding shop in an unknown corner and ends up buying a wedding dress and feeling silly afterwards. But this very person kept visualizing it and one day ran into a person who was looking for the same address as she was. They became loving husband and wife in the time to follow.

Love

A lady from British Columbia was suffering from ulcerative colitis and bleeding each day for several years. One day she found this book and started making positive affirmations and showing love. Each day her gratitude and love was unconditionally given and the universe returned it to her. Her disease was now in remission and she feels better.

A lady who had a dog with a terminal disease wished for him to be happy and healthy again. She would use every spare moment for this purpose. And it worked. There numerous, real and heartfelt tales of people with different disease conditions making a positive difference to their life style by changing every negative thinking and attitude that they have.

 

Saturday, December 3, 2022

Reverse engineering using models for software engineering

 

Software models are not just great for learning about software, but they are essential to software modernization, which usually consists of three steps: reverse engineering, restructuring and forward engineering.  When extracted from legacy software, models are easier to transform to a different architecture such as microservices. This activity could be performed by tools to bridge grammarware and model-driven technical spaces. Such dedicated parsers could also come with a query language that eases the retrieval of scattered information in syntax trees. It could also incorporate extensibility and grammar reuse mechanisms.

Model driven software development raises the level of abstraction and automation in the construction of software. Although commonly used for building new software systems, models also have the potential to evolve existing systems. They help to reduce the software evolution costs and improve the quality of the artifacts. Migration and modernization can both benefit from model driven approaches. A set of standard metamodels have been popularized by solutions and tools which represent the information normally managed in modernization tasks. This is true for language-to-language migrations as well where the first step is to extract models from the application code written in source language. Similarly, in a modernization effort, models could be extracted from schemas to improve the data quality. When these initial models are obtained, transformations can then be applied to generate higher level abstraction models followed by generation of artifacts such as code in another language or an improved data schema. Other operations on models such as model comparisons and synchronizations can also be applied.

The relationship between pairs of concepts grammar or program and metamodel or model is an example of a bridge between two different technical spaces specifically grammarware and modelware. Dedicated parsers are implemented to obtain models from code conforming to a grammar. These parsers perform model generation tasks in addition to code parsing. First, a syntax tree is created from the source code by static analysis and then this syntax tree is traversed to obtain the information needed to create the model elements. This is a complex task which requires both collecting scattered information and resolving references in the syntax tree.

Model transformations are classified into three categories which include text to model transformations which obtain models from existing source code; model-to-model transformations whose input and output are models; and models-to-text transformations, which generate software artifacts from a source model. When a model transformation language is designed, two key design choices are how to express the mappings between source and target elements and how to navigate through the source artifact. The former involves binding, and the latter involves querying.

Certain improvements can be imagined with the use of 1) reuse mechanisms at rule-level 2) a new kind of rule for dealing with expressions efficiently, and 3) an extensibility mechanism to add new operators. New functionalities could also target expressiveness, usability, and performance.

Friday, December 2, 2022

 Application Modernization Field Guide continued.

Application is also about selectivity. The business needs that are driving to modernize maintain higher 

priority than others. Tools native to the cloud can help with gaining insights and for performance 

analysis that brings together the technical priorities. The modernization journey begins with matching 

effort to business priority. The first few projects could be selected such that they are short in duration 

and high in potential business value. Then, all possible modernization options can be evaluated and 

ranked based on their complexity, cost and business value. Then the options can be prioritized and 

assessed for feasibility. 

As an example, if a node.js application deployed on a Linux server must be modernized, one of the ways 

to modernize it would be to decouple the application into microservices, package the application into a 

Docker container, which is then run on a cloud native infrastructure. Certain cloud services are designed 

to make it easy to run, stop and manage Docker containers on a cluster. It is even possible to host the 

cluster on a serverless infrastructure that is managed by the cloud if the services or tasks can be called 

out. These services also create a consistent deployment and build experience, manage, and scale batch 

and Extract-Transform-Load workloads, and build sophisticated application architectures on a 

microservice model. 

Writing an application in a container image is good first step towards modernization, but many 

applications aren’t optimized for containers. Load balancing, application-state handling, and monitoring 

can be different when hosted in the cloud. This requires rewriting portions of the applications. Similarly, 

performance tuning and DevOps processes must be aligned to containers. Prebuilt containerized 

middleware and services help with this journey. Finally, managing and monitoring operations can help 

maximize speed and agility. 

Some applications are best exposed as APIs that are easily reused for building new capabilities that 

augment the existing software. Those APIs can then be reused to integrate future applications into the 

ecosystem. APIs can adhere to Representational State transfer architectural style and expose existing 

access from any endpoint. These APIs can be placed under management control to improve security, 

performance, and visibility. New applications can build on freshly exposed APIs from existing 

applications without requiring changes to existing applications. Businesses also use this opportunity to 

harness their data to create better outcomes and customer experiences. 

When an application is pushed to production, the DevOps and configuration must be managed and 

modernized as well. Applications are monitored to ensure availability and performance according to 

service-level agreements. Service management must also transform to support this paradigm shift. 

Monitoring metrics and logs helps to determine application health and dashboards are easy to generate 

with cloud computing. Using such tools and automations and tracking issues helps to promote visibility 

of incidents to everyone.

Lastly, there is not a single formula that holds but an approach that is totally unique to the business 

goals and needs. The modernization goals of agile delivery, transform-and-innovate, reduce costs, 

replace with SaaS, and cloud migrations can be planned for by analyzing for insights and the utilization 

of one or more modernization patterns that include pivoting from monolithic strategies, adding new 

capabilities as microservices, refactoring monolith to microservices, exposing APIs, and migrating 

monolith to a cloud runtime.

Thursday, December 1, 2022

 

Application Modernization Field Guide

Part 7 discussed modernization via incremental approaches and using tools.

This section summarizes the field guide for general application modernizations.

Application modernization is about reverse engineering, restructuring and forward engineering. It is also an opportunity to optimize the user experience through modernization. Customers are vital to business. Applications have become the gateway to more impactful and rewarding experiences for internal stakeholders and customers. Modernization is not just one of the ways but sometimes the only way for applications to embrace agility, fuel growth and remain competitive.

The points listed here are all elements of a robust hybrid cloud strategy and are essential for a full modernization experience. They can be used to accelerate digital transformations by building new capabilities and delivering them. Cloud native architectures and containerizations are priorities. Delivery must be accelerated with a culture of automation and transformation and deployments must be friendly to hybrid clouds.

One of the most critical aspects of application modernization is application readiness assessment. A cloud-native microservices approach can bring scalability and flexibility inherent to the hybrid cloud but it relies on an evaluation of the existing application. It also brings the opportunity to tailor the application to the business needs.

The build once and deploy on any cloud begins with assessing the applications. Some of them can undergo lift-and-shift while others will require refactoring. Even if the applications are deployed with little changes, preparing them for containerization is essential. Containers bring scalability, openness and portability. Automating deployments via a CI/CD pipeline is next. DevOps pipelines are very welcome here. Applications must be run and managed with ease for true embrace by customers.

Accelerators and tools can certainly help but recognizing the disciplines in which they will be used are just as important. For example, Innovation helps with refactoring which can help deliver a cloud-native application. Agile delivery can help with replatform that when deployed by modern devOps pipelines and run by newer runtimes can help deliver a cloud ready application. Cost reduction is another distinct area where repackaging can help save costs if a traditional application is delivered. Cloud Migration that requires VMs in the cloud and when used with migration accelerators and common operations can help deliver complex traditional applications in the new world.

There is not a single formula that holds but an approach that is totally unique to the business goals and needs. The modernization goals of agile delivery, transform-and-innovate, reduce costs, replace with SaaS, and cloud migrations can be planned for by analyzing for insights and the utilization of one or more modernization patterns that include pivoting from monolithic strategies, adding new capabilities as microservices, refactoring monolith to microservices, exposing APIs, and migrating monolith to a cloud runtime. With these, applications can be deployed to both a public cloud and a private cloud.

A trusted foundation helps. Infrastructure platforms like Kubernetes and cloud technologies like AWS developer tools provide a consistent platform to leverage for this purpose.

 

Wednesday, November 30, 2022

Towards architecture driven modernization

 

Architecture driven application modernization involves meta modeling and transformations of models that can help to optimize system evaluations costs by automating the modernization process of systems. This is done in three phases: reverse engineering, restructuring and forward engineering. Reverse engineering technologies can analyze legacy software systems, identify its widgets and their interconnection, reproduce it based on the extracted information, and create a representation at a higher level of abstraction. Some requirements for modernization tools can be called out here. It must allow extracting domain classes according to Concrete Syntax Tree meta-model and semantic graphical information, then analyze extracted information to change them into a higher level of abstraction as a knowledge-discovery model.

Software modernization approach becomes a necessity for creating new business value from legacy applications. Modernization tools are required to extract a model from text in source code that conforms to a grammar by manipulating the concrete syntax-tree of the source code. For example, there is a tool that can convert Java swing applications to Android platform which uses two Object Management Group standards: Abstract Syntax Tree for representing data extracted from java swing code in reverse engineering phase and Knowledge Discovery Platform-independent model. Some tools can go further to propose a Rich Internet Application Graphical User Interface. The three phases articulated by this tool can be separated into stages as: the reverse engineering phase which uses the jdt API for parsing the Java swing code to fill in an AST and Graphical User Interface model and the restructuring phase that represents a model transformation for generating an abstract KDM model and the forward phase which includes the elaboration of the target model and a Graphical User Interface.

The overall process can be described as the following transitions:

Legacy system  

–parsing->

AST Meta model

–restructuring algorithm->

Abstract Knowledge Model

--forward engineering->

GUI Metamodel.

The reverse engineering phase is dedicated to the extraction and representation of information. It defines the first phase of reengineering following the Architecture Driven Modernization process. It is about the parsing technique and representing information in the form of a model. Parsing can focus on the structural aspect of header and source files and then there is the presentation layer that determines the layout of the functionalities such as widgets.

The restructuring phase aims at deriving an enriched conceptual technology independent specification of the legacy system in a knowledge model KDM from the information stored inside the models generated on the previous phase. KDM is an OMG standard and can involve up to four layers: Infrastructure layer, Program Elements layer, resource layer and abstractions layer. Each layer is dedicated to a particular application viewpoint.

The forward engineering is a process of moving from high-level abstractions by means of transformational techniques to automatically obtain representation on a new platform such as microservices or as constructs in a programming language such as interfaces and classes. Even the user interface can go through forward engineering into a Rich Internet application model with a new representation describing the organization and positioning of widgets.

Automation is key to developing a tool that enables these transitions via reverse engineering, restructuring and forward engineering.

 

 

Tuesday, November 29, 2022

Application modernization continued

 

This section of the article discusses a case study on the incremental code-migration strategy of large monolithic base used in supply system. The code migration strategy considers a set of factors that includes scaffolding code, balancing iterations, and grouping related functionality.

Incremental migration only works when it is progressive. Care must be taken to ensure that progress is measured by means of some key indicators. These include tests, percentage of code migration, signoffs and such other indicators. Correspondingly the backlog of the code in the legacy system that must be migrated must also decrease.

Since modernized components are being deployed prior to the completion of the entire system, it is necessary to combine elements from the legacy system with the modernized components to maintain the existing functionality during the development period. Adapters and other wrapping techniques may be needed to provide a communication mechanism between the legacy system and the modernized systems, when dependencies exist.

There is no downtime during the incremental modernization approach and this kind of modernization effort tries to always keep the system fully operational while reducing the amount of rework and technical risk during the modernization. One way to overcome challenges in this regard is to plan the efforts involved in the modernization. A modernization plan must also include the order in which the functionality is going to be modernized.

Another way to overcome challenges is to build and use adapters, bridges and other scaffolding code which represents an added expense, as this code must be designed, developed, tested and maintained during the development period but it eventually reduces the overall development and deployment costs.

Supporting an aggressive and yet predictable schedule also helps in this regard. The componentization strategy should seek to minimize the time required to develop and deploy the modernized system.

This does not necessarily have a tradeoff with quality as both the interim and final stages must be tested and the gates for release and progression towards revisions only helps with the overall predictability and timeline of the new system.

Risk occurs in different forms and some risk is acceptable if it is managed and mitigated properly. Due to the overall size and investment required to complete a system migration, it is important that the overall risk be kept low. The expectations around the system including its performance helps to mitigate these risks.