Dream Messaging

ns
dreamful-service.fixtures
(usens:)
server stuff
{:port 3001}start-serverport?
200pingport:port => 3001status?
(function:)

Setup a dream stream and add a friend

clientid?
1{:profile-id1 a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06}
2{:profile-id2 ee57fdcd-fe9b-4590-b93d-ff230ae9f894}
(dt:register)
clientid?
1{:dream-id1 289f52f4-2d75-40ad-95ce-6d3c0b19787a}
(dt:new-dream)
dream-stuff
successadd-friendprofile-id:profile-id2 => ee57fdcd-fe9b-4590-b93d-ff230ae9f894result?
(function: client=1, dream-id=:dream-id1)

Send message via dream-stream

message-stuff
{:msg-id1 3c6c9b17-fe66-49d4-9753-f574fa5a2617}add-messagemsgHello everybody!from1msg-id?
{:msg-id2 048cc2af-57c7-4e34-ac21-d4acb53e37bd}add-messagereply-to:msg-id1 => 3c6c9b17-fe66-49d4-9753-f574fa5a2617msgHey!from2msg-id?
{:msg-id3 f93d8c48-b00c-4582-8c68-5924875ed1c4}add-messagereply-to:msg-id2 => 048cc2af-57c7-4e34-ac21-d4acb53e37bdmsgHow's things?from1msg-id?
{:msg-id4 88479daa-0b0f-4fc4-a2c4-78826dab6d9c}add-messagereply-to:msg-id3 => f93d8c48-b00c-4582-8c68-5924875ed1c4msgFantastic.. you?from2msg-id?
{:msg-id5 e75feac6-45c0-4713-b01a-4e9828c26f65}add-messagereply-to:msg-id4 => 88479daa-0b0f-4fc4-a2c4-78826dab6d9cmsgAlso fantastic!from1msg-id?
(function: dream-id=:dream-id1)
msg-idxmkeymval?msg?
0dream_id289f52f4-2d75-40ad-95ce-6d3c0b19787a{:msg {:msg "Hello everybody!"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "3c6c9b17-fe66-49d4-9753-f574fa5a2617", :prev_index 1, :_idx 2, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
0_user_ida52c4a8e-c89c-48ca-8b86-d9e50c9b2d06{:msg {:msg "Hello everybody!"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "3c6c9b17-fe66-49d4-9753-f574fa5a2617", :prev_index 1, :_idx 2, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
0msg msgHello everybody!{:msg {:msg "Hello everybody!"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "3c6c9b17-fe66-49d4-9753-f574fa5a2617", :prev_index 1, :_idx 2, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
1dream_id289f52f4-2d75-40ad-95ce-6d3c0b19787a{:msg {:msg "Hey!", :reply_to "3c6c9b17-fe66-49d4-9753-f574fa5a2617"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "048cc2af-57c7-4e34-ac21-d4acb53e37bd", :prev_index 2, :_idx 3, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
1_user_idee57fdcd-fe9b-4590-b93d-ff230ae9f894{:msg {:msg "Hey!", :reply_to "3c6c9b17-fe66-49d4-9753-f574fa5a2617"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "048cc2af-57c7-4e34-ac21-d4acb53e37bd", :prev_index 2, :_idx 3, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
1msg reply_to3c6c9b17-fe66-49d4-9753-f574fa5a2617{:msg {:msg "Hey!", :reply_to "3c6c9b17-fe66-49d4-9753-f574fa5a2617"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "048cc2af-57c7-4e34-ac21-d4acb53e37bd", :prev_index 2, :_idx 3, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
1msg msgHey!{:msg {:msg "Hey!", :reply_to "3c6c9b17-fe66-49d4-9753-f574fa5a2617"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "048cc2af-57c7-4e34-ac21-d4acb53e37bd", :prev_index 2, :_idx 3, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
2dream_id289f52f4-2d75-40ad-95ce-6d3c0b19787a{:msg {:msg "How's things?", :reply_to "048cc2af-57c7-4e34-ac21-d4acb53e37bd"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "f93d8c48-b00c-4582-8c68-5924875ed1c4", :prev_index 3, :_idx 4, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
2_user_ida52c4a8e-c89c-48ca-8b86-d9e50c9b2d06{:msg {:msg "How's things?", :reply_to "048cc2af-57c7-4e34-ac21-d4acb53e37bd"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "f93d8c48-b00c-4582-8c68-5924875ed1c4", :prev_index 3, :_idx 4, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
2msg reply_to048cc2af-57c7-4e34-ac21-d4acb53e37bd{:msg {:msg "How's things?", :reply_to "048cc2af-57c7-4e34-ac21-d4acb53e37bd"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "f93d8c48-b00c-4582-8c68-5924875ed1c4", :prev_index 3, :_idx 4, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
2msg msgHow's things?{:msg {:msg "How's things?", :reply_to "048cc2af-57c7-4e34-ac21-d4acb53e37bd"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "f93d8c48-b00c-4582-8c68-5924875ed1c4", :prev_index 3, :_idx 4, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
3dream_id289f52f4-2d75-40ad-95ce-6d3c0b19787a{:msg {:msg "Fantastic.. you?", :reply_to "f93d8c48-b00c-4582-8c68-5924875ed1c4"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "88479daa-0b0f-4fc4-a2c4-78826dab6d9c", :prev_index 4, :_idx 5, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
3_user_idee57fdcd-fe9b-4590-b93d-ff230ae9f894{:msg {:msg "Fantastic.. you?", :reply_to "f93d8c48-b00c-4582-8c68-5924875ed1c4"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "88479daa-0b0f-4fc4-a2c4-78826dab6d9c", :prev_index 4, :_idx 5, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
3msg reply_tof93d8c48-b00c-4582-8c68-5924875ed1c4{:msg {:msg "Fantastic.. you?", :reply_to "f93d8c48-b00c-4582-8c68-5924875ed1c4"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "88479daa-0b0f-4fc4-a2c4-78826dab6d9c", :prev_index 4, :_idx 5, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
3msg msgFantastic.. you?{:msg {:msg "Fantastic.. you?", :reply_to "f93d8c48-b00c-4582-8c68-5924875ed1c4"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "88479daa-0b0f-4fc4-a2c4-78826dab6d9c", :prev_index 4, :_idx 5, :_message_type "dream_add_message", :_user_id "ee57fdcd-fe9b-4590-b93d-ff230ae9f894"}
4dream_id289f52f4-2d75-40ad-95ce-6d3c0b19787a{:msg {:msg "Also fantastic!", :reply_to "88479daa-0b0f-4fc4-a2c4-78826dab6d9c"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "e75feac6-45c0-4713-b01a-4e9828c26f65", :prev_index 5, :_idx 6, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
4_user_ida52c4a8e-c89c-48ca-8b86-d9e50c9b2d06{:msg {:msg "Also fantastic!", :reply_to "88479daa-0b0f-4fc4-a2c4-78826dab6d9c"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "e75feac6-45c0-4713-b01a-4e9828c26f65", :prev_index 5, :_idx 6, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
4msg reply_to88479daa-0b0f-4fc4-a2c4-78826dab6d9c{:msg {:msg "Also fantastic!", :reply_to "88479daa-0b0f-4fc4-a2c4-78826dab6d9c"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "e75feac6-45c0-4713-b01a-4e9828c26f65", :prev_index 5, :_idx 6, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
4msg msgAlso fantastic!{:msg {:msg "Also fantastic!", :reply_to "88479daa-0b0f-4fc4-a2c4-78826dab6d9c"}, :dream_id "289f52f4-2d75-40ad-95ce-6d3c0b19787a", :msg_id #uuid "e75feac6-45c0-4713-b01a-4e9828c26f65", :prev_index 5, :_idx 6, :_message_type "dream_add_message", :_user_id "a52c4a8e-c89c-48ca-8b86-d9e50c9b2d06"}
(dt:get-dream dream-id=:dream-id1, client=2)

Etc.

server stuff
stoppedstop-serverport:port => 3001result?
(function:)