Food Logistics Networks : How IoT and Blockchain can Transform Food Logistics

Part -I

Challenges in the Food Logistics network

The modern food chain is very large and complex. There are numerous actors involved that influence the making of the product and its delivery, whether directly or indirectly. In this post, we’ll be looking at this modern food production process before proposing a solution one based on blockchain and IoT, that addresses the challenges mentioned above.

Food Logistics Network

The business process shown in the diagram below is a simplified version of the modern food chain. In real life,the chain is much more complex than the one represented here. For example, many supermarkets have their own distribution centers. However, since our main goal is simplification, I didn’t represent other factors, such as ports and customs.



For our use case, we’ll seek to account for the product from the time it’s delivered to the manufacturer. This product could be any item, but we’ll use chicken drumsticks for our example.

The asset to be managed in our chain will be a box full of chicken drumsticks, and our other asset will be a pallet full of boxes containing chicken drumsticks. In the food chain, we’ll be looking at the processes of the following actors:

  • Manufacturer,
  • Distribution center
  • Retailers.

As stated previously, there are a lot of actors in the modern food chain. Remember that we’re following a more simplified process, not necessarily the actual process followed in real life. Our goal is understanding how IoT and blockchain can help the parties and processes inside the food chain.

Process at the food factory

Let’s start from the beginning of our target process. In our use case, the product arrives at the factory in large pieces, where it’ll be cut, packed, and put in boxes for sale. This product is stored and the boxes are put onto pallets before delivery. A pallet is a wooden, metallic, or plastic platform used for moving goods, as we can see in the following diagram:



Next, we’ll see the important data that must be registered about the product before it proceeds to the next stage. When the product arrives, the following data is captured and recorded:

  • Stock Keeping Unit (SKU)
  • Animal origin
  • Name of producer
  • Animal information
  • Quality control
  • Date of abatement
  • Freezing
  • Technical supervisor details
  • Shipment date
  • Temperature and transport details

The following details are captured during the registration of a box or pallet:

  • SKU
  • Date
  • Factory address
  • Freezing temperature
  • Quality record
  • Pallet code

Now let’s check the process for the next actor in the chain. The challenges facing food manufacturers are as follows:

  • The need to further automate the handling of food, reducing or removing human contact altogether, and ensuring high sanitation standards in the process
  • Earning loyalty from suppliers and guaranteeing high quality levels
  • Effectively controlling stock and the dispatch of goods
  • Data about the location of storage and about where an action was taken
  • How to register boxes, pallets, and the like

Process at the distribution center

After being cut, packed, and delivered, the product arrives at the distribution center, where it’s received and checked for storage. Depending on the process, it might go to a bigger pallet that suits it better for transportation, which could be by train or truck:



To avoid any issues with the product, the distribution center reviews the data sent by the factory. If there’s any additional movement, such as pallet transfer, new information needs to be added to the package:

  • For the product, it’s the following:
    • Received date
    • Pallet number
    • Temperature received at
    • Temperature for storage
    • Transport company
    • Quality seal
  • For the pallet, it’s the following:
    • Destination code
    • Pallet code
    • Date
    • Temperature for dispatch
    • Transport company

After inspection, the products are sent to the retailers.

Process at supermarkets and stores 


The store will receive the product and check the goods to see whether they fit the requirements. If they do, the pallets are disassembled and the boxes are opened. This concludes the monitoring of our assets:



The following important data must be registered at this stage for the product to reach the consumer:

  • Received date
  • Pallet number
  • Temperature received at
  • Temperature for storage
  • Transport company
  • Quality seal

Now it’s the store’s responsibility to put a label on the product, after which, it may or may not be taken straight to the shelf.

This gives us the current challenges that are faced by supermarkets:

  • Managing and controlling the receipt and delivery of products
  • Effectively controlling stock and the dispatch of goods between stores
  • Collecting data about the product’s physical location and storage
  • Unpacking and transporting products to the shelves
  • Controlling and being aware of product expiration dates

How IoT and Blockchain together will help ?

Based on the challenges discussed in sections above, we know that some important things that our blockchain solutions need to achieve are as follows:

  • Providing the transparency that the food industry needs
  • Creating trustworthy connections so that everyone in the food ecosystem can participate
  • Improving interoperability so that the industry can drive usability and access
  • Monitoring livestock and grain monitoring
  • Identifying the location of livestocks
  • Greenhouse monitoring (temperature and irrigation)

The illustration below, provides a high level overview of a Blockchain and IoT based architecture:


Blockchain framework supports an IoT based data feed and will guarantee the reliability and security of information received and captured. As we know Blockchain technology is a shared, digital platform where users can store and share information across a network. This system enables users to look at all transactions simultaneously and in real-time.

One of the main advantages of blockchain is that once information is added to the blockchain via IoT sensors, it is distributed within the network and it becomes immutable. It cannot be hacked, manipulated, or corrupted in any way.

The technology behind IoT sensors and electronics chips such as RFID seals is evolving rapidly, through this evolution companies has the opportunity to attach sensors to goods to track and thereby detect potential failures and fraud and combining data received from these sensors with a Blockchain can provide standardization, transparency & traceability to supply chain and help food industries in minimizing risks by ensuring temper-proof & reliable flows which was missing from the food industry for a long time.

Part -II

Getting into the details- Technical Stuff

Now that we have reviewed the high level architecture, for those technically inclined and interested, below are technical details of the architecture

  • Technology Architecture: We’ll present a diagram of the technological solutions that we’ll be engineering.
  • Software Components: We’ll present a diagram detailing the solution at the software level, examining layers and integration

The Technology Architecture – Hyperledger Fabric Architecture

Here’s a representation of a standard blockchain Hyperledger Fabric architecture.



The preceding diagram shows us three important layers: frontend applications (on the left), API/SDK (in the center), and Hyperledger Fabric and the IoT platforms (on the right). Let’s review each layer in more detail.

Frontend applications

This layer is responsible for data input and can be a packet, such as one from SAP, Salesforce, or Siebel, or a custom application. It can also interact with IoT devices, collecting data and registering in the blockchain ledger. The modern architecture for developing frontend applications consists of these layers:



Okay, I know there are a lot of other tools for each layer than those presented here, but I just used the ones I’m more familiar with. This type of frontend architecture allows us to separate our services from a single interface. By doing so, we can expand the User Experience (UX) to several platforms without the need to rebuild the whole application.

IoT-based asset tracking

IoT plays an important role in the food chain. IoT devices can track assets, and there’s an arsenal of models available that can do that. There are sensors for measuring temperature, and location can be determined using GPS, beacons, SigFox, Wi-Fi, 4G, and Sub1Ghz. These devices and networks can be used by farms, factories, transportation companies, distribution centers, and retail outlets, covering all actors in the food chain.

The major challenge in the food chain is transportation. Many foods require special care, and temperature is one of the most important concerns. Since many foods are perishable, and temperature control is vital for preventing contamination and damage.

Technical Note: 

Let’s take a look at how we can mitigate this challenge using an IoT-enabled device. The Particle Electron Asset Tracker (pictured in the following diagram) can be used to collect temperature and environmental data and identify GPS location and cellular triangulation, among other things:

This tracker allows us to connect with a u-blox M8 GNSS GPS receiver and Adafruit LIS3DH Triple-Axis Accelerator. We can connect Grove sensors to it as well.

Let’s look at a high-level architecture of this kind of IoT solution, based on Bosch IoT platform:


This diagram shows us some important components of the solution. Let’s see what they are:

  • Message Queuing Telemetry Transport (MQTT): This refers to a publish-subscribe-based messaging protocol that works over TCP. It’s designed for connections with remote locations where a small code footprint is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker.
  • Node-RED: Node-RED is a programming tool for wiring together hardware devices, APIs, and online services in an easy way using a flow editor that can create JavaScript functions.
  • IBM Cloud: This is a set of cloud computing services for business.
  • Bosch IoT Rollouts: This is a cloud service in the Bosch IoT Suite that enables users to manage the rollout of software updates to edge devices, controllers, and gateways.

So, how do these components come together to assist in the various processes in the food chain? Here’s how:

  • The Node-RED control panel dashboard enables us to select an asset tracker and check the location, data, device status, and other information
  • The asset tracker device can be either activated or updated over a cellular network
  • Geolocation data can be transmitted periodically and can be followed by a dashboard in Node-RED, for example
  • The asset tracker device queries the temperature data and then may query for location or velocity data
  • Node-RED can write the temperature, location, and velocity data to Hyperledger Fabric
  • The Node-RED dashboard queries Hyperledger Fabric for various tasks and information, such as transaction histories, date and time data, and geo-sensor data


The SDK or API is an integration layer responsible for connection in the blockchain network. It’s normally developed using Node.js and plays an important role in the calling of smart contracts. Today, we can find API/SDK documentation covering Go and Java, with documentation for Python on the horizon.

The following diagram shows an application integrated with an API/SDK that interacts with Hyperledger Fabric:

Composer JavaScript SDK is derived from Node.js, and it allows developers to integrate your application with their business networks.

There are two npm modules:

  • composer-client: This module is usually installed as a local dependency of an application. It provides the API that’s used by business applications to connect to a business network in order to access assets and participants and submit transactions. When in production, this is the only module that needs to be added as a direct dependency of the application.
  • composer-admin: This module is usually installed as a local dependency of administrative applications. This API permits the creation and deployment of business network definitions.

Now let’s move on to the last layer in our solution.

Hyperledger Composer – a high-level overview

Hyperledger Composer is an easy way to create your blockchain network, integrated with a full-stack working solution, as provided by the Hyperledger Composer architecture site.

At a high level, Hyperledger Composer is made up of the following components:

  • Execution runtimes
  • JavaScript SDK
  • Command Line Interface (CLI)
  • REST server
  • LoopBack connecto Playground web user interface
  • Yeoman code generator
  • VS Code and Atom editor plugins

Software components

Now we’ll look at the software components of our solution for an architect’s perspective. This is a good way to get familiarized with all of the components and have a better understanding of how they are integrated.

To start, let’s explore one of the most important components: the authentication process.

How we can guarantee that each member of the blockchain has the correct access permission in our frontend application? After answering this question, we’ll delve into the most important components of Hyperledger Composer: the modeling language and the transaction processor functions.

Composer REST server

To authenticate clients, we’ll need to set up a REST server. With this option available, the clients should be authenticated before they are permitted a call in the REST API.

The REST server uses an open source software named PASSPORT, an authentication middleware for Node.js. It’s flexible and modular and supports authentication via username and password, Facebook, Twitter, Google, and Lightweight Directory Access Protocol (LDAP), among others. Let’s review how the components will work.

In the following diagram, we can see a high-level authentication architecture using a Composer REST server:



The following components have been described in the diagram: a frontend application, a composer REST server, LDAP, and Cloudant, a NoSQL database.


The architecture described in this chapter involves many components, and the implementation may seem a little complex. By now, we’ve established that the combination of IoT and blockchain can mitigate several issues and transform the workings of the modern food chain. For example, such an implementation can bring transparency between members, allowing them to control data more efficiently; increase their security; make the process automatic and dynamic; remove middlemen; and make the chain less complex overall.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s