Skip to content
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

docs: update readme file #6

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/docs/demo.mp4
Binary file not shown.
Binary file added .github/docs/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 74 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,102 @@
</p>
<br>

# Spiral Framework Starter Template
# Spiral Demo with Temporal Workflows.

Check failure on line 37 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Trailing punctuation in heading

README.md:37:38 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: '.'] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md026.md

This is an **opinionated** modified version of the Spiral Framework which aims at providing a Domain-Driven Design (DDD) structure.
This project demonstrates the implementation of web application transfers using [Temporal.io](https://temporal.io) with [Spiral Framework](https://spiral.dev).

It showcases how to handle complex, distributed workflows in a reliable and maintainable way.

## 📄 About

To be added...
**Imagine moving an entire website between servers - files, databases, domains - with zero downtime and automatic failure recovery.**

<br>
This is exactly what this project achieves through durable [Workflows](https://docs.temporal.io/workflows?basic-workflow-definition=php).

### → Demo Video

[![Temporal Demo](./.github/docs/thumbnail.png)](./.github/docs/demo.mp4 "Temporal Demo")

🙏 If you find this repository useful, consider giving it a ⭐️. Thank you!

<br>

### → The Challenge

This project uses Website Transfer from `Server A` to `Server B` as an example scenario because it shows many common distributed system challenges:

- Network issues during file transfer
- Database backup corruption
- DNS propagation delays
- Server configuration problems
- Timeout issues during large transfers

Traditional approaches require complex error handling, manual recovery procedures, and often lead to extended downtimes. This project offers a robust solution.

### → The Solution

Using Temporal.io, this app demonstrates reliable, self-healing website transfer system that:

- Automatically retries failed operations
- Resumes from the last successful step after crashes
- Provides real-time transfer status visibility
- Handles long-running operations gracefully
- Maintains consistency during the entire process

For example, here's how a website transfer is initiated:

```bash
$ make up

Check failure on line 82 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Dollar signs used before commands without showing output

README.md:82:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ make up"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md014.md
$ make ssh

Check failure on line 83 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Dollar signs used before commands without showing output

README.md:83:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ make ssh"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md014.md
$ php app.php website:transfer

Check failure on line 84 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Dollar signs used before commands without showing output

README.md:84:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ php app.php website:transfer"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md014.md
```

You can monitor the workflow execution through the Temporal UI at:

```bash
https://temporal.spiral-app-temporal-demo.docker
```

The system then automatically orchestrates the entire process:

```mermaid
graph TD
A[Start Transfer] --> B[Backup Files]
B --> C[Release Domain]
C --> D[Backup Database]
D --> E[Transfer Backups]
E --> F[Allocate Space]
F --> G[Restore Database]
G --> H[Restore Files]
H --> I[Attach Domain]
I --> J[Complete]
```

### → Use Cases

This example can be adapted for various scenarios:

- Website migrations between hosting providers
- Server infrastructure updates
- Disaster recovery procedures
- Development environment replication

The architecture provided serves as a template for implementing other complex, distributed workflows in your applications.

<br>

## 🚀 Features

This starter template includes several added, changed, and removed features:

### → Framework Modifications

* **Added:**

Check failure on line 127 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:127:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* To be added...

Check failure on line 128 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:128:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* **Changed:**

Check failure on line 129 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:129:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* To be added...

Check failure on line 130 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:130:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* **Removed:**

Check failure on line 131 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:131:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
* To be added...

Check failure on line 132 in README.md

View workflow job for this annotation

GitHub Actions / markdown-linting

Unordered list style

README.md:132:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md

### → Development Tools

Expand Down
Loading