- Use cases: Edge, Catalog
- Industries: Retail, Manufacturing
- Products and tools: Atlas, Atlas Edge Server, App Services, Data API, Atlas Device Sync
- Partners: Next.js
In today’s interconnected and rapidly changing economic landscape, efficient inventory management is pivotal to the operational success of businesses across various industries, in particular manufacturing and retail. Atlas Edge Server offers a state-of-the-art solution designed to enhance inventory operations by providing real-time data synchronization, conflict resolution, and disconnection tolerance. This technology enables businesses to maintain continuous operations and optimize inventory levels even when networks are unstable.
Edge computing is transforming how businesses manage operations by moving computation closer to where it’s most needed. This technology is particularly impactful in inventory management, enabling real-time data access and processing to ensure operational continuity and efficiency, even during connectivity outages. By decentralizing data handling, edge computing enhances responsiveness and reduces bandwidth usage, which is essential for maintaining smooth operations in factories, warehouses, and retail stores.
Building on the success of our event-driven inventory solution, which leveraged MongoDB Atlas to enhance inventory management through real-time data strategies, we are now introducing a solution designed to maintain seamless operations despite connectivity issues. Our multi-location setup involves three key users: two inventory managers and one area manager, each overseeing different segments of the inventory and operational scope. We’ll deploy identical systems across individual locations and the public cloud to support remote staff. The critical difference is that inventory managers' applications will be connected to an Edge Server, ensuring that they can see a real-time view of inventory, issue replenishment orders, and access the product catalog without interruptions, even in offline scenarios. Meanwhile, the area manager’s application will maintain a constant connection to MongoDB Atlas, allowing for comprehensive oversight and real-time data synchronization across locations.
This setup minimizes latency when accessing your inventory data and ensures that each location can operate independently of network availability, thus enhancing the reliability of mission-critical operations. Integrating MongoDB Atlas with Edge Server provides a robust framework that supports continuous synchronization and seamless data flow between edge devices and the cloud. This ensures that all users, regardless of their specific roles and connectivity status, have access to accurate and up-to-date inventory information, enabling better decision-making and optimized operational efficiency across the board.
In the retail sector, efficient streamlined store operations and intelligent inventory management are crucial for success. A retailer must ensure that the items that a customer wishes to purchase are easily available at the right location and that staff in store and in office can easily view and manage stock and assortment. With a projected investment in edge computing reaching $208 billion by 2023, retailers are embracing this technology to enhance service delivery and maintain uninterrupted operations, even in low connectivity environments. Edge computing enables real-time data processing locally at stores, which is essential for managing point-of-sale systems, inventory, and customer service applications efficiently during peak times. This approach not only ensures operational continuity and immediate data synchronization across online and offline channels but also enables retailers to offer personalized shopping experiences through real-time data analysis, thereby enhancing customer satisfaction and maintaining a competitive edge in the market.
Modern manufacturing supply chains are complex systems where efficient inventory management is crucial for controlling costs and ensuring timely delivery. The bullwhip effect, where small fluctuations in demand cause increasingly larger fluctuations up the supply chain, can severely disrupt supply chain performance. Balancing inventory levels helps mitigate this impact and maintain operational stability. For manufacturers, the key to optimization lies in maintaining a real-time, accurate view of inventory across multiple locations, while reducing carrying costs and ensuring necessary materials are ready for dispatch. The challenge intensifies with the need to integrate and analyze diverse data streams from various sources, often in different formats. In environments with limited connectivity, ensuring data accuracy and availability becomes crucial, necessitating solutions that support robust offline inventory management capabilities to maintain operational continuity and decision-making efficacy.
MongoDB Atlas provides a holistic, end-to-end data layer that optimizes inventory management along the entire value chain. From the device level to the cloud, MongoDB empowers businesses to overcome the complexities of modern supply chains and thrive in an increasingly competitive market. Atlas Edge Server plays a pivotal role in this architecture, acting as the critical link that bridges the gap between local device operations and centralized cloud data management.
Leveraging our existing event-driven architecture, we incorporate the Atlas Edge Server to enhance operational resiliency. This setup involves equipping each location, whether it is a retail store or a manufacturer’s warehouse, with its own Edge Server that operates in sync with MongoDB Atlas to empower inventory managers. This configuration allows for uninterrupted data processing with minimal latency. Updates, such as changes to product catalogs, pricing adjustments, or production demands, made in MongoDB Atlas are automatically pushed to each Edge Server by Atlas Device Sync. These servers then update their local databases and immediately distribute the new information to endpoint devices at the location such as RFID scanners, tablets or workstations running our inventory management system.
During periods when connectivity with the cloud is lost, the Edge Server’s capability to operate independently is crucial. In such events, each site’s Edge Server continues to manage and record transactions locally, allowing operations such as sales processing in retail or materials tracking in manufacturing to proceed without interruption. Simultaneously, any updates made centrally continue to be queued in the cloud, awaiting reconnection. This design ensures that your inventory operations can continue running seamlessly in a secure way.
Upon re-establishing connectivity with the cloud, the Atlas Edge Server synchronizes all locally stored data with MongoDB Atlas through Atlas Device Sync. This process guarantees that transaction records and inventory updates remain consistent across the entire network. The Atlas Edge Server simplifies this complex process, incorporating built-in mechanisms for security, conflict resolution, and disconnection tolerance. This makes it significantly easier for businesses to maintain continuous operations, whether in a warehouse or a retail store, ensuring that critical applications like inventory management can run smoothly without a consistent network connection.
This solution can leverage the same data model used in the event-driven inventory one. Here is a quick recap:
The primary collections — products, transactions, users and locations — form the foundation of our inventory management system. These collections represent your stock, incoming and outgoing movements that affect stock levels, your app users, and the different locations that the inventory system is serving. In addition, we have a view that is used by the area manager to have an overview of the inventory in all the locations in the same area.
What sets the document data model apart from traditional tabular models is its remarkable flexibility, making it the perfect choice for achieving a single view of inventory. With a tabular approach, achieving a comprehensive overview of your inventory would typically involve complex joins across multiple tables. However, with MongoDB's document model, this complexity is eliminated.
In the event-driven inventory solution we talked about the Extended Reference pattern and how it helped to avoid unnecessary joins across collections. While we are also leveraging this pattern here, there are others that we leverage in our design, such as the Computed pattern.
The Computed pattern plays a crucial role in our data model by precomputing and storing aggregate values to optimize query performance. In our application, this pattern is specifically employed to calculate and store the totalstocksum for each product. This field aggregates the individual stock levels of each variant within a product, grouping them by location. This approach minimizes the need for on-the-fly calculations during queries, significantly speeding up data retrieval processes and enhancing the overall efficiency of the inventory system.
Step 1: App Services configuration
Ensure the Atlas Edge Server is properly configured by checking Device Sync activation, reviewing data access permissions, and enabling authentication providers in the MongoDB Atlas interface. This step involves verifying that the Edge Server is ready to operate with the correct settings for data synchronization and user authentication.
Step 2: Configure Edge Server
Set up the Edge Server on your local hardware or another hosting environment. Use edgectl, our command-line tool, to initialize and configure the Edge Server with the necessary settings, including the application ID and registration token. This setup includes generating a docker-compose file and activating the Edge Server's offline-demo capability to simulate connectivity scenarios.
Step 3: Frontend configuration
Update your environment variables to connect the frontend application to the Edge Server. This includes specifying server addresses and ensuring all necessary MongoDB connections and configurations are correctly set up in your application environment files.
Step 4: Run locally or deploy your solution
Depending on your setup, you can either run the inventory management system locally or deploy it to a suitable hosting environment. Edge Server typically operates on-premises to handle both local device synchronization and bi-directional sync with MongoDB Atlas. For development and testing, you might host it on your own device. For more detailed hosting options and requirements, please review the Edge Server Host Requirements documentation.
If you want to get hands-on, follow our step-by-step tutorial on how to Enable Offline Inventory with Atlas Edge Server. Access our GitHub repository for code samples, deployment guide, and more!
Throughout this solution, we’ve covered multiple MongoDB topics. Here’s a quick recap of the key learnings:
Remember that this is just the beginning. Feel free to explore, tweak, and enhance this solution to fit your own needs.
Create this demo for yourself by following the instructions and associated models in this solution’s repository.
Discover how MongoDB addresses the current challenges any retailer would experience when deploying or enhancing in-store servers using edge computing.
Equip your inventory management app with the power of Atlas Edge Server, ensuring seamless operation even in challenging connectivity scenarios.
Explore how our customers are using MongoDB Atlas to solve the most demanding inventory management use cases at the edge.