-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Примеры в json'е. Но сами методы оставил растовыми. Смотрел на OpenAPI - на расте получается намного выразительнее и понятнее. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall impression is somewhat positive, but naming and little details should be bikeshedded, no doubts.
Please fill up information holes up marked by my comments. And I need a time to consume the overall thing to give a constructive feedback on the protocol and propose improvements.
docs/rfc/0002-webrc-client-api.md
Outdated
in answer. | ||
|
||
Probably, Server will always give his permission on any Client's request. This kind of request flow will allow Server | ||
to do any request related stuff that Server needs to do, and distinguish between abnormal and normal events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexlapa I think we're unable to control that. What if server rejects this, but client still disposes the peers? It's kinda weird state situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, поэтому и говорю, что разрешать будем всегда. Но, мы хотим чтобы клиент подождал пока мы сделаем все что нужно.
Если клиент будет одновременно выключать пира и сообщать об этом - то не известно что до нас первое дойдет.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boom...
@alexlapa continuing out yesterday conversation... I had time to think about clear separations between client/server methods and request/responses. Below is the description of such separation which I consider satisfying enough. I've found that CQRS+ES terminology here plays quite well, so:
|
Let's rewrite the "1 <=> 1 p2p with unpublish and republish" example in those terms:
|
Думал о таком. Но, в итоге, возникает лишнее дублирование сообщений. Допустим, клиент хочет замьютить свое аудио. Для этого он бросит: {
"method": "SetTracks",
"payload": {
"peer_id": 1,
"tracks": [{
"id": 1,
"media_type": {
"Audio": {"muted":true}
},
"direction": {
"Send": {
"receivers": [2]
}
}
}]
}
} Если у нас есть система запрос-ответ, то серверу достаточно ответить на этот запрос пустым сообщением, главное чтобы айдишка стояла та-же. Если айдишки убираем, то, фактически, сервер должен будет продублировать сообщение, что выглядит немного кривовато. Попробуем без айдишек, но, не исключаю, что мы захотим их вернуть.
|
Внес правки. |
14ce77e
to
9b77e60
Compare
9b77e60
to
93678fd
Compare
…sibilities" corrections
265124f
to
6964007
Compare
6964007
to
a265402
Compare
1e8f3fb
to
7aae042
Compare
@alexlapa FCM:
|
@alexlapa be careful with FCM in the future. You've duplicated the title here. The first line of the FCM should come as title in commit message window on GitHub. |
Required by #6
Rendered