|
| 1 | +# API: Process API |
| 2 | + |
| 3 | +<!-- |
| 4 | +Title: Process API Reference |
| 5 | +TOC: Reference → API Reference → Process API |
| 6 | +Audience: Developers implementing process-based applications |
| 7 | +Duration: 20-30 minutes reference time |
| 8 | +--> |
| 9 | + |
| 10 | +## Purpose |
| 11 | + |
| 12 | +Comprehensive reference documentation for Wippy's Process API, covering all functions, parameters, return values, and usage patterns for the actor model implementation. |
| 13 | + |
| 14 | +## Content Plan |
| 15 | + |
| 16 | +This reference will include: |
| 17 | + |
| 18 | +1. **Process Lifecycle Management** |
| 19 | + - `process.spawn()`, `process.spawn_monitored()`, `process.spawn_linked()` |
| 20 | + - Process termination and cancellation |
| 21 | + - Process options and configuration |
| 22 | + |
| 23 | +2. **Message Passing Operations** |
| 24 | + - `process.send()` - sending messages between processes |
| 25 | + - `process.listen()` - creating topic-specific channels |
| 26 | + - `process.inbox()` - accessing default inbox |
| 27 | + - Message format and serialization |
| 28 | + |
| 29 | +3. **Process Registry Functions** |
| 30 | + - `process.registry.register()`, `process.registry.lookup()` |
| 31 | + - `process.registry.unregister()` |
| 32 | + - Name resolution and discovery |
| 33 | + |
| 34 | +4. **Process Monitoring and Linking** |
| 35 | + - `process.link()`, `process.unlink()` |
| 36 | + - `process.monitor()`, `process.unmonitor()` |
| 37 | + - Event handling and supervision patterns |
| 38 | + |
| 39 | +5. **System Events and Control** |
| 40 | + - `process.events()` - system event channel |
| 41 | + - Event types: CANCEL, EXIT, LINK_DOWN |
| 42 | + - Process options and trap_links configuration |
| 43 | + |
| 44 | +## Implementation Details |
| 45 | + |
| 46 | +### API Categories to Document: |
| 47 | +- **Core Process Functions**: Creation, termination, identification |
| 48 | +- **Communication APIs**: Message sending, receiving, channels |
| 49 | +- **Registry Operations**: Name registration and lookup |
| 50 | +- **Supervision APIs**: Linking, monitoring, event handling |
| 51 | +- **System Integration**: Events, options, lifecycle management |
| 52 | + |
| 53 | +### For Each Function Document: |
| 54 | +- Function signature and parameters |
| 55 | +- Return values and error conditions |
| 56 | +- Usage examples with full context |
| 57 | +- Best practices and common patterns |
| 58 | +- Cross-references to related functions |
| 59 | + |
| 60 | +### Code Examples to Include: |
| 61 | +- Basic process spawning and communication |
| 62 | +- Request-response patterns |
| 63 | +- Supervision tree setup |
| 64 | +- Error handling and recovery |
| 65 | +- Performance considerations |
0 commit comments