Skip to content
Micah N Gorrell edited this page Jun 25, 2015 · 2 revisions

The goal of Motion is to describe a mechanism to examine messages, and to perform actions based on the things that were learned.

There are many ways currently to act on an email in transit. Many MTAs provide a mechanism of performing checks and actions during the mail flow. Unfortunately however these tend to be limited to the MTA. The goal of motion is to make these checks and actions reusable at any point in the life cycle of an email, or any other form of message.

For example, imagine you have just written a service for your MTA that determines what language a message is written in and translates it to your users' preferred language before delivery. This is very useful, but it only covers mail as it is received by your MTA. The goal of motion is to allow you to reuse your service for as many cases as possible, such as:

  • Translate messages in a user's email client on the fly
  • Translate chat messages on the fly
  • Replace messages in a user's inbox with a translated version
  • Identify messages in an email archive that are in a specific language
  • Identify social media posts that are in a single language and post a translated copy

Motion does this by breaking the service down into two components. Services that examine messages and services that act on messages. By separating these a generic examination service may be used regardless of the source of the message before applying an action that may or may not be related to the examination service.

The logic that determines what services should be used to examine a message and what actions to take based on the results is outside of the scope of Motion. Motion simply describes how to talk to those services.

In the examples listed above a motion service that can examine a message and determine what language it was written in is required, but the action to take varies a great deal. The appropriate action in some cases will be to talk to another motion service that can translate the message from one language to another. In other cases the appropriate action may be to delete the message or do nothing.

Since the consumer controls the logic the consumer is free to use any combination of motion services to examine a message, and may then take any action, either directly or with the help of motion services.

Clone this wiki locally