Translation

English
English French Actions
`params`: a structure that contains the values of the parameters that are passed to the method
`id`: an identifier chosen by the caller
The JSON-RPC is encoded as a JSON object. For example, the example below shows an invocation of a method called `sum` with `1` and `3` as parameters.
Upon reception of this JSON structure, the callee parses the object, locates the corresponding method and passes the parameters. This method returns a response which is also encoded as a JSON structure. This response contains the following fields:
`jsonrpc`: a string indicating the version of the protocol used to encode the response
`id`: the same identifier as the identifier chosen by the caller
`result`: if the request succeeded, this member contains the result of the request (in our example, value `4`).
`error`: if the method called does not exist or its execution causes an error, the `result` element will be replaced by an `error` element which contains the following members :
`code`: a number that indicates the type of error. Several error codes are defined in [JSON-RPC2]_. For example, `-32700` indicates an error in parsing the request, `-32602` indicates invalid parameters and `-32601` indicates that the method could not be found on the server. Other error codes are listed in [JSON-RPC2]_.
`message`: a string (limited to one sentence) that provides a short description of the error.
`data`: an optional field that provides additional information about the error.
Coming back to our example with the call for the `sum` procedure, it would return the following JSON structure.
If the `sum` method is not implemented on the server, it would reply with the following response.
The `id` field, which is present in the request and the response plays the same role as the identifier field in the DNS message. It allows the caller to match the response with the request that it sent. This `id` is very important when JSON-RPC is used over the connectionless transport service which is unreliable. If a request is sent, it may need to be retransmitted and it is possible that a callee will receive twice the same request (e.g. if the response for the first request was lost). In the DNS, when a request is lost, it can be retransmitted without causing any difficulty. However with remote procedure calls in general, losses can cause some problems. Consider a method which is used to deposit money on a bank account. If the request is lost, it will be retransmitted and the deposit will be eventually performed. However, if the response is lost, the caller will also retransmit its request. This request will be received by the callee that will deposit the money again. To prevent this problem from affecting the application, either the programmer must ensure that the remote procedures that it calls can be safely called multiple times or the application must verify whether the request has been transmitted earlier. In most deployments, the programmers use remote methods that can be safely called multiple times without breaking the application logic.
ONC-RPC uses a more complex method to allow a caller to reach the callee. On a host, server processes can run on different ports and given the limited number of port values (:math:`2^{16}` per host on the Internet), it is impossible to reserve one port number for each method. The solution used in ONC-RPC :rfc:`1831` is to use a special method which is called the `portmapper` :rfc:`1833`. The `portmapper` is a kind of directory that runs on a server that hosts methods. The `portmapper` runs on a standard port (`111` for ONC-RPC :rfc:`1833`). A server process that implements a method registers its method on the local `portmapper`. When a caller needs to call a method on a remote server, it first contacts the `portmapper` to obtain the port number of the server process which implements the method. The response from the portmapper allows it to directly contact the server process which implements the method.
Footnotes

Showing only subset of the strings as there were too many matches.

Component Translation Difference to current string
This translation Propagated Empty cnp3-ebook/protocols/rpc
The following strings have the same context and source.
Propagated Translated cnp3-ebook/exercises/transport Notes de pied de page
Propagated Translated cnp3-ebook/principles/naming Notes de pied de page
Propagated Translated cnp3-ebook/exercises/http Notes de pied de page
Propagated Translated cnp3-ebook/principles/referencemodels Notes de pied de page
Propagated Translated cnp3-ebook/principles/security Notes de pied de page
Propagated Translated cnp3-ebook/exercises/dns Notes de pied de page
Propagated Empty cnp3-ebook/protocols/bgp
Propagated Empty cnp3-ebook/protocols/dnssec
Propagated Translated cnp3-ebook/exercises/tcp Notes de pied de page
Propagated Translated cnp3-ebook/exercises/tls Notes de pied de page
Propagated Empty cnp3-ebook/protocols/ipv6
Propagated Empty cnp3-ebook/protocols/http2
Propagated Empty cnp3-ebook/protocols/ppp
Propagated Empty cnp3-ebook/protocols/tls
Propagated Empty cnp3-ebook/protocols/wifi
Propagated Translated cnp3-ebook/exercises/sockets Notes de pied de page
Propagated Translated cnp3-ebook/principles/sharing Notes de pied de page
Propagated Empty cnp3-ebook/protocols/udp
Propagated Translated cnp3-ebook/principles/network Notes de pied de page

Loading…

User avatar None

New source string

cnp3-ebook / protocols/rpcFrench

New source string 2 years ago
Browse all component changes

Things to check

Inconsistent

This string has more than one translation in this project or is untranslated in some components.

Reset

Glossary

English French
No related strings found in the glossary.

String information

Source string location
../../protocols/rpc.rst:151
String age
2 years ago
Source string age
2 years ago
Translation file
locale/fr/LC_MESSAGES/protocols/rpc.po, string 41