Upcoming Webinar - June 4th 10:00am PT: Is Your Database Missing These Key Security Elements? 🔒
Register Today!
Fauna logo
Log InContact usStart for free
Fauna logo
Log InContact usStart for free
© 0 Fauna, Inc. All Rights Reserved.

Related posts

Building a Serverless REST API with Fauna, AWS, and TypeScriptWhat is a distributed database and when should you use oneBuild a Serverless multi-tenant SaaS app with AWS and Fauna

Start for free

Sign up and claim your forever-free Fauna account
Sign up and get started

Table of Contents

Lexmark blog header

How Lexmark’s Optra Edge platform processes 2M daily IoT messages using Fauna

Apr 4th, 2024|


Data ConsistencyUse CaseServerlessDistributed
Case study

Fauna + Lexmark and Differential

Read on to learn why digital agency Differential implemented Fauna as the transactional database for Lexmark's dynamic, data-intensive IoT application that processes two million daily messages at the edge.

➡️ About Lexmark and Differential

➡️ Lexmark Optra Edge Project Background

➡️ Optra Edge Requirements

➡️ Why Fauna

➡️ Optra Edge Architecture

➡️ Lifecycle of a Transaction

➡️ Conclusion

About Lexmark and Differential

Lexmark is a $3.7B provider of cloud-enabled imaging and IoT technologies that offers a diverse portfolio of products across printers, imaging products, and software solutions. Optra Edge is a Lexmark product that combines IoT devices in the field with powerful artificial intelligence software to offer data-driven, real-time business insights and recommendations for manufacturing, retail, and transportation clients.
Differential is a full-service product strategy and development agency that supports Lexmark in delivering some of Lexmark’s key digital applications and products, including Optra Edge. Differential was tasked with building an underlying architecture that could support Optra Edge’s disparate IT and business requirements. This case study unfolds how Lexmark’s Optra Edge business requirements mandated a transactional database with a dynamic data model, serverless and API delivery model, and multi-region architecture, and why Fauna was ultimately selected.

Lexmark Optra Edge Project Background

IoT application architectures can vary greatly depending on their specific use case, functionality, and transactional data requirements. Unlike traditional software applications, IoT applications need to accommodate another layer of management and connectivity at the device or sensor level - which can introduce complexity in delivering the application without complicated stitching or maintenance.
The Optra Edge team needed to select systems across the stack that could keep the overall architecture lightweight to maintain performant IoT application delivery, as well as systems that could accommodate the many data types associated with a variety of use cases and industries. For example, Optra Edge serves companies in the transportation industry optimize parking-lot operations by counting vehicles using on-board machine learning algorithms that identify vehicles and render utilization in real-time, but also helps retail customers in tracking foot traffic quality.

Optra Edge Requirements

Marcelo Reyna, Head of Infrastructure and Cybersecurity at Differential, led the Optra Edge implementation and worked with the Lexmark team to define the following requirements to ensure the database layer integrated well with the Optra Edge’s IoT tooling and application layer:

Flexible data storage and querying

Optra Edge generates a variety of unstructured, semi-structured and structured data across their disparate use cases, so they needed a database that could accommodate this variability, while maintaining a portion of the business logic in the database to keep the application code lightweight and performant.

Serverless management and API delivery

Optra Edge selected AWS Lambda for compute functions and sought a database that could integrate with Lambda’s HTTP interface without having to manage connection pools. In addition to the delivery model, the Lexmark team didn’t want to allocate development time to the undifferentiated database management and scaling activities associated with legacy databases.

Global scalability, burstability, and security

Optra Edge processes up to 2 million daily messages with variable usage and is used by enterprise customers across the globe, so the compute platform and database would need to be able to support peak times without incurring latency, scale down on demand, offer enterprise-grade security, and be available across geographic regions (ideally, without having to configure the database to accommodate such patterns).

Transactional data processing

A key piece of Optra Edge’s value proposition is transforming raw data into actionable insights, so the transactional capabilities of the architecture were critical. Processing and serving the data in a strongly consistent manner was also important to ensure customers accessed accurate data.

Why Fauna

Lexmark Optra Edge and Differential ultimately turned to Fauna because it offered a flexible and powerful data model, a fully serverless database delivered as an API with zero operations, and a scalable multi-region architecture that could handle the massive amount of data generated by their IoT devices without manual intervention. Reyna shared, “We built Optra on Fauna to help us focus on development instead of administrative tasks. Fauna uniquely solves the availability, latency, security, and compliance needs for tracking rapidly changing device data produced by machine learning algorithms at the edge.” Key reasons why Fauna was selected over alternatives like MongoDB and DynamoDB included:

Powerful and dynamic querying

Fauna stores data as documents — which means it can accommodate the unstructured and semi-structured data generated by Optra Edge’s IoT devices, but its powerful document-relational data model also incorporates the relational power (joins, foreign keys, strong consistency, etc.) of a traditional RDBMS. Developers using Fauna can write application-native code in a familiar, modern coding style within a transaction context. A single request can encapsulate a transaction that spans multiple records, and the operation can be transmitted and executed atomically by the database. Further, database requests can be parameterized as functions, similar to stored procedures in a traditional SQL system, so that logic can be abstracted from applications that are difficult to upgrade in place. With Fauna, you can benefit from this native functionality without being constrained by the rigidity of a relational model.
By leveraging the Fauna Query Language (FQL), the Optra Edge development team could integrate their IoT fleet management software (Azure IoT Hub) via AWS Lambda, perform a query, and inject the results in Fauna all as one single transaction.

API delivery model & no-ops

One of the key advantages of Fauna when used as an IoT database is its API delivery model, which more naturally fits with broader API tooling leveraged in IoT applications. In the case of Optra Edge, Fauna’s HTTP interface enables stateless connectivity with AWS Lambda without connection pools, keeping the application lightweight and efficient, while minimizing latency and maximizing throughput.
Marcelo’s team was laser-focused on delivering the best possible end-user experience and didn’t want to spend time focused on undifferentiated database operations. Fauna allows the team to focus on delivering a first-class customer experience, instead of database sharding, capacity planning, cluster management, or other maintenance tasks.

Scalability, elasticity, and modern security

Fauna’s native Distributed Transaction Engine (DTE) delivers global availability, replication, and distribution by-default, which allows Lexmark to deploy Optra Edge in multiple regions around the world without requiring IT operations staff involvement. Fauna offers multiple Region Group options; all databases created are immediately replicated across three geographic regions within a chosen Region Group, while Fauna’s DTE provides no-compromise ACID compliance. Fauna’s geographically distributed storage also ensures low latency local access and data resilience. This is critical for Optra Edge, which collects data from devices in various locations and processes it in real-time for enterprise clients. Fauna's security features helped Differential and Lexmark ensure the confidentiality and integrity of their customer's data. Fauna is Soc 2 Type 2 certified and offers full data encryption at rest, and its Region Group concept ensures data residency compliance with regulations like GDPR. Meanwhile, Fauna’s fine-grained attribute-based access control enables highly specific and dynamic access control policies based on attributes of the user, the data they are accessing, and the context of the access request.

Application Architecture

Lexmark diagram

Lifecycle of a Transaction

It’s helpful to contextualize where Fauna fits in Lexmark’s broader application architecture by walking through the deployment process from start to finish.
Starting at the device layer, Lexmark leverages Microsoft Azure IoT Hub and the Hub’s Device Provisioning Service to manage its device fleet. When the manufacturing team creates a new product, a certificate is installed on the device, which later allows the product to become a member of the Hub by authenticating through the DPS. Azure IoT Hub provides an agent which is installed via Lexmark’s firmware, this agent is used to identify and manage the state of the device through a digital twin — a JSON representation of the devices’ current and desired state.
The data generated by devices and orchestrated by Azure IoT Hub is aggregated and shipped to a GraphQL API endpoint implemented by AWS Lambda. The GraphQL API integrates with Stripe for payments, Auth0 for authentication, Fauna for the underlying transactional database, and other services as needed. The GraphQL API then mutates data and writes to Fauna via the Fauna Query Language which is in parallel forwarded to any other integration the customers may have configured through Optra’s “if-this-then-that” like interface. All of this is executed with replications cross-region, strong consistency, and low latency.


Fauna’s comprehensive set of features has allowed Lexmark to deploy Optra Edge with minimal IT operations staff involvement, ultimately streamlining operational workflows and overhead, enhancing customer experiences, and enabling the team to focus on continued IoT fleet management innovation that drives the business forward.
If you’re interested in learning how Fauna’s distributed document-relational database can support your IoT application, sign up for a Free Enterprise Trial and set up a demo with one of our experts.

If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, and serverless databases, Fauna is hiring!

Share this post

‹︁ PreviousNext ›︁

Subscribe to Fauna's newsletter

Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.