APIs Archives - Indium https://www.indiumsoftware.com/blog/tag/apis/ Make Technology Work Wed, 12 Jun 2024 09:03:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://www.indiumsoftware.com/wp-content/uploads/2023/10/cropped-logo_fixed-32x32.png APIs Archives - Indium https://www.indiumsoftware.com/blog/tag/apis/ 32 32 How Mendix can work with your Existing Database https://www.indiumsoftware.com/blog/how-mendix-can-work-with-your-existing-database/ Mon, 15 Apr 2024 11:34:00 +0000 https://www.indiumsoftware.com/?p=14884 Problem Statement In some cases, the solution needs to work with organizations who want to keep the Database separately from Mendix or want to use the existing database. 1. Solution First, it is possible to build a Mendix application and to bring your own database. But the question is how your Mendix application can work

The post How Mendix can work with your Existing Database appeared first on Indium.

]]>
Problem Statement

In some cases, the solution needs to work with organizations who want to keep the Database separately from Mendix or want to use the existing database.

1. Solution

First, it is possible to build a Mendix application and to bring your own database. But the question is how your Mendix application can work seamlessly with your existing database tables & data. The solution(s) we are discussing and elaborating here is not applicable in case the existing application is being developed with a Microservices or Service Oriented Architecture, with this architecture mostly the database operations are handled using APIs.

There are ways Mendix can work with existing database tables, but how? Each of our problem statements is different, but it can be broadly classified and sectioned into a few questions that we need to answer and identify the right approach for our problem statement(s)

1.1 Questions

1. How do we want to provide access to the database?

  • Full Control to Mendix
  • Limited access to user roles, e.g. Read only
  • Whether the production needs database administrator intervention to approve the DML statements before the application installation?

2. Are we going to share this database with other applications?

3. Are we migrating the application, which uses your current database, to Mendix?

4. Do you want to migrate Mendix database but a different database like MSSQL to Postgres using Mendix?

1.2 Indium Matrix for using Existing Database in Mendix

Below are the tools and techniques to choose from

1. Database Replication

2. Database Connector

3. Mendix Modeller Configuration

4. Database as a Web Service – REST, OData, SOAP

5. Mendix Platform SDK (Programmatic solution)

We at Indium Software put together our knowledge and experience with the simple matrix to choose the right option at given point in time based on the problem the customer faces.

 

2. Tools

Read our success story on: Diagnostics Management Application Development Using Mendix

Click here

2.1  Database Replication

Database Supported Type Category Company Support Link
RDMS Module Modules Mendix Platform DB Replication

2.1.1 About

You can use the Database Replication module to import data from existing databases into your Mendix application. You have the ability to specify the mapping for each table, column, and relationship to your Mendix domain model. Even complex mappings involving multiple table joins can be achieved. The configuration can be done either in the client or using Java.

2.1.2 Typical Use Cases

  • Convert an existing database to a Mendix domain model.
  • Integrate your programme with a database used by another programme.
  • Create mappings between database columns and object attributes
  • Map database references to Mendix object references
  • Map object attributes based on multiple joined tables

2.1.3 Features

  • Support for custom queries for object attributes
  • Compatibility with SQL Server 2005 or later, Oracle, AS400, DB2, PostgreSQL, DMS2, and Informix database systems.
  • Assistance with non-persistent objects
  • Automatic query generation for object attribute values
  • Object events are executed when importing

https://marketplace.mendix.com/link/component/160

2.1.4 Advantages

  • You can configure how you want to import the data using multiple options which gives the flexibility.
  • Easy to use.
  • Reduce the efforts of migration.

2.1.5 Limitation

  • If  you are using the Excel Importer, then  you will need Excel Importer 3.0 or higher when using this module
  • Consumes lots of memory, since all the values need to be remembered to keep the track of all the key changes
  • It commits the object even though there are no changes to trigger the events, which can overburden the app.

2.1.6 Database Sync Process (Optional)

The data is updated in both systems thanks to scheduled synchronization between your application and a database used by another application.

Typical use case, during the phases of migration of the application. We do not recommend keeping two copies of the same data. This will cause the data to be inconsistent. So, choose wisely.

2.2  Database Connector

Database Supported Type Category Sub Category Company Support Link
Mendix Guide Module Addons Connectors Mendix Platform DB Connectors

 

 

GitHub Link: https://github.com/mendix/database-connector

2.2.1 About

The Database Connector allows for a quick connection to external DBs (databases), offering you the freedom to choose from a wide range of databases and SQL dialects. This enables you to integrate your external data directly into your Mendix application without any limitations.

The connector supports below functionality to execute queries at your databases: 

  • Run (Execute) query – For executing SELECT queries and obtaining a list of objects as a result
  • Run(Execute)  statement – For executing other DML commands and obtaining either an integer or long value indicating the number of rows affected.
  • Run(Execute)  parameterized query – For executing SELECT queries with input parameters, resulting in a list of objects.
  • Run(Execute)  parameterized statement – For executing other DML commands with input parameters and getting either an integer or long value representing the number of rows impacted.
  • Execute callable statement – For executing a callable statement.

2.2.2 Prerequisites

These are the prerequisites for using this connector:

  • A database connection URL address that points to your database
  • The username for logging into the database, with respect to the database connection url address
  • The password for logging into the database, with respect to the database connection url address
  • Add necessary JDBC driver libraries (.jar files) in the userlib directory of Mendix application
    • For e.g., if Mendix app needs to establish the connection to the Cloud PostgreSQL database (jdbc:postgresql://<instance URL>:5432/postgres), we need to put the corresponding PostgreSQL JDBC driver .jar inside the userlib folder.
  • Relevant to the Execute Query action: a domain model entity that can be utilized to hold the results of the executed query
    • For instance, if you have a query such as “select name, number from stock”, which has two columns (of string and integer data types respectively), to use the Execute Query action, you must add an entity in the domain model with attributes that match the columns in the query.

2.2.3 Advantages

  • Database connector is maintained with single threaded, avoiding memory leakages
  • Ability to connect to multiple databases in a single application (a composite microservices)

2.2.4 Limitation

  • The parameterized actions are only available with Database Connector versions 3.0.0 and above. For these, it is necessary to use Mendix 8.6.0 and above.            
  • You can face memory issues for large data sets.
  • Doesn’t have any configurations on thread pool size, connection timeout, etc.

2.3  Mendix Modeller Configuration

These settings can be configured as follows:

  • Studio Pro – To access the option to connect to a database in Studio Pro, go to the App Explorer, view the App, open Settings, edit a configuration, and check the Configuration tab. select either the Default Configuration or Active Configuration to display the option.

2.3.1 Prerequisites

    • Type: Currently supported RDMS databases
    • URL:  Database URL that points to your Database with the port. For example, if you want to connect to the Cloud PostgreSQL database, :
    • Database Name: Your Initial Database
    • Use Integrated Security, Applicable only for MSSQL (Microsoft SQL Server) Database
    • The username and password for logging into the database, relative to the database URL address
    • If the database connection requires a self-signed certificate to establish the connection, then add a Certificate in Certificates Tab

    2.3.2 Advantages

    • Easy to use connection can be achieved easily by proving the details.       

    2.3.3 Limitation

    • You can connect to the databases which are available in the list, else you need to use connectors.
    • For Production in Mendix Cloud, only PostgreSQL is available.
    • To use Integrated Security with MSSQL, the Mendix application should be deployed in Windows Server(IIS)

    2.4  Database as a Webservice

    2.4.1 About

    Web Services provide a solution to the interoperability issue by enabling different applications to connect their data. With Web Services, you can transfer data between diverse applications and platforms. To allow Mendix to use an existing database, you can expose the required functionality as a Service, making it easily accessible by Mendix.

    Mendix supports the most widely used web service standards, including SOAP, REST, and OData. However, creating a wrapper for an existing database to connect with Mendix may require additional effort. The recent trend towards Service-Oriented Architecture or Microservices promotes API-based connectivity, which is effortless and efficient in Mendix.

    On the other hand, if the database is not being utilized by any other applications, it is recommended to use the Data Connector or Data Replication to fully leverage the capabilities of Mendix.

    2.4.2 Mendix Data Hub

    There are few advantages when using Database as a web service when it is exposed as OData. Mendix provides a premium service called Data Hub.

    The Mendix Data Hub Catalog is a comprehensive and open metadata repository that is based on industry standards, allowing developers and business experts to find and explore data resources within their interconnected ecosystem.

    Data Hub Connectors enable organizations to integrate their data sources with Data Hub, thereby enhancing the catalog and making the data available to developers. Connecting to data from Mendix applications, Siemens Teamcenter, SAP, and numerous other commonly used enterprise data sources can be done with ease.

    Refer: https://www.mendix.com/data-hub/

    With Mendix Data Hub you find all data that is available across your Company’s software landscape and use it in your Mendix projects.

    To learn more about Indium’s experience with low code services

    Click Here

    Share Data between Mendix Apps – Use and edit Data Assets from one Mendix app in another.

    Connect to Non-Mendix Apps – Build an OData wrapper around your non-Mendix App to connect.

    Integrated in Studio (Pro) – Use the Data Hub Panel in Studio Pro to search and use for Data Assets.

    2.4.2.1  How to use Data Hub

    Search – Finding Connectable Data Sources

    Users can find shared datasets by searching the Data Hub Catalog

    Register – Sharing Datasets

    To make the data from your apps accessible to others, you can publish the datasets as an OData service and register it in Data Hub. In a Mendix application, the datasets correspond to the Entity sets for a specified Entity

    Consume – Using Registered Datasets

    Assets that have been registered in the Data Hub Catalog can be utilized in the Mendix Studio Pro for app development. These external data sources are displayed in the domain model as external entities, which can be combined with local entities.

    Curate – Maintaining Registered Assets

    To make sure the right people find your service, you can edit app owners, add tags and descriptions, and toggle discoverability.

    2.4.2.2  Advantages
    • DataHub has versioning, so you can stick to a specific version of the data and it is not required to change after structure is changed in the parent.
      • Latest Mendix  version supports CRUD operations in DataHub, which helps to maintain a single source of truth.
    2.4.2.3  Considerations
    • There will be some rework when DataHub data version is changed. 

    The post How Mendix can work with your Existing Database appeared first on Indium.

    ]]>
    Why Auto-Scaling and Deployment of Applications is Easier Using Kubernetes https://www.indiumsoftware.com/blog/why-auto-scaling-and-deployment-of-applications-is-easier-using-kubernetes/ Wed, 19 Oct 2022 06:41:05 +0000 https://www.indiumsoftware.com/?p=12798 Speed and ease of use are two key requirements of customers today. Modern businesses leverage cloud-native technologies to meet these needs by facilitating the development of scalable applications in dynamic environments leveraging cloud architecture such as microservices, containers, declarative APIs, service meshes, and immutable infrastructure. As they can be loosely coupled, they provide resilience and

    The post Why Auto-Scaling and Deployment of Applications is Easier Using Kubernetes appeared first on Indium.

    ]]>
    Speed and ease of use are two key requirements of customers today. Modern businesses leverage cloud-native technologies to meet these needs by facilitating the development of scalable applications in dynamic environments leveraging cloud architecture such as microservices, containers, declarative APIs, service meshes, and immutable infrastructure. As they can be loosely coupled, they provide resilience and are easy to manage. Automation further allows high-impact changes to be made as and when needed with minimum disruption.

    One of the key factors driving the success of the cloud application is the use of containers, which are light, fast, and portable, unlike virtual machines. They improve the testability of the applications, are more secure, and allow workloads to be isolated inside cost-effective clusters. This helps with faster development and deployment to meet the ever-changing needs of the customers.

    To know more about Indium’s Kubernetes capabilities, contact us now

    Get in touch

    To leverage containers successfully, developers need a managed container platform such as Kubernetes from Google. Kubernetes enables the building of customized platforms that align with the organization’s governance needs regarding project creation, nodes being used, and the libraries and repositories that can be tapped by providing a governed and secure framework.

    Kubernetes refers to an open-source model that helps create and scale reliable apps and services in a secure environment and adds value through innovation using standardized plugins and extensions. This is expected to help the global Kubernetes solutions market grow from USD 1747.20 million in 2021 at a CAGR of 17.70% to reach USD 5467.40 million by 2028.

    Automating Scaling and Deployment

    Kubernetes or K8s automate the deployment and management of cloud-native applications on public cloud platforms or on-premises infrastructure and orchestrate containerized applications to run on a cluster of hosts. Some of the functions of Kubernetes include:

    • Distributing application workloads across a Kubernetes cluster
    • Automating dynamic container networking needs
    • Allocating storage and persistent volumes to running containers
    • Enabling automatic scaling
    • Maintaining the desired state of applications
    • Providing resiliency

    Kubernetes Architecture

    The applications are encapsulated in the containers in a portable form, which makes it easy to deploy. The Kubernetes architecture is made up of clusters that include a minimum of one control plane and one worker node and are designed to run containerized applications.

    The control plane’s responsibilities include exposing the Kubernetes API through the API server and managing the nodes contained in the cluster. It manages the cluster and identifies and responds to cluster events.

    Kubernetes Pod is the smallest unit of execution for an application in Kubernetes, has one or more containers, and runs on worker nodes.

    Kubernetes allows two kinds of scaling:

    Horizontal Scaling: Horizontal Pod Autoscaler allows the adding of new nodes or increasing the replicated count of pods to the existing cluster of computing resources. The number of pods needed is calculated based on the metrics specified at the outset such as CPU and RAM consumption or other custom metrics.

    Vertical Scaling: In this, attributed resources are modified for each node in the cluster, and the resource requests and limits are adjusted as per current application requirements using Vertical Pod Autoscaler.

    Container Orchestration: Kubernetes container lifecycle management encompassing provisioning, deployment, scaling, networking, and load balancing is enabled through orchestration. This automates the tasks essential for running containerized workloads and services.

    Kubernetes Features

    Some of the key features of K8 that enable orchestrating containers across multiple hosts, automating cluster management, and optimizing resource utilization include:

    Auto-scaling: It enables the automated scaling up and down of containerized applications and their resources based on need.

    Lifecycle Management. It enables automated deployments and updates, rollback to earlier versions, pausing or continuing a deployment, and so on.

    Declarative Model: When the desired state is declared, K8s maintain that state and recover in case of failures by working in the background.

    Self-healing and Resilience: Application self-healing is made possible by automated placement, restart, replication, and scaling.

    Persistent Storage: Storage can be mounted and added dynamically.

    Load Balancing: Several types of internal and external load balancing is supported for diverse needs.

    DevSecOps Support: Kubernetes facilitates DevSecOps to improve developer productivity, simplify and automate container operations across clouds, and integrate security through the container life cycle.

    Some of the key benefits of Kubernetes include:

    • Faster time to release by simplifying the development lifecycle
    • Cost-effectiveness through automatic modulation of resource allocation
    • Making applications scalable and available

    Advantage Indium

    Indium Software is a cutting-edge cloud engineering company with a team of experts that can help with the migration and modernization of applications. Developing microservices and containerizing applications is one of our strengths. We are a Kubernetes solution provider, working closely with our customers and developing cloud-native applications and modernizing apps using the Kubernetes platform.

    Our DevSecOps expertise further helps us to leverage Kubernetes for faster development and deployment of applications with security integrated into the process. Our experts analyze and understand the business needs and facilitate smooth management of clusters for scaling up and down based on the need for greater availability at lower costs.

    The post Why Auto-Scaling and Deployment of Applications is Easier Using Kubernetes appeared first on Indium.

    ]]>