Skip to content

Why? What? How? #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nelsonic opened this issue Mar 4, 2022 · 51 comments
Open

Why? What? How? #1

nelsonic opened this issue Mar 4, 2022 · 51 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nelsonic
Copy link
Member

nelsonic commented Mar 4, 2022

The home page https://temporal.io is a classic landing page ... tells me nothing
image

image

image

image

image

image

image

image

image

Lots of social proof: πŸ™„

image

image

image

This homepage has told me exactly zero of What I'm looking at or How it works. πŸ€¦β€β™‚οΈ

@nelsonic nelsonic added enhancement New feature or request good first issue Good for newcomers labels Mar 4, 2022
@nelsonic
Copy link
Member Author

nelsonic commented Mar 5, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

The hero text at the top of the Use Cases page https://temporal.io/use-cases is more social proof noise:

image

Keep scrolling and it's logos ...

image

image

At no point do they actually give any inkling what the actual use case might be!! 😑

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Busy watching this: Designing a Workflow Engine from First Principles: https://youtu.be/t524U9CixZ0 πŸ“Ί ⏳

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Explaining Worflows, Task Queues ... ⏳

image

YouTube shortcut for speeding up playback > (Greater-than sign)

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Most applications use databases for storing Task Queues:
image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Maxim has used the word "scalability" so many times in the last 10 minutes ... πŸ™„

image

image

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Behind the scenes Temporal is using Elastic for storing data:

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

"Transfer queue mechanism" ...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Multicluster deployment:

image

i.e. paying for many instances ...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Wow. talk could have been 5 minutes. talk about dragging it out. πŸ™„

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Next:

Complete Intro to Temporal Workshop - TypeScript SDK: https://youtu.be/CeHSmv8oF_4

image

Published Dec 4, 2021 ... 3 months ago. Is this even still relevant? Surely there are like 10 new frameworks since then!

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Endorsement from Mitchell Hashimoto of Hashicorp:
image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Yah, it uses gRPC under the hood.

image

Suuuuuuuuuper scalable! πŸš€

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Workflows vs. Activities:
image

Basically nothing that has a side-effect is allowed in a workflow.

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Loading ...

image

Good thing nobody is in a hurry. ⏳

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

While I wait ...
Watching this quick intro: https://youtu.be/2HjnQlnA5eY

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

Following the getting started guide: https://docs.temporal.io/docs/typescript/introduction/#getting-started

Bunch of warnings:

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

To begin development, start Temporal Server:

cd ~/path/to/temporal/docker-compose/
docker-compose up

If you haven’t run Temporal Server before, visit:
https://docs.temporal.io/docs/typescript/getting-started/

Then, in the project directory, using two other shells, run these commands:

npm run start.watch
npm run workflow

Got the following error:

[nodemon] starting `ts-node src/worker.ts`
Found prebuilt bridge module {
  binary: '/Users/n/code/learn-temporal/example/node_modules/@temporalio/core-bridge/releases/x86_64-apple-darwin/index.node'
}
[TransportError: Server connection error: tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))]
[nodemon] app crashed - waiting for file changes before starting...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 8, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

I can certainly see the benefits Temporal.
But the learning curve is steep ...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

The temporal forum has only 3 threads for the typescript-sdk tag:
https://community.temporal.io/tag/typescript-sdk
image

Not very active ... πŸ’­

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

"a real life production deployment can have 5 Frontend, 15 History, 17 Matching, and 3 Worker services per cluster."

https://docs.temporal.io/docs/concepts/what-is-a-temporal-cluster

image

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

Gitpod timed out:
image

Reloading ...

image

It didn't save my state ... πŸ™„
Starting everything again from scratch.

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

Going to try and run everything on localhost instead.

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

@nelsonic
Copy link
Member Author

nelsonic commented Mar 9, 2022

@nelsonic
Copy link
Member Author

Installing docker ... ⏳

image

image

image

Still blows my mind that this app is so ridiculously huge!! 🀯

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Read this while waiting ... https://docs.temporal.io/docs/server/production-deployment/

@nelsonic
Copy link
Member Author

image

image

Of course it does ...

image

@nelsonic
Copy link
Member Author

$ docker-compose up
Error response from daemon: dial unix /Users/n/Library/Containers/com.docker.docker/Data/docker.raw.sock: connect: no such file or directory

Trying to run the sample container:

docker run -d -p 80:80 docker/getting-started

Seeing:

Unable to find image 'docker/getting-started:latest' locally
latest: Pulling from docker/getting-started
59bf1c3509f3: Pull complete 
8d6ba530f648: Pull complete 
5288d7ad7a7f: Pull complete 
39e51c61c033: Pull complete 
ee6f71c6f4a8: Pull complete 
f2303c6c8865: Pull complete 
0645fddcff40: Pull complete 
d05ee95f5d2f: Pull complete 
Digest: sha256:aa945bdff163395d3293834697fa91fd4c725f47093ec499f27bc032dc1bdd16
Status: Downloaded newer image for docker/getting-started:latest
64ba27e3e31ba2efe50f5f3a2a12ba5094686dab3cf1fbcb40def900de78065e

image

@nelsonic
Copy link
Member Author

Fans running on my poor mac ...
image

@nelsonic
Copy link
Member Author

5 Docker containers running just to do "hello world" in Temporal ... πŸ™„

image

http://localhost:8088/
image

@nelsonic
Copy link
Member Author

image

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Once Docker has successfully downloaded all its dependencies and booted the containers,
you should see something similar to the following in the Docker Desktop App:

docker-temporal-5-containers

@nelsonic
Copy link
Member Author

Fun fact: The node_modules directory for the Hello World example in Temporal uses 473.7 MB (504.5 MB on disk) ...

image

You wouldn't want to have too many of these projects. πŸ™„

nelsonic added a commit that referenced this issue Mar 15, 2022
@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

image

@nelsonic
Copy link
Member Author

Attempting to run docker-compose up -d

Get the following error:

Creating network "temporal-network" with driver "bridge"
Creating temporal-elasticsearch ... error
Creating temporal-postgresql    ...

ERROR: for temporal-elasticsearch  Cannot create container for service elasticsearch: Conflict. The container name "/temporal-elasticsearch" is already in use by container "830fbd148bb1f4e3422901f7ab362f09b40219a
Creating temporal-postgresql    ... error

ERROR: for temporal-postgresql  Cannot create container for service postgresql: Conflict. The container name "/temporal-postgresql" is already in use by container "ed97ad218913ad6d2a2d5ac2fbd13a81e51d7250e002e4ec693b0f63a18d76bc". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for elasticsearch  Cannot create container for service elasticsearch: Conflict. The container name "/temporal-elasticsearch" is already in use by container "830fbd148bb1f4e3422901f7ab362f09b40219ae4d4e82abda8d3f99d36dd16e". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for postgresql  Cannot create container for service postgresql: Conflict. The container name "/temporal-postgresql" is already in use by container "ed97ad218913ad6d2a2d5ac2fbd13a81e51d7250e002e4ec693b0f63a18d76bc". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.
n@MBP docker-compose % docker-compose down --remove-orphans
Removing network temporal-network
n@MBP docker-compose % docker-compose up -d
Creating network "temporal-network" with driver "bridge"
Creating temporal-postgresql ...
Creating temporal-elasticsearch ... error

ERROR: for temporal-elasticsearch  Cannot create container for service elasticsearch: Conflict. The contai
Creating temporal-postgresql    ... error
e4d4e82abda8d3f99d36dd16e". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for temporal-postgresql  Cannot create container for service postgresql: Conflict. The container name "/temporal-postgresql" is already in use by container "ed97ad218913ad6d2a2d5ac2fbd13a81e51d7250e002e4ec693b0f63a18d76bc". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for elasticsearch  Cannot create container for service elasticsearch: Conflict. The container name "/temporal-elasticsearch" is already in use by container "830fbd148bb1f4e3422901f7ab362f09b40219ae4d4e82abda8d3f99d36dd16e". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for postgresql  Cannot create container for service postgresql: Conflict. The container name "/temporal-postgresql" is already in use by container "ed97ad218913ad6d2a2d5ac2fbd13a81e51d7250e002e4ec693b0f63a18d76bc". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.

@nelsonic
Copy link
Member Author

Thankfully - or sadly depending on your view - this is an issue many people have faced before.
Google search surfaces the following thread: moby/moby#23371

Good thing Docker is so efficient and doesn't take up any space on your SSD ...

image

Ran:

docker container prune

Purged all the Docker Containers and re-created them to test how long it would take.
Obviously Docker only removed the volumes but not the downloaded dependencies so in actual fact they weren't "purged" at all.

nelsonic added a commit that referenced this issue Mar 19, 2022
@nelsonic
Copy link
Member Author

docker ps

image

@nelsonic
Copy link
Member Author

docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[61540] Failed to execute script docker-compose

Had to delete the previous docker containers and re-create them. Then it worked.

@yazinsai
Copy link

yazinsai commented Apr 9, 2022

This is hilarious, and also on the first page of Google for "learn temporal" :) Actually managed to get the darn thing setup after reading through your posts..

@nelsonic
Copy link
Member Author

nelsonic commented Apr 9, 2022

@yazinsai stoked you found the thread and that it was useful to you in your quest to get Temporal running. Please drop a β€œlike” (⭐) on the repo so I have motivation to continue writing the tutorial. 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants