diff --git a/lib-uwusched/src/lib.rs b/lib-uwusched/src/lib.rs index b93cf3f..139597f 100644 --- a/lib-uwusched/src/lib.rs +++ b/lib-uwusched/src/lib.rs @@ -1,14 +1,2 @@ -pub fn add(left: u64, right: u64) -> u64 { - left + right -} -#[cfg(test)] -mod tests { - use super::*; - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} diff --git a/notes/UwUsched/Protocol.md b/notes/UwUsched/Protocol.md index c29cc5e..9fb15f1 100644 --- a/notes/UwUsched/Protocol.md +++ b/notes/UwUsched/Protocol.md @@ -4,11 +4,69 @@ => Two seperate ways of communicating: One for neogtioating task queue stuff and one for data (Linked with UUID) -# Data Pull/Push +## Conn-Status + +### Login +*Request:* +```json +{ + "protocol_id":, + "node_id":, + "transaction_uuid":, + "specs": { + "threads":, + "clock":, + "mem":, + "net_speed_kib": + } +} +``` + +*Response:* +```json +{ + "protocol_id":, + "node_id":, + "transaction_uuid":, + "status":, +} +``` +### Uptime Polling +*Request/Response:* +```json +{ + "protocol_id":, + "node_id":, + "transaction_uuid": +} +``` + + +### Logout +*Request:* +```json +{ + "protocol_id":, + "node_id":, + "transaction_uuid":, +} +``` + +*Response:* +```json +{ + "protocol_id":, + "node_id":, + "transaction_uuid":, + "status": +} +``` +>If the re-scheduling fails trigger the worker-node to give all HashMap-data to the head-node ## Pull ```json { "protocol_id":, + "node_id":, "uuid":, "hashmap_id":, } @@ -18,6 +76,8 @@ ```json { "protocol_id":, + "node_id":, + "uuid":, "status":, "uuid":, "hashmap_id": @@ -28,6 +88,8 @@ ```json { "protocol_id":, + "node_id":, + "uuid":, "uuid":, "hashmap_id":, "length_decomp": , @@ -58,4 +120,5 @@ **Control Flow** `protocol_id`: `data_push | data_pull | data_response | hash_push | hash_pull | hash_response` +`node_id`:unique identifier of nodes. (Hostnames) `status`: error codes indicating success of transmission \ No newline at end of file