CCB12 Couchbase at The Hut Group

1,700 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,700
On SlideShare
0
From Embeds
0
Number of Embeds
391
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Welcome and thankyou for attending If you want to ask questions …Just a quick over viewTalk about a project we recently undertaken to update and streamline our checkoutSession title/Abstract- Couchbase at The Hut Group ­ In this talk Iwill discuss why we decided to go with Couchbase for our newcheckout web application; the factors we had to consider whendesigning the application to use Couchbase, specifically to storedata that is mutated by concurrent threads; How the developmentteam took to the new technology and how we implemented it in a Javaenvironment; what we are looking at using Couchbase for next! andmuch moreThe story of couchbase at the hut and how it came to be
  • 4000 concurrent sessions causes more than 4000 saves per minuet
  • Cost
  • Schale, cross data center
  • Performance-sizeing-infastructure-sub millisecond – replaceing session/server memory-ammount of gets, bulk opperations-performance testing the app not couchbase-what if it doesn’t perform or whit if it dosent whateverAvalibility-never had any downtime-fail over dealing with it your self – auto only one and off by default-The way its sharded and replicatedData storageGson, jacksonCode implimentationRepository pattern, aggrigate root, query object, connector, cas value? DTO?Repository - Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.Hard cache ejections.
  • Cas starts here
  • Cas/locking/ignoreDocuments borken down on next slideQuestion what do you do with the cas value? Unit of Work - Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
  • Lambda Architecture Batch layer, servicing layer and the speed layer
  • CCB12 Couchbase at The Hut Group

    1. 1. COUCHBASE AT THE HUT GROUPChris Woods – Architect @ The Hut Group
    2. 2. COUCHBASE AT THE HUT GROUPAboutAbout MeName: Chris WoodsRole: ArchitectContact: chris.woods@thehutgroup.com @chriswoods1983About The Hut GroupThe Hut Group is the UK’s leading multi-website online retailer withoperations in the womens fashion, health & beauty, entertainment and giftsmarket. The group has also firmly established itself in multiple internationalmarkets, with 35% of current sales coming from outside the UK.
    3. 3. COUCHBASE AT THE HUT GROUPBackground• Server bound: Whenever we deployed our existing application, all the customers currently on the site get kicked out of the ”checkout flow”, making it costly to release and consequently restricts when and how often you can release.• Not resilient: If the server you are bound to via sticky session goes down customer gets kicked out of checkout.• Costly to scale: very difficult to scale out across data centres.
    4. 4. COUCHBASE AT THE HUT GROUPBackground Ecommerce Platform Payment Delivery Options Processing Service Service SQL Server Backend
    5. 5. COUCHBASE AT THE HUT GROUPThe FutureRequirements• Be capable of supporting 4,000 concurrent sessions per min at a sustained rate during “peak”.• Should be able to release the system at any time of day and not affect the user experience.• Grows with the company - can be expanded to support 1,000 to 10,000 times more traffic.• Can be scaled across multiple data centres in multiple physical locations.• In case of failover should not cause downtime.• Improve customer dropout rates (single page).
    6. 6. COUCHBASE AT THE HUT GROUPThe Contenders
    7. 7. COUCHBASE AT THE HUT GROUPThe Contenders Low Latency Scalable Data Query-ableSQL Server No Hard Hard YesCouchbase 1.8 Yes Yes Yes NoCouchbase 2 Yes Yes Yes Yes Extendable Support SQL Server Hard Yes Couchbase 1.8 Yes Yes Couchbase 2 Yes Yes
    8. 8. COUCHBASE AT THE HUT GROUP Zero downtime migration optionsCouchbase 1.8 Migrate Couchbase 2.0 Features Added •Queryable • to input in data warehouse • Inter-data centre Replication • to support service continuality
    9. 9. COUCHBASE AT THE HUT GROUPNew Ecommerce platform Payment Processing Service Checkout Web Platform Delivery Options Service Web App Web API Account Service Couchbase Order Service Server Sql Server
    10. 10. COUCHBASE AT THE HUT GROUPKey Considerations• Performance.• Availability.• Data storage (serializing and de-serializing).• Segmenting data into buckets.• Code Implementation• Data consistency in an asynchronous, event-driven environment.• Changing document schema; • Versioning the document that is stored.
    11. 11. COUCHBASE AT THE HUT GROUP
    12. 12. COUCHBASE AT THE HUT GROUP 3. Checkout Queue Adaptor DeliveryWeb Platform 2. 1. Service Web Queue Adaptor App Channel Web Service API 4. 5.Couchbase Server
    13. 13. COUCHBASE AT THE HUT GROUP
    14. 14. COUCHBASE AT THE HUT GROUPCASQ) How do we keep the checkout session object (which is a serializedJSON document) consistent?• CAS• Divide and conquer ...• …And if that fails, compareNote: this is in Couchbase 1.8
    15. 15. COUCHBASE AT THE HUT GROUPDocument Storage Checkout Session: id:123 DeliveryOptions id:123 Shipping Restrictions Id:123 PaymentDetails Id:123
    16. 16. COUCHBASE AT THE HUT GROUPSuccess• Released on 2nd July and has taken over 400,000 orders• Very few CAS violations, which are gracefully handled when they do occur.
    17. 17. COUCHBASE AT THE HUT GROUPWhat next for Couchbase at The Hut Group• Local server cache replacement • Tomcat session • Product cache • Special Offer Cache• Big Data – Speed Layer!
    18. 18. COUCHBASE AT THE HUT GROUP ?Questions

    ×