RPC is a powerful, robust, efficient, and secure interprocess communication IPC mechanism that enables data exchange and invocation of functionality residing in a different process.
That different process can be on the same machine, on the local area network, or across the Internet. This section explains the RPC programming model and the model for distributed systems that can be implemented using RPC. RPC fully supports bit Windows. There are three types of processes: native bit processes, native bit processes, and bit processes running under the bit process emulator on a bit system often referred to as WOW64 processes.
Using RPC, developers can transparently communicate between different types of process; RPC automatically manages process differences behind the scenes.
Linq; using System. Text; using System. Sockets; using System. Parse " Start ; Console. LocalEndpoint ; Console. WriteLine "Waiting for Connections AcceptSocket ; Console. Receive b ; Console. WriteLine "Recieved.. Write Convert. Send asencd. Close ; mylist. Stop ; Console. WriteLine "Error.. Let's begin. RPCs could be used for any network application in theory, but are particularly attractive for distributed computation—when you've got a huge amount of scientific data to crunch and systems programmers are in short supply.
The client is a program making a call, and the "RPC server" is the receiver that actually performs the function. In other words, an RPC server provides the service of executing some code for you.
Simple enough, but before we can actually make an RPC, we have to wonder: how do you pass arguments over a network? Sending a primitive type like an int should be easy enough, but you also might want to pass a pointer to a data structure in memory.
Sending the pointer over the network won't do anybody any good: it's an address in your memory after all, which will not be valid on some other machine. XDR is able to take your data structure, serialize it behind the scenes, send it over the network, and reassemble it properly on the other end. This service is one of the major benefits of using RPC; not only do you not have to program sockets, you don't have to write tedious and error-prone functions to serialize your linked structures either.
In fact, XDR works by reading a description of your data structures and generating such code for you. The program that does this is called an RPC compiler, and its language for describing data structures is similar to C.
You describe a procedure call interface along with the data specifications, and the RPC compiler generates client stubs which you call on the client side to issue an RPC and server stubs which will be called on the server side when a request comes in.
If so, you'll be glad to hear that there's a tool designed to get your programs on the network in a hurry: remote procedure calls RPCs.
Instead, network communication is done through an interface all programmers are already quite familiar with: the humble function call. The semantics are simple; you make a function call and control transfers to some other code as usual, except the code happens to be running on a different machine.
Skip this paragraph Big tangent: XDR is cool because it almost solves an interesting and important open problem in programming practice, which is to create a framework for dynamically sharing structured data, which would, among other things, implement a standard interface for serializing such data.
0コメント