@T
Services
Stateless, networked application operations.
Distributed Application Programming Language
Always Distributed,
Laptop to Cloud
Unified backend language for the agentic era. Less code. Easy to review. Correct by design.
Missing! { String item }
@Catalog {} // a stateless service
@Catalog.price(String item) -> Decimal | Missing! {
r::Clock.sleep(50ms) // a slow lookup
[String: Decimal] prices = ["tea": 3.50, "cake": 4.25]
if has(prices, item) { return prices[item] }
return Missing! { item: item }
}
main() {
Decimal tea, scone, cake
DateTime start = r::Clock.time()
{
tea = @Catalog.price("tea") // sent at 0 ms
scone = @Catalog.price("scone") // sent at 0 ms
cake = @Catalog.price("cake") // sent at 0 ms
print(f"total {tea + scone + cake}") // 50 ms in all
} handle Missing! => 0.00
print(f"elapsed time: {r::Clock.time() - start}")
}Ready
! is an error type.@ is a remote service. It has no fields, so it does not keep any state between calls.price. A call returns the item's price as a Decimal, or raises Missing! when the catalog has no price for the item. The | list names every error the method can raise.scone the value 0.00, and the block continues with the next line.total 7.75, which is 3.50 + 0.00 + 4.25. This is the first use of the results, so the program waits here for all three calls. The calls ran at the same time, so the wait is about 50 ms rather than 150 ms.start as a Duration. It is about 50 ms because the three lookups ran concurrently.Ritchie has built-in archetypes for distributed system components like stateless services, transactional state, queryable state, and streams, each with interaction semantics defined by RITE. Choose the right archetype for each domain type to match the distributed architecture you need.
@T
Stateless, networked application operations.
$T
Durable identity and transactional state.
%T
Read-only rows over committed state.
T~>
Continuous facts and subscriptions.
T!
Typed, recoverable domain outcomes.
Write Hello World in Go with basic state, concurrency and a network boundary, then see the resulting application expressed in Ritchie.
RITE is the architectural style and abstract machine that turns Ritchie’s program graph into a reliable distributed system.