0

By "consumer," I mean a class/system that calls or uses another through its interface or API. What's the name for the other class/system, the one that gets called?

In a network context, a consumer is called a "client" and its counterpart is a "server", but I'm looking for a term that doesn't necessarily involve a network.

I thought the right word was "producer", but Martin Fowler calls it a "supplier" in some articles (like this one). Can anyone point to an authoritative source that defines this?

gesgsklw
  • 741
  • 1
  • 7
  • 13
  • There's no right or wrong here. Sometimes the term "producer" may feel right, the other time "supplier" might. – Sean Jan 11 '16 at 15:24
  • I'd go with "service", but I cannot back it up with references. – Heinzi Jan 11 '16 at 15:27
  • Hello there. I am a fellow coder, but I came across this question searching for the counterpart to the word "client" as it is used in common parlance. Any ideas? It's like, as an AirBnB host, I am one of their clients... who are they to me?? Thx in advance, especially considering this is not computing related :) – mannyglover Apr 30 '19 at 17:53

2 Answers2

0

I thought it was "producer" as well, based on my experience with AMQP terminology. Based on that a consumer can be regarded literally as a client endpoint of information.

Exceptions might be made where by information can be sent back, but in "fan-out" data architectures, the data typically only goes one way, and the producer has little to no obligation to ensure the consumer interpreted the data correctly.

The terminology is rarely used in OOP design.

Flosculus
  • 6,880
  • 3
  • 18
  • 42
0

I'd most likely want to say "provider" as a counter pairing to "consumer." You could also have dealer, merchant, seller, vendor etcetera, but all of those have some nuances which make them more restrictive and moor them to certain industries or types. It's not as universally applicable as provider-consumer.

donyd
  • 59
  • 6