• Like
A highly-scalable Travel Portal with GigaSpaces XAP and MongoDB
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

A highly-scalable Travel Portal with GigaSpaces XAP and MongoDB

  • 255 views
Published

How a highly scalable and flexible platform was developed for a travel start-up utilising GigaSpaces XAP and MongoDB. The presentation will cover why and how the technologies were used, the benefits …

How a highly scalable and flexible platform was developed for a travel start-up utilising GigaSpaces XAP and MongoDB. The presentation will cover why and how the technologies were used, the benefits of these technologies, the challenges faced and the lessons learned during the journey.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
255
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 08 April 2014 Gigaspace XAP and MongoDB Alex Brdar Principal Technical Architect @ Razorfish, London © 2010 Razorfish
  • 2. Overview - Project Background - Why GigaSpaces XAP 9.6 and MongoDB 2.4 - Key features of MongoDB which drove its selection - How we used MongoDB in conjunction with GigaSpaces XAP - Issues encountered during development - Conclusions and Benefits - Questions
  • 3. Project Background - A travel start-up with first round of investment secured - Visions to disrupt travel sector - Launch within 6-9 months with Hotel bookings - Rapid expansion to all other aspects of travel i.e. Flights, Cruises etc. - Direct bookings with boutique properties - 600k+ properties in Europe alone - Provide property management services
  • 4. Why GigaSpaces with MongoDB? - Solution had to be flexible and aid swift prototyping - Scalable platform to cope with traffic peaks driven by viral marketing - High availability whilst supporting rapid change capability - Handle future growth and capability changes without changing architecture - Collection of user/behavioural data to drive future functionality - Well suited for AWS cloud deployments
  • 5. Why MongoDB vs RDBMS? - Avoid constraints of Object-Relational mapping issues - Why MongoDB over other NoSQL offerings: - Support for geospatial indexing - Ability to scale for read and writes i.e. Replica Sets and Sharding - Document based storage (JSON) - SQL-like features makes adoption easier for developers - Good fit for collecting unstructured data - Ability to add and configure non-Primary members for specific purposes e.g. Hidden, Arbiter members
  • 6. Solution Overview Availability Zone 1 Availability Zone 2 GSC AWS InstanceAWS Instance GigaSpaces XAP 9.6 - Application GSC MongoD Primary AWS Instance MongoD Second. MongoD Second. GSC 3 member replica set – 1 Primary, 2 Secondary (All Voting members) Mirror Bulk Synch-Replication Asynch-Replication InitialDataLoad Events PU Events PU Insert ‘Events’ Primary Back-Up
  • 7. GigaSpaces Mirror Service - For Project, RF built own integration – GigaSpaces 9.7 does support full mirror persistency for MongoDB - All application data was held in the ‘Space’ i.e. ALL IN CACHE, for performance - Space persistence achieved by implementing SpaceDataSource and SpaceSynchronizationEndpoint classes - Data is loaded into Space during initialization (SpaceDataSource) - Subsequent data access is via the Space - Data synch operations for write/delete/update implemented in SpaceSynchronizationEndpoint
  • 8. GigaSpaces Mirror Service GSC User Primary Hotel Mongo Replica Set GSC Mirror Mongo Collections User { {title, fname, sname ..},{}.. } Hotel { id, name, longitude, latitude..}.{}..}, Etc. User Hotel Hotel
  • 9. Challenges implementing Mirror Service - Certain data-types not supported by Mongo Java Driver e.g. BigDecimal, Enums - Solution: Wrapped these attributes to a String representation before writing to MongoDB and converted back during initialisation - Performance issues during writes caused by MongoDB locking approach - Solution: Optimised writes by batching updates to the same Collection - Javascript modulus issue caused data to be loaded into a different GS partition - Solution: Ensure routing IDs were always positive values
  • 10. Conclusions/Summary - Easy for developers to set-up full stack locally aiding rapid development and prototyping - Architecture was able to cope with rapidly changing requirements throughout development process with minimal impact - Highly scalable platform - Highly resilient at app and data tiers - Effective MongoDB out-of-the-box monitoring tools mongostat and mongotop