Stub

What’s a stub? It obviously depends on the context. A Stub may even be a relative of the Danish poet Ambrosius Stub. After all, code is poetry.

In computing, I know of 4 contexts where the word stub has a well-established meaning:

  1. Web Sites: A stub is a web page in progress, i.e., a page which provides minimal information and is intended for later development. For instance, a Wikipedia stub is a short article in need of expansion.
  2. Coding: During development, we sometimes use a “skeleton” function (or procedure, or method) to simulate some intended (but not yet implemented) functionality. For instance, the function may stand in for a complex algorithm to be developed later, or simulate a procedure running on a remote host. Such placeholder function is called a stub function. Stub functions come in handy for quick prototyping and testing.
  3. Distributed Systems: In distributed systems, a service interface defines the services available to programs. These services are distributed among several networked machines. In distributed systems, a program in machine A may request a service by calling a procedure. However, the procedure may be offered by a remote host, say, machine B. Remote Procedure Calls (RPC) are a paradigm of distributed systems aimed at abstracting the communication between hosts in a network. The goal of RPCs is to hide the details of the remote call. The remote call should look like a local one, i.e., the program in machine A would invoke the procedure in machine B as it would invoke a procedure locally. Under the hood, though, it’s obvious that we have to transmit information from the client (caller) to the server (callee), and in the other direction. Now, how to hide the fact that we are calling a procedure located in other machine? This is the basic idea of RPCs:
    • In the address space of the client, we represent the server procedure by means of a local procedure called client stub. Likewise, the server is also linked to a server stub, which will receive the message from the client stub.
    • When machine A requests a service which is provided by machine B, a call is made to the client stub (which has the same name as the procedure in B). As the client stub lies in the same address space of the caller, the invocation is handled locally, and the program sees this invocation as a local one. However, the client stub marshalls the received parameters and sends them, throught the network, to the server stub. In turn, the server stub unmarshalls the parameters and perform the call to the real procedure in the server. When the server procedure finishes, results or exception data travels back, from server to client. By the way, marshalling is the process of taking a collection of data items (such as the procedure name and its arguments) and grouping them according to some predefined representation, suitable for transmission over the network. The server should know and conform to this representation in order to unmarshall the received data and recover the transmitted information.

    Albeit conceptually simple, there are some interesting (nasty) problems for implementing RPCs, such as passing pointer arguments (remember that client and server have different address spaces).

  4. Computer Networking: A stub network is a network or part of network with only one communication path to external networks (non-local hosts). For instance, if we connect to our Internet Service Provider using only one router, our local network is a stub network with respect to our provider.

There is other related context for stubs: in electronics, we identify Stub sections, which are mostly used for impedance matching in transmission lines. But I’m not too familiar with this “stub” meaning.

Onetti

Desde entonces no he parado de leer a Onetti: en cerca de veinte años ésa es una de las pocas cosas que no han cambiado en mi vida. Han dejado de gustarme la mayor parte de los libros que me apasionaban y he perdido, afortunadamente, casi todos los entusiasmos políticos que me idiotizaban entonces, detesto casi todas las películas que veneraba en aquellos años, he cambiado de amigos, de ciudades, de trabajos y de lealtades sentimentales, así que uno de los pocos rasgos que me unen a quien fui y ya no soy es la lectura de Juan Carlos Onetti, y casi la única cosa que me sigue acompañando de todas las que poseía en los tiempos en que empecé a leerlo es ese ejemplar de sus Cuentos Completos que adquirí en el Círculo de Lectores: un libro de tapas negras, de letra muy pequeña y de hojas que se van volviendo amarillas, firmado y fechado en la primera página con aquella ambición de propiedad con que uno atesoraba entonces los pocos libros que podía comprarse, en un tiempo que visto ahora casi parece otra época: diciembre, 1975.

Antonio Muñoz Molina (Sueños realizados: invitación a los relatos de Juan Carlos Onetti, Prólogo del volumen “Onetti, Cuentos Completos”)

If I had a boat

Burn slow, burning up the back wall
long roads, where the city meets the sky
most days, most days stay the sole same.
Please stay, for this fear it will not die.

If I had a boat, I would sail to you
hold you in my arms, ask you to be true.
Once I had a dream, it died long before
Now I’m pointed north, hoping for the shore.

Down low, down amongst the thorn rows
weeds grow, through the lillies and the vine
birds play, try to find their own way
soft clay, on your feet and under mine.

Breaking at the seams
heaving at the brace
sheets all billowing
the breaking of the day
sea is not my friend
seasons they conspire
still I choose to swim
slip beneath the tide.

Once I had a dream.
Once I had a hope.
That was yesterday
not so long ago
this is not the end
this is just the world
such a foolish thing
such an honest girl.

Brindis

Brindo por los aparecidos
y los desaparecidos
brindo por el amor que se desnuda
por el invierno y sus bufandas
por las remotas infancias de los viejos
y las futuras vejeces de los niños

brindo por los peñascos de la angustia
y el archipiélago de la alegría
brindo por los jóvenes poetas
que cuentan las monedas y las sílabas
y finalmente brindo por el brindis
y el vino que nos brindan

Mario Benedetti (Brindis, El porvenir de mi pasado)

Pregunta vieja, vieja respuesta

¿Adónde va el amor cuando se olvida?
No aquel a quien hicieras la pregunta
es quien hoy te responde.

Es otro, al que unos años más de vida
le dieron la ocasión, que no tuviste,
de hallar una respuesta.

Los juguetes del niño que ya es hombre,
¿adónde fueron, dí? Tú lo sabías,
bien pudiste saberlo.

Nada queda de ellos: sus ruinas
informes e incoloras, entre el polvo,
el tiempo se ha llevado.

El hombre que envejece, halla en su mente,
en su deseo, vacíos, sin encanto,
dónde van los amores.

Mas si muere el amor, no queda libre
el hombre del amor: queda su sombra,
queda en pie la lujuria.

¿Adónde va el amor cuando se olvida?
No aquel a quien hicieras la pregunta
es quien hoy te responde.

Luis Cernuda Bidón (Pregunta vieja, vieja respuesta, Desolación de la Quimera)