Skip to Content

Odoo Province-Wide Group Chain Retail Franchise Supply Chain SaaS E-Commerce - High Availability, High Performance, Massive Data Support

Table of contents

No titles in the blog post


We have tens of thousands of retail customers in various cities, all of whom place orders with us through the Odoo platform, with scheduled weekly deliveries. The supply chain, e-commerce platform, warehousing and logistics are all in one system, and through RFID IoT technology, forklift and shelf operations are automated efficiently throughout the entire process. Since the tobacco industry digitized early, there are many systems to integrate, including SAP Hana, Oracle-based marketing systems, Yonyou, the National One Project, and Java and RFID-based container intermodal transport systems. This has solved our three major data requirements: "comprehensive, timely, and accurate".

OdooERP-MES+ECommerce WManager • Director of the Marketing Center of 20 City Branches  Learn more...

Odoo is a full-featured ERP platform and also an online service portal. As Odoo becomes more and more popular, there have been a large number of high-availability deployments with massive users. Odoo is also an open-source and open comprehensive interface platform, easily integrating with third-party system platforms such as SAP Hana, Yonyou Group Finance, and Kingdee Cloud Cosmic.

For example, Odoo's official website has 12 million users and hundreds of new enterprise SaaS users added each month, the national Odoo financial teaching platform has tens of thousands of real-time tenants (used by multiple schools), and our Odoo e-commerce app has 30,000 online users. Massive data applications are everywhere; domestic listed companies using Odoo, especially in the manufacturing industry, have SKU counts in the hundreds of thousands. At the same time, leading domestic electric vehicle manufacturers have basically all started to adopt Odoo.

Customer Overview: A chain group in a certain province, with subsidiaries in various cities

The client user is a province-wide chain franchise management group. This provincial unit of China Tobacco needs to manage about 200,000 directly operated, franchised, and jointly operated stores of dozens of levels in various cities. Due to long-term stable operation, multiple systems currently exist, with corresponding systems for sales, procurement, stores, analysis, WeChat, and other functions. The systems to be integrated include: SAP Hana, Oracle-based marketing system, Yonyou, National One Project, and Java and RFID-based container intermodal transport system. In response to the national policy of supporting small and medium-sized enterprise merchants, the user needs to build a full-supply-chain financial management platform to facilitate short-term financing loans for small and medium merchants, with inventory commodity value as collateral. Odoo, with its comprehensive functions and open features, quickly implemented the full-supply-chain financial management platform, directly integrating via XML/RPC, perfectly solving the industry's three major data requirements: "comprehensive, timely, and accurate".

Odoo province-wide group chain franchise retail supply chain SaaS high-availability architecture deployment

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

In the OdooAi chain franchise supply chain e-commerce portal, the user has implemented complete B2B and B2C platform functions, that is, retail stores place orders with the management center, and the management center makes unified purchases from upstream suppliers and delivers weekly. At the same time, through the internal deployment of Alibaba's hybrid private cloud, security and convenience coexist efficiently. The system has passed the nationalization certification, domestic IT innovation, and Level 3 security protection certification.

Odoo province-wide group chain franchise retail supply chain SaaS high-availability architecture deployment


Group distribution, management of hundreds of thousands of stores

The merchant side fully uses Odoo's retail POS system, combined with various hardware, to achieve business requirements such as self-service shopping, scan-and-go, and daily closing and clearing.

1. Pos Box IoT gateway. Used for self-service large-screen shopping, allowing users to complete the entire shopping process by themselves. Due to the large number of users, self-flashed Raspberry Pi was used in actual deployment.

2. Payment code scanning device. For consumers, it automatically recognizes payment codes from various payment platforms. Scanning the code completes the entire sale, with no need for staff or users to click or input.

3. POS dual-screen cash register device. Staff screen - full cashier management functions; customer screen - displays payment code, advertisements, and add-on purchase information.

4. Staff barcode scanner. Scan the product or batch to automatically add to cart, and can also be used for inventory counting.


Odoo province-wide group chain franchise retail supply chain SaaS high-availability architecture deployment


To better adapt to user payments, we developed modules for WeChat Pay and Alipay, supporting multiple payment methods.

Odoo province-wide group chain franchise retail supply chain SaaS high-availability architecture deployment


Odoo supply chain platform, integrated warehousing and logistics management


Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

Full process coverage, comprehensive support for barcodes, QR codes, and RFID, guaranteed by national Level 3 security protection requirements

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

Through the Odoo integrated smart logistics platform, users across the province have effectively achieved:

•Operational concepts • Tool-based

•Business management •Digitalization

•Safety technology •Modernization  

Inbound and outbound business data is fully integrated with existing systems (national, prefectural, and external systems; sales/finance/automatic sorting machines), fully realizing automated data entry-free processing of existing business data. Business progress can be viewed in real time.

 Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

Full-process forklift operation and full barcode scanning operation. Automatic data completion and automatic full-process logging.

Through full RFID management of shelves, forklifts, and pallets, warehouse operators achieve automated operations and only need to focus on business.


Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

Hybrid cloud platform: comprehensive cloudification and clustering of infrastructure.

RFID, QR code: national standard RFID-6B shelves and pallets. One code per item, full traceability.

IoT platform: device registration, monitoring, early warning. Active control and operation integration (e.g., zero-strip system light tapping)

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform


Super simplified scanning operation

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform


Automated inbound and outbound processes, incorporating management concepts into the system

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform

----

Overall functions: Provincial Bureau -> City Level -> Multiple Stores -> Central Logistics -> Group Distribution/Group Supply Chain Platform




Odoo open interface platform, integrated with Yonyou and SAP Hana

The tobacco industry, as the most informatized and comprehensive industry, has numerous and complex business subsystems. Through Odoo's open interface platform, we have integrated various systems using RESTful API + web service + DTS data extraction.

1. Odoo integration with the tobacco industry-specific "Project No. 1" platform

Integrated tobacco packing, box codes, carton codes, and related packing and shelving information, quickly realizing RFID full-process self-service data entry-free operations.

1. Odoo integration with the tobacco industry-specific "Project No. 1" platform

2. Odoo integration with the tobacco Yonyou financial system

The group finance uses the Yonyou platform. Odoo AiErp regularly synchronizes all inventory accounts to the backend daily, involving data including product specifications, warehouses, etc., to assist various financial accounting.

2. Odoo integration with the tobacco Yonyou financial system


3. Odoo integration with the tobacco SAP Hana data warehouse

SAP Hana is the customer's data warehouse system, mainly used for statistical analysis of massive customer data and daily order detail data. Odoo integrates with SAP mainly to retrieve customer information and customer delivery route information. Data is retrieved through the data warehouse without affecting the real-time operational business database.

3. Odoo integration with the tobacco SAP Hana data warehouse

4. Comprehensive security audit of data integration

Based on domestic IT innovation requirements, the related data integration and system architecture fully comply with national security standards and have passed the relevant classified protection security certifications. While ensuring comprehensive, timely, and accurate data, it is also secure and reliable.

4. Comprehensive security audit of data integration



Odoo group deployment, massive data, high-availability architecture

To better support massive users and massive data, especially for the multi-city, multi-company deployment of group companies, we need to implement high-availability deployment of Odoo to achieve high performance, high stability, high scalability, and high security. We take this multi-tenant e-commerce supply chain portal application as an example to briefly describe the deployment of a high-availability architecture. Since Odoo itself is a B/S architecture application, this architecture can also be applied to all Odoo deployments. At the same time, the fully open-source Odoo platform also well ensures data security and meets the national Classified Protection Level 2 and Level 3 security requirements.

Odoo province-wide group chain franchise retail supply chain SaaS high-availability architecture deployment

Odoo adopts industry-popular infrastructure, including:

  • Operating system: Linux, officially recommended Ubuntu
  • Database: PostgreSQL
  • Web server: built-in Werkzeug, frontend generally proxied through Nginx, Apache, etc.
  • Frontend: JavaScript-based rich client, calling backend data via JSON-RPC. Technology based on jQuery + Backbone + Owl (the MVVM architecture adopted since Odoo 14)
  • Backend: multiple Odoo services, enabling online hot upgrades. Based on Python 3.8+, using threading + gevent to achieve multithreading and multi-coroutine. Also supports multi-process startup

These general and open-source-centric architectures ensure good scalability and facilitate cluster and high-availability deployment.

In this application scenario, the management party is the group company, with multiple subsidiaries. Each subsidiary provides mobile e-commerce wholesale and retail services to its own B2B and B2C customers, and each subsidiary manages its own supply chain business. Each B2B customer then provides retail services to end B2C consumers through store cash registers. At the top level of the platform, the group company uniformly manages all customers and products, and formulates business rules through Odoo to standardize the daily operations of subsidiaries and B2B customers. The system must meet the requirements of ensuring millions of users online, achieving rapid response, hot backup, hot updates, and dynamic expansion.

 

  1. Consumers/Retail Merchants

That is, our B2B and B2C customers. These customers make wholesale and retail purchases through the province's Jinye and 20 offline stores, Odoo-developed apps, WeChat mini-programs, and e-commerce platforms. Accessed via the Internet.

  1. Suppliers

Suppliers who provide interfaces to the platform. Similar to 1, they manage products and shipments through apps, WeChat mini-programs, and websites. Accessed via the Internet.

  1. Platform Administrators

Platform owners, including group users and subsidiary users, mainly manage business through Odoo. They access the platform via the intranet or through VPN to enter the intranet.

  1. Internet

The portal website built on Odoo, as well as apps or WeChat mini-programs implemented based on Odoo interfaces, all provide services through the Internet. Odoo only provides interface services through the Internet for client calls, and related management backend functions are not exposed through the Internet.

  1. Firewall

The firewall provides security isolation, and enterprises can customize relevant policies to prevent network attacks, etc.

  1. VPN + Security Policy

The core platform is deployed in the group's IDC. Odoo's backend business management services are only provided to intranet users. Therefore, all subsidiaries and related management users can only access the intranet via the intranet or VPN to perform business management.

  1. Frontend Service Group

The front-end server group generally includes reverse proxy servers and load balancing servers.

We use Nginx reverse proxy servers. Odoo provides external web services through Nginx. Typically, one active and one standby server are sufficient for high availability, and an Nginx cluster can be built to provide better performance. Relevant SSL certificates are also configured through Nginx to ensure connection security.

When multiple Nginx servers are used, we need to add load balancing servers such as F5 for dynamic user distribution.

Another advantage of using Nginx as the front end is that when the platform needs to comply with national cybersecurity classified protection requirements, many aspects can be handled through Nginx.

  1. Core Odoo Service Cluster

Odoo was designed with clustering and multi-tenancy in mind. Based on actual business conditions, we can divide it into multiple Odoo service clusters to separate application loads and ensure high performance.

Each cluster can consist of multiple Odoo servers, so that during application updates, operations are ensured, or when a certain Odoo server goes offline due to failure, other Odoo servers can take over the service to ensure high availability.

These servers are assigned tasks through the front-end server group in section 7. Generally, we place these server clusters in the DMZ for better security protection.

  • 8.1 Core Odoo Service Cluster

Provides core system services, including external app interfaces and internal business management.

  • 8.2 Scheduled Task Odoo Service Cluster

Odoo's scheduled tasks, namely Cron, are generally used for business calculations or data synchronization. For example, synchronizing user and product information from other systems, synchronizing order information from Tmall/Amazon, and regularly reconciling with payment service providers. In manufacturing, they are used for MRP calculations or replenishment operations.

Odoo's Cron can be executed separately. Since this service can be free of HTTP services, separating it helps improve performance, so we established an independent scheduled task service cluster.

  • 8.3 Other Odoo Service Clusters

Since Odoo can be started with multiple processes, we can separate certain applications based on actual business needs to establish standalone Odoo servers or Odoo server clusters.

In terms of native functionality, its PoS Box, like instant messaging, both use a bus service based on long polling, which is relatively independent and can be deployed separately.

In the application of this article, we can also deploy the external interface services independently.

Note! When we split independent Odoo application clusters, we must pay attention to code handling, especially for the Odoo servers within this cluster. We need to ensure code consistency across multiple servers, which can be achieved using Linux's rsync service.

  1. CDN/File Service Group

To improve performance, static files can be stored using a dedicated CDN or file server, either your own CDN or a cloud provider's CDN.

We may decide which static files to process via CDN, typically including: CSS, JS, fonts, images, system attachments, etc.

  1. Data Cache Cluster

Odoo itself has a data caching mechanism, and PostgreSQL also has a built-in data caching mechanism. For higher data read performance, we can deploy Redis as a secondary cache for PostgreSQL to improve database performance and reduce IO requests.

This feature requires some secondary development to control data reading. Generally, for optimistic data such as product categories that basically do not change, we retrieve from Redis. For pessimistic data such as products that need to record their views and add-to-cart quantities, we retrieve from the database.

Redis can be deployed in a cluster; for details, you can refer to relevant articles.

  1. PG Database Cluster

Data is the core of an enterprise, so the database is the most important component of the platform. PostgreSQL, as the most mainstream database, has various mature clustering solutions.

First, in the hardware layer architecture, we should try to ensure:

  • Use physical machines instead of virtual machines as database servers
  • Use SSDs or high-speed hard drives to ensure high IO performance
  • Use RAID to ensure high availability and high IO performance of storage

Next, deploy a high-availability architecture, with our main goals being:

  • Read-write separation to achieve high performance
  • Master-slave replication to achieve high availability

Related solutions are already mature; for example, we can directly use:

  • Huawei Cloud solution:

https://support.huaweicloud.com/bestpractice-rds/rds_pg_0009.html

  • Alibaba Cloud solution:

https://help.aliyun.com/document_detail/127875.htm?spm=a2c4g.11186623.2.8.202b5beeeH4Bwv#concept-1443745

They all provide public or private cloud deployment solutions.

If you want to build it yourself, there are also multiple options.

  • You can use PostgreSQL's built-in asynchronous streaming replication based on Standby for replication configuration.
  • You can use pgpool, which is probably the most popular PostgreSQL database connector that combines connection pooling, primary/standby switching, and load balancing.
  • Commercial products

There are many related solutions; you can look them up yourself.

  1. Operations and monitoring services

Generally, owners have their own basic operations system, and Odoo uses common platforms, so the above infrastructure can be easily integrated into the group's overall IT operations architecture.

The following is a brief description.

  • 12.1 Backup

Regular database backups.

Regular application service and configuration backups.

GIT-based code version management and release management.

  • 12.2 Host monitoring

Incorporate the above hosts into the monitoring platform.

  • 12.3 Logs and auditing

Odoo's business data changes come with built-in auditing; just use it well.

For system operation logs, it is best not to use the operating system's logs; through configuration, record them in a separate database and implement alert management.

Other specific operations and maintenance tasks can be implemented in accordance with the owner's SLA standards.

 

The above serves as a reference for Odoo high-availability architecture deployment, helping us support massive numbers of users and massive amounts of data while improving performance, stability, and security.

 

Amazon, Tmall, JD.com, Shopee Multi-Platform Order, Inventory & Finance Integration | Odoo Omnichannel Data Hub