Quickstart Overview
In this quickstart, you’ll build a working e-commerce checkout API using PulseRPC.
What You’ll Build
A complete RPC service with:
- 3 interfaces: CatalogService (product listing), CartService (shopping cart), OrderService (order management)
- 5 enums/structs: Product, Cart, Order, Address, PaymentMethod
- Custom error codes: cart_not_found (1001), cart_empty (1002), payment_failed (1003), out_of_stock (1004), invalid_address (1005)
What You’ll Learn
- IDL syntax - Define your service interface with the PulseRPC IDL
- Code generation - Generate type-safe client and server code
- Server implementation - Implement service handlers with error handling
- Client usage - Call RPC methods from a client application
Time Estimate
25-35 minutes to complete the full quickstart in your language.
Choose Your Language
Select your preferred language to continue:
| Language | Quickstart | Reference |
|---|---|---|
| Go | Guide | Reference |
| Java | Guide | Reference |
| Python | Guide | Reference |
| TypeScript | Guide | Reference |
| C# | Guide | Reference |
Preview: The IDL
Here’s a sneak peek at the checkout.pulse file you’ll work with:
namespace checkout
enum OrderStatus {
pending
paid
shipped
delivered
cancelled
}
interface CatalogService {
listProducts() []Product
getProduct(productId string) Product [optional]
}
interface CartService {
addToCart(request AddToCartRequest) Cart
getCart(cartId string) Cart [optional]
clearCart(cartId string) bool
}
struct Product {
productId string
name string
price float
stock int
}
Quickstart Steps
Each language quickstart follows the same structure:
- Prerequisites & Setup (5 min) - Install dependencies
- Define the Service (2 min) - Write the IDL file
- Generate Code (1 min) - Run the PulseRPC generator
- Implement the Server (10-15 min) - Write service handlers
- Implement the Client (5-10 min) - Call your service
- Run It (2 min) - Start server and client
Ready? Jump to your language!