What is POS Architecture

Requirement

  • Magestore POS will have Magento as centre data of Retailer Store front.

  • Magestore POS will simulate Magento sales process adapt with Magento data

  • Magestore POS can work offline without network connection.

  • The performance according to user experience of each POS must follow the Google RAIL Model

  • Magestore POS capability must processing at least 100K orders / day, with at least 100 POS accessing at the same time!

  • The architecture must have scalability!

POS Client Architecture

  1. The Magestore POS using PWA / ReactJS running on client browser.

  2. The POS client using service worker to asynchronously loading and saving data from Magento to browser IndexedDB and App Cache.

  3. The Service Worker using RestAPI or GraphQL to access Magento data.

POS System Architecture

Tech Stack

We need new member join to contribute with any one of such below tech stack:

  • Frontend language: ReactJS

  • Frontend UI Library: MUI

  • Frontend environment: Chrome browser, Windows on PC, MAC, iOS on iPad, iOS on iPhone, Android

  • Backend language: PHP

  • Backend platform: Magento 2.4.x

  • Database: MySQL

  • Source control: GitLab

  • Backend OS: Linux, Ubuntu

How POS Share Stock with Magento

Magento Implement Architecture

This Quick Start provides two deployment options. Depending on which option you choose, it creates and configures the necessary AWS components in the AWS Cloud.

Deploying this Quick Start with default parameters for end-to-end deployment (which creates a new VPC) builds the following Magento environment in the AWS Cloud.

Architecture Flow

Running this Quick Start with default parameters for a new VPC deploys and configures the following AWS components in the AWS Cloud:

  • A VPC that spans two Availability Zones. Each Availability Zone is configured with a private and a public subnet.

  • In a public subnet, a bastion host to provide Secure Shell (SSH) access to the Magento web servers. The bastion host is maintained by an Auto Scaling group that spans multiple Availability Zones, and is configured to ensure there is always one bastion host available.

  • AWS-managed network address translation (NAT) gateways deployed into the public subnets and configured with an Elastic IP address for outbound internet connectivity. The NAT gateways are used for internet access for all EC2 instances launched within the private network.

  • Either an Amazon RDS for MySQL or an Amazon Aurora database engine deployed via Amazon RDS in the first private subnet. If you choose Multi-AZ deployment, a synchronously replicated secondary database is deployed in the second private subnet. This provides high availability and built-in automated failover from the primary database.

  • An Amazon ElastiCache cluster with the Redis cache engine launched in the private subnets.

  • EC2 web server instances launched in the private subnets. Elastic Load Balancing deployed to automatically distribute traffic across the multiple web server instances.

  • Elastic Load Balancing deployed to automatically distribute traffic across the multiple web server instances.

  • Amazon EFS created and automatically mounted on web server instances to store shared media files.

  • Auto Scaling enabled to automatically increase capacity if there is a demand spike, and to reduce capacity during low traffic times. The default installation sets up low and high CPU-based thresholds for scaling the instance capacity up or down. You can modify these thresholds during launch and after deployment.

  • An IAM instance role with fine-grained permissions for access to AWS services necessary for the deployment process.

  • Appropriate security groups for each instance or function to restrict access to only necessary protocols and ports. For example, access to HTTP server ports on Amazon EC2 web servers is limited to Elastic Load Balancing. The security groups also restrict access to Amazon RDS DB instances by web server instances.

Magento Components

This Quick Start deploys Magento Open Source (v2.1.18 or v2.3.2) with the following prerequisite software:

  • Operating system: Amazon Linux x86-64

  • Web server: NGINX

  • Database: Amazon RDS for MySQL 5.6 or Amazon Aurora

  • Programming language: PHP 7, including the required extensions

This Quick Start also optionally deploys Magento sample data, which lets you experiment with custom themes and view the web store. If you choose to install Magento software with sample data, the Quick Start mounts an Amazon EFS file system as a drive within the web server nodes and installs common media assets in the Amazon EFS file system.

For more information about these utilities, see Install the Magento archive on your server on the Magento website.

Magento and POS Api

Magento have API document allow you to implement Rest API which is called from outside. This is just a built-in framework allow you to build end-point with security token. Every other business data fetch and return must be processed by you!!!

https://devdocs.magento.com/guides/v2.4/rest/bk-rest.html

In another viewpoint, if you want from Magento quickly call API to other service, one of the simplest way is using Webhook Extension.

https://www.mageplaza.com/magento-2-webhook/#log-requests-and-responses

Magento Integration with ERP or Another System

  • Message Queue-Based Architecture: simplifies the coding of decoupled applications and provides better performance, reliability, and scalability.

  • Async Integration: Asynchronous Integration is integration where the data does not have to be moved immediately but can be moved at a later point in time. This means that the system sending a request doesn't have to wait for a reply in order to continue operating.

  • EAV Design Pattern: Entity attribute value model (EAV) is a data model to describe the attributes (attributes, parameters) of an entity. It can be used to describe their potential huge, but the number of entities that will be applied to a given entity is relatively small.

  • API Custom Query & SQL Custom Query: flexible to customer API and SQL according to specific system or business rule.

  • Adjustment Scheduler: Adjusting a schedule means making some updates to its content due to variations for the purpose of preventing negative consequences of the variations and realigning the schedule content with the initial state. For example, in a production schedule a lack of inventory and personnel has been revealed so the manufacturing process can’t be continued until the issue is solved and a necessary adjustment (such as engaging additional workforce and inventory items in the production) is made.

  • Monitoring: Having some measurement and monitoring tool such as Number of messages in queue, Current Mean Time, Total Mean Time, …