Answer the question
In order to leave comments, you need to log in
How to organize the principle of data transfer between the client and the server?
I am writing a client-server application. I was puzzled by the question of what approach to choose in data transfer between the client and the server. For example, there should be the same user authorization/registration functionality. That is, the server accepts some commands and responds to them.
My options:
Answer the question
In order to leave comments, you need to log in
It is worth understanding the RESTful (REST-like) HTTP API as an approach that comes in a larger number of typical tasks, and understanding OpenAPI , and all your problems about the standard and about OSI will be solved. And only later, if you suddenly see that you really need RPC over some Protocol Buffers - then you will do it.
You are now in a vacuum regarding the technologies used for client-server interaction, you need to get out of this vacuum. So much has already been done about the same authorization / registration, and protocols (like OpenID Connect) and frameworks (like support in ASP.NET for all typical scenarios), that there is already plenty to choose from.
tls > http > json > own standard
PS But as part of a course project, in order to simplify the construction in .Net, I would replace json with xml - the standard library already has xml serialization / deserialization mechanisms, but json does not.
It turns out the following order of questions
1. Message (text or binary) (format OR own OR protobuf OR jsonrpc OR xmlrpc OR etc.)
I would recommend jsonrpc 2.0 because it is understandable to people and at least look at it to take the idea as a basis.
2. Transport. If security is not steamed, then https, if steamed, then TCP in ssl. If there is no security, then there is no difference, everything is tcp. If you surprise the teacher, then UDP, but here you yourself with a mustache, you will have to send ACK yourself and according to some principle, you will also have to describe it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question