You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-19Lines changed: 14 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ Essentially, it helps you write long-lived, reliable code that can survive crash
15
15
As your workflows run, DBOS checkpoints each step they take in a Postgres database.
16
16
When a process stops (fails, intentionally suspends, or a machine dies), your program can recover from those checkpoints to restore its exact state and continue from where it left off, as if nothing happened.
17
17
18
-
In practice, this makes it easier to build reliable systems for use cases like AI agents, payments, data synchronization, or anything that takes minutes, days, or weeks to complete.
19
-
Rather than bolting on ad-hoc retry logic and database checkpoints, durable workflows give you one consistent model for ensuring progress without duplicate execution.
18
+
In practice, this makes it easier to build reliable systems for use cases like AI agents, data synchronization, payments, or anything that takes minutes, days, or weeks to complete.
19
+
Rather than bolting on ad-hoc retry logic and database checkpoints, DBOS workflows give you one consistent model for ensuring your programs can recover from any failure from exactly where they left off.
20
20
21
21
This library contains all you need to add durable workflows to your program: there's no separate service or orchestrator or any external dependencies except Postgres.
22
22
Because it's just a library, you can incrementally add it to your projects, and it works out of the box with frameworks like Spring.
@@ -71,15 +71,14 @@ Workflows are particularly useful for
71
71
72
72
####
73
73
74
-
DBOS can run your workflows asynchronously without you needing to make any changes to the interface or implementation.
74
+
You can run your workflows asynchronously without making any changes to their interface or implementation.
75
75
76
-
This is ideal for long-running workflows whose result might not be available immediately.
77
-
You code can return at a later point and check the status for completion and/or retrive the result.
76
+
This is ideal for long-running background workflows: you code can return at a later point and check the status for completion and/or retrieve the result.
78
77
79
78
80
79
```java
81
-
var handle =DBOS.startWorkflow(()->example.exampleWorkflow("HelloDBOS"));
82
-
result = handle.getResult();
80
+
var handle =DBOS.startWorkflow(()->example.exampleWorkflow("HelloDBOS"));
81
+
result = handle.getResult();
83
82
```
84
83
85
84
[Read more ↗️](https://docs.dbos.dev/java/tutorials/workflow-tutorial#starting-workflows-in-the-background)
@@ -90,8 +89,8 @@ You code can return at a later point and check the status for completion and/or
90
89
91
90
####
92
91
93
-
DBOS queues help you **durably** run tasks in the background.
94
-
You can enqueue a task (which can be a single step or an entire workflow) from a durable workflow and one of your processes will pick it up for execution.
92
+
DBOS queues help you **durably** run distributed tasks.
93
+
You can enqueue a task from a durable workflow and one of your processes will pick it up for execution.
95
94
DBOS manages the execution of your tasks: it guarantees that tasks complete, and that their callers get their results without needing to resubmit them, even if your application is interrupted.
96
95
97
96
Queues also provide flow control, so you can limit the concurrency of your tasks on a per-queue or per-process basis.
@@ -102,10 +101,6 @@ They don't require a separate queueing service or message broker—just Post
102
101
103
102
```java
104
103
publicvoid queuedTasks() {
105
-
var q =newQueue("childQ");
106
-
DBOS.registerQueue(q);
107
-
DBOS.launch();
108
-
109
104
for (int i =0; i <3; i++) {
110
105
String workflowId ="child"+ i;
111
106
var options =newStartWorkflowOptions(workflowId).withQueue(q);
@@ -119,6 +114,10 @@ They don't require a separate queueing service or message broker—just Post
119
114
System.out.println(h.getResult());
120
115
}
121
116
}
117
+
118
+
// In your main
119
+
var queue =newQueue("exampleQueue");
120
+
DBOS.registerQueue(queue);
122
121
```
123
122
124
123
[Read more ↗️](https://docs.dbos.dev/java/tutorials/queue-tutorial)
@@ -205,13 +204,9 @@ Then, check out the [programming guide](https://docs.dbos.dev/java/programming-g
205
204
206
205
Both DBOS and Temporal provide durable execution, but DBOS is implemented in a lightweight Postgres-backed library whereas Temporal is implemented in an externally orchestrated server.
207
206
208
-
You can add DBOS to your program by installing this open-source library, connecting it to Postgres, and registering workflows and steps.
207
+
You can add DBOS to your program by installing the open-source library, connecting it to Postgres, and annotating workflows and steps.
209
208
By contrast, to add Temporal to your program, you must rearchitect your program to move your workflows and steps (activities) to a Temporal worker, configure a Temporal server to orchestrate those workflows, and access your workflows only through a Temporal client.
210
-
[This blog post](https://www.dbos.dev/blog/durable-execution-coding-comparison) makes the comparison in more detail.
211
-
212
-
**When to use DBOS:** You need to add durable workflows to your applications with minimal rearchitecting, or you are using Postgres.
213
-
214
-
**When to use Temporal:** You don't want to add Postgres to your stack, or you need a language DBOS doesn't support yet.
209
+
[This page](https://docs.dbos.dev/explanations/comparing-temporal) makes the comparison in more detail.
0 commit comments