Reformat/cleanup
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
This commit is contained in:
@@ -5,21 +5,25 @@ This sample demonstrates the core features of CBDDC, a distributed peer-to-peer
|
||||
## Features Demonstrated
|
||||
|
||||
### 🔑 Primary Keys & Auto-Generation
|
||||
|
||||
- Automatic GUID generation for entities
|
||||
- Convention-based key detection (`Id` property)
|
||||
- `[PrimaryKey]` attribute support
|
||||
|
||||
### 🎯 Generic Type-Safe API
|
||||
|
||||
- `Collection<T>()` for compile-time type safety
|
||||
- Keyless `Put(entity)` with auto-key extraction
|
||||
- IntelliSense-friendly operations
|
||||
|
||||
### 🔍 LINQ Query Support
|
||||
|
||||
- Expression-based queries
|
||||
- Paging and sorting
|
||||
- Complex predicates (>, >=, ==, !=, nested properties)
|
||||
|
||||
### 🌐 Network Synchronization
|
||||
|
||||
- UDP peer discovery
|
||||
- TCP synchronization
|
||||
- Automatic conflict resolution (Last-Write-Wins)
|
||||
@@ -35,16 +39,19 @@ dotnet run
|
||||
### Multi-Node (Peer-to-Peer)
|
||||
|
||||
Terminal 1:
|
||||
|
||||
```bash
|
||||
dotnet run -- --node-id node1 --tcp-port 5001 --udp-port 6001
|
||||
```
|
||||
|
||||
Terminal 2:
|
||||
|
||||
```bash
|
||||
dotnet run -- --node-id node2 --tcp-port 5002 --udp-port 6002
|
||||
```
|
||||
|
||||
Terminal 3:
|
||||
|
||||
```bash
|
||||
dotnet run -- --node-id node3 --tcp-port 5003 --udp-port 6003
|
||||
```
|
||||
@@ -53,20 +60,20 @@ Changes made on any node will automatically sync to all peers!
|
||||
|
||||
## Available Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `p` | Put Alice and Bob (auto-generated IDs) |
|
||||
| `g` | Get user by ID (prompts for ID) |
|
||||
| `d` | Delete user by ID (prompts for ID) |
|
||||
| `n` | Create new user with auto-generated ID |
|
||||
| `s` | Spam 5 users with auto-generated IDs |
|
||||
| `c` | Count total documents |
|
||||
| `f` | Demo various Find queries |
|
||||
| `f2` | Demo Find with paging (skip/take) |
|
||||
| `a` | Demo auto-generated primary keys |
|
||||
| `t` | Demo generic typed API |
|
||||
| `l` | List active peers |
|
||||
| `q` | Quit |
|
||||
| Command | Description |
|
||||
|---------|----------------------------------------|
|
||||
| `p` | Put Alice and Bob (auto-generated IDs) |
|
||||
| `g` | Get user by ID (prompts for ID) |
|
||||
| `d` | Delete user by ID (prompts for ID) |
|
||||
| `n` | Create new user with auto-generated ID |
|
||||
| `s` | Spam 5 users with auto-generated IDs |
|
||||
| `c` | Count total documents |
|
||||
| `f` | Demo various Find queries |
|
||||
| `f2` | Demo Find with paging (skip/take) |
|
||||
| `a` | Demo auto-generated primary keys |
|
||||
| `t` | Demo generic typed API |
|
||||
| `l` | List active peers |
|
||||
| `q` | Quit |
|
||||
|
||||
## Example Session
|
||||
|
||||
|
||||
Reference in New Issue
Block a user