2

Is there a term that describes the property of being synchronous vs asynchronous?

The term that most naturally comes to mind is "synchronicity", however I only see this term being use in psychology. I would like to use this term as a property label on APIs that I am documenting, however I want to see if there is already a term for this before just going with it. Does anyone have any documentation or examples of a term being used to describe this property?

Example of how it would be used as part of a specification:

URL: http://company.com/someSyncAPI

Synchronicity: Synchronous

strong texthttp://company.com/someAsyncAPI

Synchronicity: Asynchronous

strong texthttp://company.com/someOtherAPI

Synchronicity: This API has both Synchronous and Asynchronous behaviors


Another way of asking this is that I would like to fill in the blank below.

As Idempotency is to Idempotent or Not Idempotent, _________ is to Synchronous or Asynchronous.


Clarification: This is intended to be used in published API specifications/documentation, not the documentation of the API within the source.

7
  • What language - in C# isn't this apparent from the return type?
    – user253751
    Feb 25, 2023 at 3:11
  • 1
    I think the categorisation would be "Programming Model" being that it seems to describe behavioural semantics of an API call, however other possible models exist beyond just synchronous or asynchronous, so I don't think it would be accurate to treat them as antonyms as per the "fill in the blank" example. 'asynchronous' being just one of many possible styles/models doesn't mean the same thing as 'not synchronous', since other non-synchronous programming models exist such as event-based models. Feb 25, 2023 at 3:15
  • 1
    For purposes of completing your form template, I feel a vague word like "Style:" would suffice, as the "sync" / "async" value is fairly specific. Perhaps "interaction style"? "execution style"? "synchronization"? "scheduling"? Or: returns a value vs a promise. Absent some authoritative author weighing in on this in the literature, this appears to be an off-topic opinion-based question.
    – J_H
    Feb 25, 2023 at 3:35
  • @BenCottrell "Programming Model" is way too vague, it could mean anything. "Style" is also way too vague.
    – user253751
    Feb 25, 2023 at 5:03
  • 2
    how about "Asynchronous: Yes" / "Asynchronous: No" ?
    – user253751
    Feb 25, 2023 at 5:03

7 Answers 7

3

Synchronicity is the word you are looking for, but as others have pointed out if you are looking to have a documentation tag, then just use something like "Async:" and describe the type of async for that API. e.g.

Async: None (function is synchronous)
Async: Requires callback to notify of completion
Async: Completion can be polled for by using the identifier returned and calling SomeOtherFunction()

These descriptions may seem strange to you but since you are listing URL's in your examples you are probably referring to a web API or web service and not an assembly or file reference API. In this case its important that you focus on the correct point of view for informing callers if the function is sync or async. Will each function be async to them? Usually it wont be.

An example of something that does not matter to a caller would be a c# web api controller function has the async modifier on it. To a caller of those functions, the call is always synchronous - the call is made and waits until the response is returned. The internal thread management does not concern the caller.

2

The term synchronicity is misleading, since according to the Meriam-Webster dictionary, it is equivalent to being synchronous.

synchronicity: the quality or fact of being synchronous

However nobody would see the contradiction in "Synchronicity: Asynchronous", so it seems an acceptable option.

The term synchronisation is not suitable, since it refers to the act making concurrent processes interact in a predictable way, and refers to a broad set of techniques.

Synchronous vs. asynchronous is mainly about the dependency in the execution of some request/call: synchronous requires to wait until the request is executed, whereas asynchronous allows to continue with the execution, and defer getting the results to a later time. You may therefore consider: Execution dependency. But this is not a common terminology.

More pragmatically, looking at the C++ specifications, they refer to a launch policy. Otherwise, the Synchronous/Asynchronous will do.

1

I've heard plenty of terms to describe the attributes that the sync/async "contracts" refer to, depending on context.

  1. Communication [Model]
  2. Timing [Model]
  3. Control Flow [Timing] [Model]
  4. Concurrency / Execution / Threading / Processing [Model]
  5. [Call] Blocking Model
  6. Interface / Return Type

IMHO, the ones I believe I've heard and used the most in general speech are Execution and Interface. ("Use the async interface when possible.") In writing, I generally only describe the interface, which will show a return type. If the return type is a Promise, Future, Task, etc., it's clearly async. There's no scrupulous terminology discussion required at all.

Returns: Promise<Array Item>

Done.

0

Yes. Absolutely:

  • Something that is synchronous: synchronous
  • Something that is not synchronous: asynchronous
0

It should be immediately apparent from your doc and declaration whether your function is sync or async, for example:

* @returns {Promise<Value>}
getAsyncCalculatedValue()

Good luck if you think people will read your annotations or API notes.

The answer you are looking for is most likely to be heavily language-dependent. For example, in Java, you signify an async method by returning an instance of Future.

0

Are you interested in terms defined in dictionaries or a made up term would be equally usable?

A term accurately describing such a property seems from the same category with a term describing black and white that are not colours and opposite from the category of term gender.

synchronousness if made up terms are of interest.

0

It depends on what synchronous express for the referred API. Is synchronous the property to wait the turn to run, the way queueing1 is or is the property to run when a certain event occur, the way event driven architecture is?

An option would be to call it architecture and the example would change to:

URL: http://company.com/someSyncAPI
Architecture: Event driven

URL: http://company.com/someAsyncAPI
Architecture: Queueing

URL: http://company.com/someOtherAPI
Architecture: Queueing, event driven

If synchronous of the referred API is a black box the way synchronisation is in Java programming language then a term literary expressing both synchronous/asynchronous could be used base on what is preferred, some examples would be: socialization, empathisation, reactiveness, responsiveness.


1 queueing in the sense of queueing theory from mathematics that is the mathematical study of waiting lines, or queues, rather than queueing in the sense of message queues from software development

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.