Skip to content

Commit 910d573

Browse files
authored
Update README.md (#204)
1 parent 2b87be2 commit 910d573

1 file changed

Lines changed: 14 additions & 19 deletions

File tree

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Essentially, it helps you write long-lived, reliable code that can survive crash
1515
As your workflows run, DBOS checkpoints each step they take in a Postgres database.
1616
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.
1717

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.
2020

2121
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.
2222
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
7171

7272
####
7373

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.
7575

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.
7877

7978

8079
```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();
8382
```
8483

8584
[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
9089

9190
####
9291

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.
9594
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.
9695

9796
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
102101

103102
```java
104103
public void queuedTasks() {
105-
var q = new Queue("childQ");
106-
DBOS.registerQueue(q);
107-
DBOS.launch();
108-
109104
for (int i = 0; i < 3; i++) {
110105
String workflowId = "child" + i;
111106
var options = new StartWorkflowOptions(workflowId).withQueue(q);
@@ -119,6 +114,10 @@ They don't require a separate queueing service or message broker&mdash;just Post
119114
System.out.println(h.getResult());
120115
}
121116
}
117+
118+
// In your main
119+
var queue = new Queue("exampleQueue");
120+
DBOS.registerQueue(queue);
122121
```
123122

124123
[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
205204

206205
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.
207206

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.
209208
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.
215210

216211
</details>
217212

0 commit comments

Comments
 (0)