Git Product home page Git Product logo

temporal-intro's Introduction

Introduction to Temporal

This repository contains the samples supporting the YouTube video https://youtu.be/LulonIoYOP8.

Installing Temporal CLI

The easiest way to try out Temporal is to use the CLI which is a lightweight distribution with zero runtime dependencies. This is perfect to start experimenting.

You can use the following command on Linux:

curl -sSf https://temporal.download/cli.sh | sh

Other installation methods are described in the official repository.

Start the Temporal Server and the Web UI

Run the following command to start the Temporal Server and Web UI:

temporal server start-dev

The Temporal server will start in ephemeral mode, i.e. all data is stored in memory thus it is lost on restart. You can access the Web UI at http://localhost:8233.

If you want to make data persistent across restarts, use the following command line:

temporal server start-dev --db-filename temporal.db

Creating a workflow request

The code showing how a workflow is invoked is found in the OrderWorkflowLauncher class. You can launch this class and if you access the Web UI, you should see the workflow scheduled.

Launching the Worker process

Workflows and Activities are executed by Workers. The code showing how we declare a worker and connect it to temporal is in the WorkerLauncher class.

Workflows and Activities

Workflows and Activities are declared as interfaces, which are then implemented by workers.

In this example, we put all the code in one component. However, you could implement activities in other microservices. You can also nest workflows if you wish.

Upcoming

I will try to put more effort on this repository if you find it useful. Just leave me a comment on the video https://youtu.be/LulonIoYOP8

temporal-intro's People

Contributors

marcolenzo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.