|
| 1 | +## Goals |
| 2 | + |
| 3 | +**Primary** |
| 4 | + |
| 5 | +- Performance |
| 6 | +- Fast to write for |
| 7 | +- Only depend on CockroachDB |
| 8 | + |
| 9 | +**Secondary** |
| 10 | + |
| 11 | +- Easy to monitor & manage via simple SQL queries |
| 12 | +- Easier to understand than messages |
| 13 | +- Rust-native |
| 14 | + - Run in-process and as part of the binary to simplify architecture |
| 15 | + - Leverage traits to reduce copies and needless ser/de |
| 16 | + - Use native serde instead of Protobuf for simplicity (**this comes at the cost of verifiable backwards compatability with protobuf**) |
| 17 | +- Lay foundations for OpenGB |
| 18 | + |
| 19 | +## Use cases |
| 20 | + |
| 21 | +- Billing cron jobs with batch |
| 22 | +- Creating servers |
| 23 | +- Email loops |
| 24 | +- Creating dynamic servers |
| 25 | + - What about dynamic server lifecycle? Is this more of an actor? This is blending between state and other stuff. |
| 26 | +- Deploying CF workers |
| 27 | + |
| 28 | +## Questions |
| 29 | + |
| 30 | +- Concurrency |
| 31 | +- Nondeterministic patches: https://docs.temporal.io/dev-guide/typescript/versioning#patching |
| 32 | +- Do we plan to support side effects? |
| 33 | + |
| 34 | +## Relation to existing Chirp primitives |
| 35 | + |
| 36 | +### Messages |
| 37 | + |
| 38 | +Workflows replace the usecase of messages for durable execution, which is almost all uses of messages. |
| 39 | + |
| 40 | +Messages should still be used, but much less frequently. They're helpful for: |
| 41 | + |
| 42 | +**Real-time Data Processing** |
| 43 | + |
| 44 | +- When you have a continuous flow of data that needs to be processed in real-time or near-real-time. |
| 45 | +- Examples include processing sensor data, social media feeds, financial market data, or clickstream data. |
| 46 | +- Stream processing frameworks like Apache Kafka, Apache Flink, or Apache Spark Streaming are well-suited for handling high-volume, real-time data streams. |
| 47 | + |
| 48 | +**Complex Event Processing (CEP)** |
| 49 | + |
| 50 | +- When you need to detect and respond to patterns, correlations, or anomalies in real-time data streams. |
| 51 | +- CEP involves analyzing and combining multiple event streams to identify meaningful patterns or trigger actions. |
| 52 | +- Stream processing frameworks provide capabilities for defining and matching complex event patterns in real-time. |
| 53 | + |
| 54 | +**Data Transformation and Enrichment** |
| 55 | + |
| 56 | +- When you need to transform, enrich, or aggregate data as it arrives in real-time. |
| 57 | +- This can involve tasks like data cleansing, normalization, joining with other data sources, or applying machine learning models. |
| 58 | +- Stream processing allows you to process and transform data on-the-fly, enabling real-time analytics and insights. |
| 59 | + |
| 60 | +**Continuous Data Integration** |
| 61 | + |
| 62 | +- When you need to continuously integrate and process data from multiple sources in real-time. |
| 63 | +- This can involve merging data streams, performing data synchronization, or updating downstream systems. |
| 64 | +- Stream processing frameworks provide connectors and integrations with various data sources and sinks. |
| 65 | + |
| 66 | +**Real-time Monitoring and Alerting** |
| 67 | + |
| 68 | +- When you need to monitor data streams in real-time and trigger alerts or notifications based on predefined conditions. |
| 69 | +- Stream processing allows you to define rules and thresholds to detect anomalies, errors, or critical events and send real-time alerts. |
| 70 | + |
| 71 | +**High-throughput, Low-latency Processing** |
| 72 | + |
| 73 | +- When you have a high volume of data that needs to be processed with low latency. |
| 74 | +- Stream processing frameworks are designed to handle high-throughput data streams and provide low-latency processing capabilities. |
| 75 | +- This is particularly useful in scenarios like fraud detection, real-time recommendations, or real-time bidding in advertising systems. |
| 76 | + |
| 77 | +### Cross-package hooks |
| 78 | + |
| 79 | +We currently use messages for hooking in to events from other workflows so we don't have to bake in support directly. |
| 80 | + |
| 81 | +This is potentially error prone since it makes control flow more opaque. |
| 82 | + |
| 83 | +TBD on if we keed this pattern. |
| 84 | + |
| 85 | +### Workflows & operations across packages |
| 86 | + |
| 87 | +**Child workflows** |
| 88 | + |
| 89 | +TODO |
| 90 | + |
| 91 | +**Operations** |
| 92 | + |
| 93 | +TODO |
| 94 | + |
| 95 | +## Temporal docs |
| 96 | + |
| 97 | +https://docs.temporal.io/encyclopedia/ |
| 98 | + |
0 commit comments