Skip to content

Commit

Permalink
ADR-282: Fix data layer types
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Jan 21, 2025
1 parent be54f64 commit 6fcb928
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions content/ADR-282-inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,26 @@ The Data Layer provides a complete interface for all editor operations, handling

The Data Layer has two implementations:

1. **Local (In-Memory):**
1. **Local:**

- Used for development and testing
- Stores all state in memory
- No network communication required
- Fast and suitable for local development
- Runs in the same host as the Inspector (e.g. the browser)
- Direct function calls without network transport

2. **Remote (Protobuf):**
- Used in production environments
- Communicates over network using protobuf messages
2. **Remote:**
- Communicates with a remote host over network
- Uses protobuf messages for type-safe communication
- Supports WebSocket transport
- Enables integration with remote services

The storage behavior is determined by the File System Interface implementation used, not by the Data Layer type. For example:

- A Local Data Layer could use:

- An in-memory File System Interface for testing
- A Node.js File System Interface for desktop apps
- An RPC-based File System Interface for web apps

- A Remote Data Layer typically uses:
- Whatever File System Interface is implemented on the remote host

The remote Data Layer is implemented as a protobuf-defined RPC service to ensure type safety and versioning:

Expand Down

0 comments on commit 6fcb928

Please sign in to comment.