J A SON
ngular
M
agento
Web Server’s Workload
Pull up the Page Serve Assets & Media
Read the XML Web server & Database
Query the Database
Render the page Build the page on the fly
Performance & Scaling Mantra
• Reduce stress on the Web server & DB – Clones [Multiple App Servers & DB Master Slaves] – Caching [Fullpage Caching / Memcache] – Varnish – Move the workload to the Client Side
Empower the Browser
• Browsers are Powerful but underutilized. • Offload mundane tasks to the Client Side. • Go Back to the Server only when needed.
De-Couple your App
• Server spits out JSON • Presentation Layer Sits on the Client Side. • JavaScript parses the JSON data and populates the dynamic content blocks, images are pulled from S3 / Cloudfront.
In Magento’s Context
• JSON output contains Product Catalog along with necessary attributes. • Layered Navigation, Filters, Sorting, keyword Search done 100% Client side on JSON data. • Product Inventory check is an AJAX request to the server. • Add to Cart, Checkout are direct requests to the server. • For Recently Viewed Products, use Local Storage or IndexedDB.
REST Web services
Web App
Web App
Browser
S3
RDS
Magento
EC2
Scalable Architecture
Server
Web App Web App
JSON JSON
Browser Media / Images Folder
S3
RDS
EC2
Insanely Scalable Architecture
Performance Metrics Webpagetest.org
Pingdom.com
YSlow
New Possibilities
• Windows 8 and Mac OS • Native Tablet Apps • Touch Screen Kiosks
Thank You
Just Another Magento http://jam.neevtech.com -Vinci Rufus vince@neevtech.com @areai51
Neev Information Technologies Pvt. Ltd. India - Bangalore
India - Pune
The Estate, # 121,6th Floor,
#13 L’Square, 3rd Floor
Dickenson Road
Parihar Chowk, Aundh,
Bangalore-560042
Pune – 411007.
Phone :+91 80 25594416
Phone : +91-64103338
USA 1121 Boyce Rd Ste 1400,
Pittsburgh PA 15241 Phone : +1 888-979-7860
sales@neevtech.com Sweden
Singapore
Neev AB, Birger Jarlsgatan
#08-03 SGX Centre 2, 4
53, 6tr,
Shenton Way,
11145, Stockholm
Singapore 068807
Phone: +46723250723
Phone: +65 6435 1961