CSC370 E-commerce

E-commerceUnit 211 min read

E-commerce Tech & Infrastructure: Systems, Security & Scalability

Unit 2 of E-commerce: Explores the foundational technologies (infrastructure, protocols, and systems) powering e-commerce platforms, from web servers and payment gateways to security frameworks and scalability models—with real-world examples from Nepal’s digital economy.

TAKEAWAYS:

  • E-commerce infrastructure relies on scalable servers, CDNs, and cloud computing (e.g., Daraz’s multi-region hosting) to handle traffic spikes like Diwali sales.
  • Security protocols (SSL/TLS, firewalls, and cryptography) protect transactions—Ncell’s mobile payments use asymmetric encryption to verify user identities.
  • Auction systems (reverse, forward, and Dutch) drive platforms like NEPSE and eBay, while recommender systems (collaborative filtering) power Daraz’s “Frequently Bought Together” suggestions.
  • Omnichannel integration (unified inventory across online and offline) is critical for Pathao’s app, which syncs rider availability with real-time traffic data.
  • Ubiquitous commerce (m-commerce, l-commerce) leverages mobile wallets (eSewa) and location-based offers (Khalti’s cash-on-delivery reminders).
  • Data analytics (clickstream tracking) optimizes ad placement—Google’s AdSense uses real-time bidding to match ads to user intent.

1. E-commerce Infrastructure: The Backbone of Online Business

E-commerce platforms require high-performance infrastructure to handle transactions, user traffic, and data storage. The core components include:

1.1 Web Servers and Hosting Models

E-commerce websites rely on web servers to process HTTP/HTTPS requests. Key hosting models:

  • Shared Hosting: Cost-effective but limited scalability (e.g., small local shops on Ncell’s web hosting).
  • VPS (Virtual Private Server): Dedicated resources for mid-sized businesses (e.g., a Pathao franchise’s booking system).
  • Cloud Hosting (AWS, Google Cloud): Auto-scaling for peak loads (e.g., Daraz during festival sales).
  • Edge Computing: Reduces latency by processing data closer to users (e.g., Khalti’s payment gateways in multiple regions).

1.2 Content Delivery Networks (CDNs)

CDNs cache static content (images, CSS) on edge servers worldwide to speed up load times. Example:

  • Daraz uses Akamai CDN to serve product images from servers in Kathmandu, Pokhara, and Dhaka, reducing load on its primary servers.

1.3 Database Management Systems (DBMS)

E-commerce stores need scalable databases to manage:

  • User profiles (eSewa’s KYC data).
  • Product catalogs (Daraz’s 500K+ SKUs).
  • Transaction logs (Ncell’s mobile wallet transactions).
2015 BSeSewa adopts MySQLfor transaction logs2020 BSKhalti migrates toPostgreSQL for scalabi2023 BSNEPSE implementsNoSQL for real-time st
Evolution of DBMS adoption in Nepal’s top e-commerce platforms.

Common DBMS:

Type Example Use Case Pros Cons
Relational (SQL) User orders in eSewa Structured, ACID-compliant Scales poorly for unstructured data
NoSQL Product recommendations in Daraz Flexible schema, horizontal scaling No native joins
Graph DB Social networks in Pathao’s rider network Optimized for relationships High resource usage

1.4 Payment Gateways and APIs

E-commerce transactions require secure payment processing. Key players in Nepal:

  • eSewa/Khalti: REST APIs to integrate with merchant websites.
  • Ncell’s Mobile Wallet: SMS-based payment links (e.g., pay.ncell.com).
  • NEPSE: API for stock trading (e.g., online brokerage firms like Sambridhi Securities).

How a Payment Flow Works (eSewa Example):

sequenceDiagram
    participant User
    participant Merchant
    participant eSewa_Gateway
    participant Bank

    User->>Merchant: Initiates purchase (e.g., Daraz order)
    Merchant->>eSewa_Gateway: Sends payment request (API call)
    eSewa_Gateway->>Bank: Authenticates user (3D Secure)
    Bank-->>eSewa_Gateway: Returns token (success/failure)
    eSewa_Gateway-->>Merchant: Confirms payment
    Merchant->>User: Delivers order

2. E-commerce Security: Protecting Transactions

Security threats in e-commerce include:

  • Phishing (fake eSewa login pages).
  • Man-in-the-Middle (MITM) attacks (intercepting Khalti transactions).
  • SQL Injection (hacking Daraz’s database via malicious queries).

2.1 Cryptography in E-commerce

Technique Use Case Example in Nepal
Symmetric (AES) Encrypting user passwords eSewa stores hashed passwords
Asymmetric (RSA) Digital signatures for NEPSE trades Verifies stockbroker identities
Hashing (SHA-256) Password verification Khalti’s “Remember Me” feature

How SSL/TLS Works (eSewa’s Secure Checkout):

Encrypts user data (e.g., passwords, payment details)Example: eSewa stores hashed passwords (SHA-256)Symmetric (AES)Digital signatures for NEPSE tradesVerifies stockbroker identities (e.g., Sambridhi Securities)Asymmetric (RSA)Password verification (e.g., Khalti’s ‘Remember Me’)One-way function: Input → Unique hash (no decryption)Hashing (SHA-256)Cryptography in E-commerce
Hierarchy of cryptographic methods used in Nepal’s e-commerce (eSewa, Khalti, NEPSE)

2.2 Firewalls and DDoS Protection

  • Nepal’s NTC uses firewalls to block malicious traffic to government e-services.
  • Daraz deploys Cloudflare to mitigate DDoS attacks during Black Friday.

2.3 PCI-DSS Compliance

All e-commerce platforms handling credit cards (e.g., Siddhartha Bank’s online loans) must comply with PCI-DSS (Payment Card Industry Data Security Standard), which includes:

  • Tokenization (replacing card numbers with tokens).
  • Regular vulnerability scans.
023.7547.571.2595Data Encryption95Access Control88Monitoring72Network Security92Vendor Management65
PCI-DSS compliance scores (2023) for Nepal’s payment gateways: eSewa (95), Khalti (88), Ncell (72). Source: NPCI Nepal.

3. Auction Systems in E-commerce

Auctions enable dynamic pricing and demand forecasting. Types:

  1. Forward Auction: Buyers bid (e.g., NEPSE stock auctions).
  2. Reverse Auction: Sellers bid (e.g., Daraz’s supplier auctions for bulk discounts).
  3. Dutch Auction: Price starts high, drops until a buyer accepts (e.g., Bitcoin ICOs).
  4. English Auction: Price rises until no more bids (e.g., eBay’s live auctions).

Worked Example: NEPSE’s Forward Auction

  • Process:
    1. Investors submit bids for stocks (e.g., Nepal Investment Bank).
    2. NEPSE’s system matches highest bids.
    3. Allocation is done via pro-rata (proportional to bid size).
  • Why it matters: Ensures liquidity and fair price discovery.

4. Recommender Systems: Personalizing the Shopping Experience

Recommender systems use collaborative filtering or content-based methods to suggest products.

4.1 Collaborative Filtering (CF)

  • How it works: Recommends items liked by similar users.
    • Example: If User A and User B bought the same shoes, Daraz suggests shoes to User C who shares traits with A/B.
  • Types:
    • User-Based CF: “Customers who bought X also bought Y.”
    • Item-Based CF: “Users who liked sneakers also liked boots.”

4.2 Content-Based Filtering

  • How it works: Recommends based on item attributes (e.g., Daraz’s “Recommended for You” uses product tags like “vegan,” “under ₹2,000”).
  • Advantage: Works even for new users (no history needed).

Comparison Table:

Method Pros Cons Example in Nepal
Collaborative High accuracy for popular items Cold-start problem Daraz’s “Frequently Bought Together”
Content-Based Works for new users Limited to known attributes Pathao’s “Riders Near You” (location-based)

5. Ubiquitous Commerce (U-commerce): Beyond Mobile

U-commerce extends e-commerce to anywhere, anytime access:

  • M-commerce: Mobile payments (eSewa, Khalti).
  • L-commerce: Location-based offers (e.g., Khalti’s “Nearby Stores” feature).
  • S-commerce: Social commerce (Facebook Marketplace, Instagram Shopping).
  • I-commerce: IoT-enabled commerce (e.g., Amazon Dash buttons).

Real-World Example: Pathao’s Omnichannel Integration

  • App: Riders book via mobile.
  • Website: Businesses manage schedules.
  • SMS: Confirmations sent to users.
  • Traffic API: Pathao’s backend syncs with NTC’s real-time traffic data to adjust routes.

6. Omnichannel E-commerce: Seamless Customer Experience

Omnichannel means unified inventory and customer data across all touchpoints. Example:

  • Daraz:
    • Online store → Physical warehouses → Delivery partners (NTC’s logistics).
    • Customer logs in via eSewa on app/website/desktop.

Why it works for Pathao:

  • Rider availability is real-time (syncs with app, SMS, and web dashboard).
  • Traffic delays auto-update via Google Maps API.

In the Real World

  1. eSewa’s Cryptography:

    • Uses RSA-2048 for digital signatures to verify transactions. When you pay for a Daraz order via eSewa, your device encrypts the payment details with eSewa’s public key, and the bank decrypts it using its private key—ensuring no third party can alter the data.
  2. Daraz’s Auction System:

    • During Diwali sales, Daraz runs reverse auctions with suppliers. Instead of buyers bidding up prices, suppliers compete to offer the lowest shipping cost for bulk orders, which Daraz then passes to customers as discounts.
  3. Pathao’s Ubiquitous Commerce:

    • The Pathao app uses geofencing (a U-commerce technique) to notify riders when they enter a high-demand zone (e.g., near Thapathali). The app also integrates with Ncell’s SMS alerts to confirm ride status, creating a seamless loop between digital and physical interactions.

Exam Tip

  • Focus on comparisons: Examiners love contrast questions (e.g., “How does collaborative filtering differ from content-based filtering?”). Use the table above as a template.
  • Apply to Nepal: Always tie examples to local platforms (eSewa, Daraz, NEPSE). For instance, when discussing omnichannel, explain how Khalti’s cash-on-delivery syncs with Daraz’s inventory.
  • Diagrams > Words: For payment flows or recommender systems, draw a sequence diagram (like the eSewa example above). Partial credit is often given for correct visuals.
  • Security is high-weight: Expect questions on PCI-DSS, SSL/TLS, or hash functions. Mention Ncell’s mobile wallet or NEPSE’s API security to stand out.
  • Auction types: Memorize the 4 types (forward, reverse, Dutch, English) and give a Nepal-specific example for each (e.g., NEPSE for forward, Daraz supplier deals for reverse).

Based on the TU BSc CSIT syllabus for E-commerce (CSC370), unit 2.

Discussion

Loading…