When Agilysys, a leading provider of software solutions for the hospitality industry, decided to architect the next generation platform for their software to unify lines of business it choose MongoDB as the data store at the heart of the system. The Agilysys suite of hospitality products spans lodging and food & beverage; providing solutions for point of sale, property management, workforce management, and inventory and procurement, perfect for use with the flexible JSON document model in MongoDB. Agilysys solutions now use a single store with related data from otherwise disconnected applications, allowing each application and line of business to operate independently. Simultaneously, the Agilysys rGuest suite of hospitality products has the capability to correlate and analyze patterns and behavior of guests across systems to improve their experience when staying in property.
2. TECHNOLOGY | INNOVATION | SOLUTIONS
Premier Hospitality Software Provider
• Nasdaq: AGYS
• Agilysys is a leading pure-play provider of software-enabled
solutions for the hospitality industry
• Offering includes a full suite of hospitality products,
including point-of-sale (POS) and property
management systems (PMS)
• Base of 3,000+ customers with 95% retention rate
• 490+ employees world wide
• Engineering headquarters in Bellevue WA
with 75 engineers; growing to 100+
• Aggressively investing in next generation solutions
3. TECHNOLOGY | INNOVATION | SOLUTIONS
Guest Lifecycle Driving Vision
Customer Lifecycle
Discover
Reserve
Arrive
Suggest
Pay
Order
Experience
Analyze
Procure
Staff
Market
Current Offering Future Offering
Pre-Visit
Reserve
Discover
Book
Staff
Procure
BACK OFFICE RESTAURANT SPA
Analyze Procure Order Pay
Staff Staff Order Pay
Suggest
Analyze Procure
Order Pay Staff Order
Order Pay
Reserve
Arrive Experience
Arrive Experience
Suggest
Suggest
Pay
Market
BACK OFFICE FRONT DESK CASINO
4. Hospitality Technology Drives the Guest Experience
TECHNOLOGY | INNOVATION | SOLUTIONS
Integrated Guest Experience
Point-of-Sale
Property
Management
Inventory and
Procurement
Workforce
Management
Next Gen Tenets
SaaS
delivery
Multi
tenant &
High
density
Common
platform
Native
Product
Integration
Centralized
data store
Technology Stack
Linux
Java/Spring
Scala
MongoDB
Apache CXF
OptaPlanner
Drools
5. Why MongoDB – the Business view
TECHNOLOGY | INNOVATION | SOLUTIONS
The Business Problem • Building a Platform
• Requirements coming at different points in the lifecycle
• Schema less approach better enables change over ti
Flexibility • Licensing
• Deployment – on premise, cloud, appliance
• Supported with our standard devops toolset – ansible
Distributed
architecture
• Hybrid – Cloud offering + On Site Appliance
• Geographically dispersed
• Scale
6. Why MongoDB – the Technical View
TECHNOLOGY | INNOVATION | SOLUTIONS
• Document based repository
• The document paradigm fits well with the logical aggregation of our
modular components
• Great integration between user interface and services
• JSON is a great data interchange format
• For services that don't have business logic allows us to go directly
from the backend to the front end with minimal time spent converting
into intermediate objects
• De-normalization of data allows us to group relevant information in
document that require little manipulation
• High Performance and High Availability
• Replica sets and automatic failover
• Scalability
• Sharding provide easy way to scale data load
7. TECHNOLOGY | INNOVATION | SOLUTIONS
The simple case
• Using Spring Data Framework to write to MongoDB
• 1 Class = 1 document
• MongoTemplate is the Spring wrapper to the Mongo Java driver
• Awesome Helper Classes
• Aggregation, Criteria, Query, Update
• Lots of pre-build repositories implementations
• CRUD Repositories, PagingAndSortingRepository, …
• Annotations to decorate your class
• Indexed, Field, Value, Id, DBRef,…
• Lifecycle management
• Automatic Query Builder
8. The simple case - 1 Class = 1 Document
TECHNOLOGY | INNOVATION | SOLUTIONS
9. The simple case - 1 Class = 1 Document
TECHNOLOGY | INNOVATION | SOLUTIONS
10. The simple case - 1 Class = 1 Document
TECHNOLOGY | INNOVATION | SOLUTIONS
11. The simple case - 1 Class = 1 Document
TECHNOLOGY | INNOVATION | SOLUTIONS
12. The simple case - 1 Class = 1 Document
TECHNOLOGY | INNOVATION | SOLUTIONS
18. TECHNOLOGY | INNOVATION | SOLUTIONS
Agilysys Data Access Layer
• Extended Spring Data MongoTemplate
• added methods to deal with updates to arrays
• wrapped multiple calls to the database into a single atomic method
• Helper functions to map Model to Domain
• Most calls to the database show a pattern
• Query to find the document with the data
• Morph the document and transform to match the domain object
• Map the resulting JSON back to the appropriate Class
• Use JSONPath to find values in subDocuments
19. TECHNOLOGY | INNOVATION | SOLUTIONS
Lesson Learned
• Understanding the pattern for data access is very important
• Look at your data and don't think about it in terms of
relations, de-normalization and duplication are not as bad of
an issue as generally thought
• In the flexible document model the hardest objects to deal
with are arrays, at least for now, use them carefully
• TextSearch is not yet strong enough for flexible documents,
JSONPath can help
• For the cases where a data redesign was not enough to
ensure that all the atomic elements of an update are in the
same collection, then a strategy like 2 phase commit and
application managed states are necessary. Think hard about
the problem before deciding on a document design
Customers served – msft; boeing; disney; rccl;
Customers
Stability
Scale
High transaction volumes
Markets served
Casino
Hotels & Resorts
Cruise
Higher Education
Foodservice management
Foodservice – microsoft, boeing,
Restaurants
Sports & Entertainment
Our vision for hospitality analytics sees your Agilysys systems as a suite of hospitality-focused solutions that collect critical information about the integrated experience your guests have of their experience with your properties. It’s all about centralizing data in an easy-to-use service so that the critical insight you need to optimize your business is always available and at your fingertips.
We started with Spring Data Mongo template and added our methods
Most query show a pattern
JSONPath is a great library to find data in subDocuments
Patterns for Data Access
De-normalization and duplication is ok
Be careful with arrays…. Sometime an array can be turn into a list of objects using the ID as the key
2 phase commit can be used in cases where you need to touch multiple documents, but before going there you should think hard about the document design
Patterns for Data Access
De-normalization and duplication is ok
Be careful with arrays…. Sometime an array can be turn into a list of objects using the ID as the key
2 phase commit can be used in cases where you need to touch multiple documents, but before going there you should think hard about the document design