Logic, or rules in our case, are pieces of knowledge often expressed as, “When some conditions occur, then do some tasks”. Simple enough, no? These pieces of knowledge could be about any process in your organization, such as how you go about approving TPS reports, calculate interest on a loan, or how you divide workload among employees. While these processes sound complex, in reality, they’re made up of a collection of simple business rules. Let’s consider a daily ritual process for many workers: the morning coffee. The whole process is second nature to coffee drinkers. As they prepare for their work day, they probably don’t consider the steps involved—they simply react to situations at hand. However, we can capture the process as a series of simple rules:

  • When your mug is dirty, then go clean it
  • When your mug is clean, then go check for coffee
  • When the pot is full, then pour yourself a cup and return to your desk
  • When the pot is empty, then mumble about co-workers and make some coffee

Alright, so that’s logic, but what’s data? Facts (our word for data) are the objects that drive the decision process for us. Given the rules from our coffee example, some facts used to drive our decisions would be the mug and the coffee pot. While we know from reading our rules what to do when the mug or pot are in a particular state, we need facts that reflect an actual state on a particular day to reason over.

In Streamx data coming either from Amazon Kinesis or Amazon DynamoDB will be translated to facts.

Next article >>