In the current process for applying for a bank loan, applicants often face inefficiencies and inconveniences. The application process typically involves multiple stages and requires several visits to the bank. This cumbersome process can lead to delays, frustration, and decreased customer satisfaction. This problem can be solved via automating the loan approval workflow using a workflow management system. Define clear, standardized steps for loan processing and state management, and automate routine tasks such as credit checks and document verification. Providing applicants with real-time updates on the status of their loan with automated workflows.
Temporal gives developers the ability to create complex systems that can sometimes face unpredictable problems and even failures. However, Temporal steps in to make these systems more reliable and efficient. Without Temporal, developers would have to write extra code to make their systems tough and able to bounce back from failures. But Temporal helps build resilient and reliable applications through its innovative design and programming model where developers can focus on their core business logic. This lets developers focus on making the core parts of their software work smoothly without worrying too much about handling failures and complicated code.
Temporal simplifies the intricate tasks of coordinating applications and ensuring their durability through the use of workflows. What’s particularly advantageous is that Temporal offers a range of software development kits (SDKs) in various programming languages, making it exceptionally accessible and straightforward to integrate with the Temporal server.
When developers use the Temporal Platform, they get a bunch of helpful tools for making strong and big applications that can handle lots of work. In this setup, the code for workflows and tasks is run smoothly by a worker that’s built using the Temporal software tools. This way, it ensures that the applications work reliably and can grow to handle more work when needed.
Additionally, Temporal is really good at dealing with situations when things go wrong, saving developers from having to write a lot of complicated code to handle errors.
For deployment flexibility, the Temporal server can be either self-hosted using the open-source version or consumed as a cloud-based Software as a Service (SaaS) solution through Temporal Cloud. Whether you prefer an on-premises setup or a cloud-based approach, Temporal has you covered.
A temporal infrastructure model for distributed systems often involves managing and coordinating workflows and processes that have temporal dependencies. This includes tasks such as orchestrating complex workflows, handling retries, dealing with failures, and managing state changes over time and deals with managing temporal workflows or processes.
Temporal’s core components are the essential building blocks that collectively empower developers to create resilient and efficient applications. Here’s a breakdown of these building blocks:
- Workflow Functions:
- Workflow functions are stateful and serve as the conductors of your applications.
- Temporal securely stores local variables and thread details.
- In case of server crashes, Temporal seamlessly resumes workflows from the exact point before the crash.
- Workflows can remain paused for extended durations, removing the need for queues or databases to track temporary states.
- Workflow functions interact with unreliable services using activity functions.
- Activity Functions:
- Activity functions, or simply “Activities,” are stateless but highly configurable.
- They can be equipped with retry policies, timeouts, and heartbeats.
- Heartbeats are used to signal the Temporal server during long-running activities.
- Activities are exclusively utilized within workflows to interact with unreliable services.
- Temporal handles activity retries automatically in cases of failures.
- Application Worker:
- Application workers are services constructed using Temporal SDKs.
- They are responsible for registering workflows and activities.
- These workers continuously poll the Temporal server for tasks assigned to predefined task queues.
- Application workers are stateless, enabling the flexible allocation and removal of blocked workflows as needed.
- Task Queue:
- Task queues are lightweight components in Temporal.
- They are created when an application worker registers a workflow.
- Two types of queues exist: Activity Task Queue and Workflow Task Queue.
- Workers efficiently poll task queues via synchronous RPC for task retrieval.
- Temporal employs RPC for internal communication.
- Temporal Cluster:
- A Temporal server comprises a cluster of services.
- Temporal services can be grouped on one or more machines or run independently.
- Each service within the cluster may have distinct scaling requirements and troubleshooting needs.
- For example, frontend services scale independently since they don’t require sharding or partitioning.
- These building blocks collectively form the foundation of Temporal, enabling developers to construct resilient, long-running workflows that orchestrate complex processes with ease and reliability.
Temporal’s robustness lies in its ability to handle workflow continuity after system failures. It achieves this by internally storing critical configurations and state-related data. So, when a system crashes or experiences interruptions, Temporal can seamlessly resume workflows from their previous states. This resilience extends to managing interconnected services within distributed systems, addressing potential points of failure. Temporal ensures the reliability and integrity of complex processes, making it a good tool for technical teams.
Temporal Adoption in YUBI
- YUBI is embracing Temporal extensively to automate the entire credit journey for both lenders and customers. Using Temporal as the backbone, they can seamlessly monitor the application’s status and all associated details through a State Machine. This State Machine, powered by Temporal, efficiently manages the intricate application workflows, enhancing the overall experience for all stakeholders involved.
- Temporal Saga and distributed transactions play a pivotal role in ensuring data consistency between the Loan Origination System (LOS) and Loan Management System (LMS). These systems employ Saga Patterns to facilitate the seamless replication of data from LOS to LMS. In the event of any failure within this process, the transaction is automatically rolled back, guaranteeing the integrity and accuracy of the data across both systems.
- Microservice Orchestrations – In the context of YUBI projects, microservice orchestration using Temporal plays a crucial role in ensuring a seamless customer experience. For example, in a loan application process, various microservices might be involved, such as credit scoring, document verification, and approval. Temporal can orchestrate these microservices, ensuring that the customer’s loan application progresses smoothly from one step to the next.
- Temporal’s Flow Control feature, whether implemented explicitly or implicitly, is a powerful tool for orchestrating workflow interactions with external systems and API services. It offers precise control over how workflows progress, ensuring smooth coordination and efficiency. This feature enhances reliability and streamlines interactions, making it a valuable asset for developers working with Temporal.
Temporal serves as a cloud-native workflow engine, simplifying the development and execution of intricate, long-running applications. It offers developers an intuitive approach to crafting and managing business workflows that are both scalable and fault-tolerant, eliminating the need for custom code for tasks like timers and state persistence. Beyond the fundamentals, Temporal boasts an array of advanced features, including rate limiting, heartbeat activities, signals, and queries, making it a versatile tool for workflow orchestration.
At YUBI, Temporal has become an indispensable component of our engineering toolkit. It empowers our engineers to employ command-driven orchestration patterns alongside event-driven choreography designs in our microservices architecture. This combination enables horizontal scaling and enhances our system’s resilience in the face of failures.