20.1. An Overview: Using drb
A drb application has two basic components—a server and a client. A rough breakdown of their responsibilities is as follows:
The server:
Starts a TCPServer and listens on a port
Binds an object to the drb server instance
Accepts connections from clients and responds to their messages
May optionally provide access control (security)
The client:
Establishes a connection to the server process
Binds a local object to the remote server object
Sends messages to the server object and gets responses
The class method start_service takes care of starting a TCP server that listens on a specified port; it takes two parameters. The first is a URI (a Universal Resource Identifier) specifying a port (if it is nil, a port will be chosen ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access