SlideShare a Scribd company logo
1 of 34
Building a Common Notification 
Solution with MongoDB 
John Gao | September 16, 2014 
1 © 2014 Vertafore, Inc. and its subsidiaries. 
Steven Engelhart
Agenda 
1 About Vertafore 
2 Problem Statement 
3 Design and Implementation 
4 Product Demo 
© 2014 Vertafore, 2 Inc. and its subsidiaries.
The Company 
#1 software supplier to independent insurance 
44 years transforming insurance 
80 of the top 100 carriers use Vertafore 
96 of the top 100 agencies use Vertafore 
1,000 agencies adopted AMS360 in 2012 
20,0000 customers use Vertafore 
13,000,000 Producer Lifecycle Mgmt transactions 
50,000,000 real-time transactions 
© 2014 Vertafore, 3 Inc. and its subsidiaries.
Vertafore Solution Suite 
Agency Carrier MGA/Wholesaler 
Content and Business 
Process Management 
Business Intelligence 
Agency Management, 
Download and Real-time 
Benefits Management 
© 2014 Vertafore, 4 Inc. and its subsidiaries. 
Connectivity 
Content and Business 
Process Management 
© 2013 Vertafore, Inc. and its subsidiaries. 4 
Content and Business 
Process Management 
Business Intelligence Business Intelligence 
Agency Management, 
Download and Real-time 
Download and Real-time 
Policy Issuance Policy Issuance 
Producer Lifecycle 
Management 
Producer Lifecycle 
Management 
Producer Lifecycle 
Management 
Comparative Rating Rating Interfaces Rating Management 
Reference Libraries Reference Libraries Reference Libraries 
Producer Tools Producer Tools Producer Tools
Breaking the Mold 
• Need solutions to be re-usable 
• Breaking the traditional SQL solution development 
pattern 
• Freedom to choose the right technology to solve the 
problem 
© 2014 Vertafore, 5 Inc. and its subsidiaries.
Design Goals 
• Simple and Easy to User API 
• Performance and Scalability 
• Need to support both pull and push 
© 2014 Vertafore, 6 Inc. and its subsidiaries.
Design Decisions 
• “RESTful” web service using OData 
• MongoDB for database 
• RabbitMQ for queue to support mobile push 
© 2014 Vertafore, 7 Inc. and its subsidiaries.
Why MongoDB? 
• Performance and scalability 
• No object to relational model translation 
• Object model can be very flexible 
• Supports all major platforms 
• Excellent .NET and LINQ support 
© 2014 Vertafore, 8 Inc. and its subsidiaries.
Overall Architecture 
© 2014 Vertafore, 9 Inc. and its subsidiaries.
Object Model – NotificationMessage 
• Type – admin, user, … 
• Priority – normal, critical, … 
• Author 
• Publisher 
• Recipient 
… 
© 2014 Vertafore, 10 Inc. and its subsidiaries.
Object Model – UML Diagram 
© 2014 Vertafore, 11 Inc. and its subsidiaries.
MongoDB Document – NotificationMessage 
© 2014 Vertafore, 12 Inc. and its subsidiaries.
Message Service – Layered Diagram 
© 2014 Vertafore, 13 Inc. and its subsidiaries.
Odata Layer - Controller 
public class NotificationMessagesController : ODataController 
{ 
public IQueryable<NotificationMessage> 
Get(ODataQueryOptions<NotificationMessage> query); 
public async Task<NotificationMessage> Get([FromODataUri] 
string key); 
public async Task<IHttpActionResult> Post([FromBody] 
NotificationMessage message); 
public async Task<IHttpActionResult> Put([FromODataUri] 
string key, NotificationMessage entity); 
public async Task<IHttpActionResult> Patch([FromODataUri] 
string key, Delta<NotificationMessage> patch); 
} 
© 2014 Vertafore, 14 Inc. and its subsidiaries.
Domain Layer – Domain Services 
© 2014 Vertafore, 15 Inc. and its subsidiaries.
Data Layer - Interface 
public interface IRepository<T, U> 
{ 
T Get(Expression<Func<T, U>> keyExpression, U key); 
IQueryable<T> Get(); 
T Create(T entity); 
T Update(T entity); 
bool Delete(T entity); 
} 
© 2014 Vertafore, 16 Inc. and its subsidiaries.
Data Layer - Implementation 
public MongoRepository(MongoDatabase database, string 
collection) 
{ 
Collection = database.GetCollection<T>(collection); 
} 
public T Get(Expression<Func<T, U>> exp, U key) 
{ 
return Collection.FindOne(Query<T>.EQ(exp, key)); 
} 
public IQueryable<T> Get() 
{ 
return Collection.AsQueryable(); 
} 
© 2014 Vertafore, 17 Inc. and its subsidiaries.
How Are The Three Layers Linked? 
private void InitializeStructureMap(IQueryRules rules) 
{ 
DomainStructureMap.Map(container, 
(ConfigurationSection)ConfigurationManager.GetSection("Notificat 
ionCreatedEventQueue")); 
© 2014 Vertafore, 18 Inc. and its subsidiaries. 
DataStructureMap.Map(container, 
ConfigurationManager.ConnectionStrings["MongoDB"].ConnectionStri 
ng); 
}); 
}
Structure Map – Domain 
public static void Map(IRegistry container, 
ConfigurationSection notificationConfigurationSection) 
{ 
© 2014 Vertafore, 19 Inc. and its subsidiaries. 
; 
}
Structure Map – Data 
public static void Map(IRegistry container, string dataConnection) 
{ 
© 2014 Vertafore, 20 Inc. and its subsidiaries. 
(); 
container.For<IRepository<MessageHistory, string>>() 
.HybridHttpOrThreadLocalScoped() 
.Use(r => new MongoRepository<MessageHistory, 
string>(r.GetInstance<MongoDatabase>(), "MessageHistory")); 
}
Bson Class Map 
BsonClassMap.RegisterClassMap<NotificationMessage>(map => 
{ 
map.SetDiscriminator("NotificationMessage"); 
}); 
BsonClassMap.RegisterClassMap<UserRecipient>(map => 
{ 
}); 
// Other mappings omitted for clarity 
© 2014 Vertafore, 21 Inc. and its subsidiaries.
MongoDB Replica Set 
© 2014 Vertafore, 22 Inc. and its subsidiaries.
Usage Examples – Linq Queries 
NotificationMessages.OrderByDescending (nm => nm.CreatedAt) 
.Skip(100).Take(50); 
NotificationMessages.Where(n => n.Id == "54132e3bf11fbc138c8f7448"); 
NotificationMessages.Where(x => 
x.Summary.Contains("New opportunity")).Take(10); 
© 2014 Vertafore, 23 Inc. and its subsidiaries.
Usage Examples – Odata Queries 
https://ServiceEndpoint/NotificationMessages() 
?$orderby=CreatedAt desc&$skip=100&$top=50 
https://ServiceEndpoint/NotificationMessages('54132e3bf11fbc138c 
8f7448') 
https://ServiceEndpoint/NotificationMessages() 
?$filter=substringof('New opportunity',Summary)&$top=10 
© 2014 Vertafore, 24 Inc. and its subsidiaries.
Usage Examples – MongoDB Queries 
"op" : "query", 
"ns" : "NotificationService.Messages", 
"query" : { 
"$query" : { 
}, 
} 
}, 
© 2014 Vertafore, 25 Inc. and its subsidiaries.
Mobile Push Service 
• Mobile device registration service 
– Register mobile device 
– Odata web service 
– Registration stored in MongoDB 
• Windows service 
– Monitor queue message 
– Send message that has mobile destination to 
Apple or Google for actual delivery 
© 2014 Vertafore, 26 Inc. and its subsidiaries.
Device Registration – MongoDB Document 
{ 
"_id" : "54174aad92d00721d4ef7315", 
"AppId" : "SeattleDemo", 
"VendorId" : "PipelineManager - Agent", 
"CreatedDt" : ISODate("2014-09-15T20:23:08.747Z"), 
"ModifiedDt" : ISODate("2014-09-15T20:23:08.747Z"), 
"DeviceData" : { 
"Data" : null 
} 
} 
© 2014 Vertafore, 27 Inc. and its subsidiaries.
Mobile Push Service - Workflow 
© 2014 Vertafore, 28 Inc. and its subsidiaries.
Overall Dev Experience 
• What we liked 
– Very easy to setup 
– Great documentation and online resources 
– Great community support 
– No more mismatch of object to relational 
– Quick development cycle 
– Flexible schema works well 
© 2014 Vertafore, 29 Inc. and its subsidiaries.
Overall Dev Experience 
• Things that could have been better 
– 2.6 release felt to be rushed out. 
– No out of box encryption support 
– No MongoDB Management Service (MMS) on 
windows 
© 2014 Vertafore, 30 Inc. and its subsidiaries.
Operations Experience 
• Hosting team was able to ramp up quickly 
• Simple installation 
• Quick and intuitive deployment of packages 
• Easy to scale out 
© 2014 Vertafore, 31 Inc. and its subsidiaries.
Push Notification Demo 
© 2014 Vertafore, 32 Inc. and its subsidiaries.
© 2014 Vertafore, 33 Inc. and its subsidiaries. 
Questions
© 2014 Vertafore, 34 Inc. and its subsidiaries.

More Related Content

Similar to Building a Common Message Solution with MongoDB at Vertafore

IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docxIT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
vrickens
 

Similar to Building a Common Message Solution with MongoDB at Vertafore (20)

The Real-Time Communications Platform for the Internet of Things
The Real-Time Communications Platform for the Internet of ThingsThe Real-Time Communications Platform for the Internet of Things
The Real-Time Communications Platform for the Internet of Things
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Cross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE PredixCross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE Predix
 
How Data-Driven Continuous Intelligence Benefits Aid the Development and Mana...
How Data-Driven Continuous Intelligence Benefits Aid the Development and Mana...How Data-Driven Continuous Intelligence Benefits Aid the Development and Mana...
How Data-Driven Continuous Intelligence Benefits Aid the Development and Mana...
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
Real-Time Communications and the Industrial Internet of Things
 Real-Time Communications and the Industrial Internet of Things Real-Time Communications and the Industrial Internet of Things
Real-Time Communications and the Industrial Internet of Things
 
ZiniosEdge Company Overview
ZiniosEdge Company OverviewZiniosEdge Company Overview
ZiniosEdge Company Overview
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 
Ranadip Basak
Ranadip BasakRanadip Basak
Ranadip Basak
 
The Cloud Foundry Story
The Cloud Foundry StoryThe Cloud Foundry Story
The Cloud Foundry Story
 
Red Hat Mobile
Red Hat MobileRed Hat Mobile
Red Hat Mobile
 
Hitendra_Singh
Hitendra_SinghHitendra_Singh
Hitendra_Singh
 
Anypoint platform in a mobile-centric world
Anypoint platform in a mobile-centric worldAnypoint platform in a mobile-centric world
Anypoint platform in a mobile-centric world
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
 
The New Possible: How Platform-as-a-Service Changes the Game
 The New Possible: How Platform-as-a-Service Changes the Game The New Possible: How Platform-as-a-Service Changes the Game
The New Possible: How Platform-as-a-Service Changes the Game
 
Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service	Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service
 
Choosing the right mobile architecture
Choosing the right mobile architectureChoosing the right mobile architecture
Choosing the right mobile architecture
 
Cloud Migration - The Earlier You Instrument, The Faster You Go
Cloud Migration - The Earlier You Instrument, The Faster You GoCloud Migration - The Earlier You Instrument, The Faster You Go
Cloud Migration - The Earlier You Instrument, The Faster You Go
 
IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docxIT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
IT 8003 Cloud ComputingGroup Activity 1 SuperTAX Soft.docx
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
 

More from MongoDB

More from MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Building a Common Message Solution with MongoDB at Vertafore

  • 1. Building a Common Notification Solution with MongoDB John Gao | September 16, 2014 1 © 2014 Vertafore, Inc. and its subsidiaries. Steven Engelhart
  • 2. Agenda 1 About Vertafore 2 Problem Statement 3 Design and Implementation 4 Product Demo © 2014 Vertafore, 2 Inc. and its subsidiaries.
  • 3. The Company #1 software supplier to independent insurance 44 years transforming insurance 80 of the top 100 carriers use Vertafore 96 of the top 100 agencies use Vertafore 1,000 agencies adopted AMS360 in 2012 20,0000 customers use Vertafore 13,000,000 Producer Lifecycle Mgmt transactions 50,000,000 real-time transactions © 2014 Vertafore, 3 Inc. and its subsidiaries.
  • 4. Vertafore Solution Suite Agency Carrier MGA/Wholesaler Content and Business Process Management Business Intelligence Agency Management, Download and Real-time Benefits Management © 2014 Vertafore, 4 Inc. and its subsidiaries. Connectivity Content and Business Process Management © 2013 Vertafore, Inc. and its subsidiaries. 4 Content and Business Process Management Business Intelligence Business Intelligence Agency Management, Download and Real-time Download and Real-time Policy Issuance Policy Issuance Producer Lifecycle Management Producer Lifecycle Management Producer Lifecycle Management Comparative Rating Rating Interfaces Rating Management Reference Libraries Reference Libraries Reference Libraries Producer Tools Producer Tools Producer Tools
  • 5. Breaking the Mold • Need solutions to be re-usable • Breaking the traditional SQL solution development pattern • Freedom to choose the right technology to solve the problem © 2014 Vertafore, 5 Inc. and its subsidiaries.
  • 6. Design Goals • Simple and Easy to User API • Performance and Scalability • Need to support both pull and push © 2014 Vertafore, 6 Inc. and its subsidiaries.
  • 7. Design Decisions • “RESTful” web service using OData • MongoDB for database • RabbitMQ for queue to support mobile push © 2014 Vertafore, 7 Inc. and its subsidiaries.
  • 8. Why MongoDB? • Performance and scalability • No object to relational model translation • Object model can be very flexible • Supports all major platforms • Excellent .NET and LINQ support © 2014 Vertafore, 8 Inc. and its subsidiaries.
  • 9. Overall Architecture © 2014 Vertafore, 9 Inc. and its subsidiaries.
  • 10. Object Model – NotificationMessage • Type – admin, user, … • Priority – normal, critical, … • Author • Publisher • Recipient … © 2014 Vertafore, 10 Inc. and its subsidiaries.
  • 11. Object Model – UML Diagram © 2014 Vertafore, 11 Inc. and its subsidiaries.
  • 12. MongoDB Document – NotificationMessage © 2014 Vertafore, 12 Inc. and its subsidiaries.
  • 13. Message Service – Layered Diagram © 2014 Vertafore, 13 Inc. and its subsidiaries.
  • 14. Odata Layer - Controller public class NotificationMessagesController : ODataController { public IQueryable<NotificationMessage> Get(ODataQueryOptions<NotificationMessage> query); public async Task<NotificationMessage> Get([FromODataUri] string key); public async Task<IHttpActionResult> Post([FromBody] NotificationMessage message); public async Task<IHttpActionResult> Put([FromODataUri] string key, NotificationMessage entity); public async Task<IHttpActionResult> Patch([FromODataUri] string key, Delta<NotificationMessage> patch); } © 2014 Vertafore, 14 Inc. and its subsidiaries.
  • 15. Domain Layer – Domain Services © 2014 Vertafore, 15 Inc. and its subsidiaries.
  • 16. Data Layer - Interface public interface IRepository<T, U> { T Get(Expression<Func<T, U>> keyExpression, U key); IQueryable<T> Get(); T Create(T entity); T Update(T entity); bool Delete(T entity); } © 2014 Vertafore, 16 Inc. and its subsidiaries.
  • 17. Data Layer - Implementation public MongoRepository(MongoDatabase database, string collection) { Collection = database.GetCollection<T>(collection); } public T Get(Expression<Func<T, U>> exp, U key) { return Collection.FindOne(Query<T>.EQ(exp, key)); } public IQueryable<T> Get() { return Collection.AsQueryable(); } © 2014 Vertafore, 17 Inc. and its subsidiaries.
  • 18. How Are The Three Layers Linked? private void InitializeStructureMap(IQueryRules rules) { DomainStructureMap.Map(container, (ConfigurationSection)ConfigurationManager.GetSection("Notificat ionCreatedEventQueue")); © 2014 Vertafore, 18 Inc. and its subsidiaries. DataStructureMap.Map(container, ConfigurationManager.ConnectionStrings["MongoDB"].ConnectionStri ng); }); }
  • 19. Structure Map – Domain public static void Map(IRegistry container, ConfigurationSection notificationConfigurationSection) { © 2014 Vertafore, 19 Inc. and its subsidiaries. ; }
  • 20. Structure Map – Data public static void Map(IRegistry container, string dataConnection) { © 2014 Vertafore, 20 Inc. and its subsidiaries. (); container.For<IRepository<MessageHistory, string>>() .HybridHttpOrThreadLocalScoped() .Use(r => new MongoRepository<MessageHistory, string>(r.GetInstance<MongoDatabase>(), "MessageHistory")); }
  • 21. Bson Class Map BsonClassMap.RegisterClassMap<NotificationMessage>(map => { map.SetDiscriminator("NotificationMessage"); }); BsonClassMap.RegisterClassMap<UserRecipient>(map => { }); // Other mappings omitted for clarity © 2014 Vertafore, 21 Inc. and its subsidiaries.
  • 22. MongoDB Replica Set © 2014 Vertafore, 22 Inc. and its subsidiaries.
  • 23. Usage Examples – Linq Queries NotificationMessages.OrderByDescending (nm => nm.CreatedAt) .Skip(100).Take(50); NotificationMessages.Where(n => n.Id == "54132e3bf11fbc138c8f7448"); NotificationMessages.Where(x => x.Summary.Contains("New opportunity")).Take(10); © 2014 Vertafore, 23 Inc. and its subsidiaries.
  • 24. Usage Examples – Odata Queries https://ServiceEndpoint/NotificationMessages() ?$orderby=CreatedAt desc&$skip=100&$top=50 https://ServiceEndpoint/NotificationMessages('54132e3bf11fbc138c 8f7448') https://ServiceEndpoint/NotificationMessages() ?$filter=substringof('New opportunity',Summary)&$top=10 © 2014 Vertafore, 24 Inc. and its subsidiaries.
  • 25. Usage Examples – MongoDB Queries "op" : "query", "ns" : "NotificationService.Messages", "query" : { "$query" : { }, } }, © 2014 Vertafore, 25 Inc. and its subsidiaries.
  • 26. Mobile Push Service • Mobile device registration service – Register mobile device – Odata web service – Registration stored in MongoDB • Windows service – Monitor queue message – Send message that has mobile destination to Apple or Google for actual delivery © 2014 Vertafore, 26 Inc. and its subsidiaries.
  • 27. Device Registration – MongoDB Document { "_id" : "54174aad92d00721d4ef7315", "AppId" : "SeattleDemo", "VendorId" : "PipelineManager - Agent", "CreatedDt" : ISODate("2014-09-15T20:23:08.747Z"), "ModifiedDt" : ISODate("2014-09-15T20:23:08.747Z"), "DeviceData" : { "Data" : null } } © 2014 Vertafore, 27 Inc. and its subsidiaries.
  • 28. Mobile Push Service - Workflow © 2014 Vertafore, 28 Inc. and its subsidiaries.
  • 29. Overall Dev Experience • What we liked – Very easy to setup – Great documentation and online resources – Great community support – No more mismatch of object to relational – Quick development cycle – Flexible schema works well © 2014 Vertafore, 29 Inc. and its subsidiaries.
  • 30. Overall Dev Experience • Things that could have been better – 2.6 release felt to be rushed out. – No out of box encryption support – No MongoDB Management Service (MMS) on windows © 2014 Vertafore, 30 Inc. and its subsidiaries.
  • 31. Operations Experience • Hosting team was able to ramp up quickly • Simple installation • Quick and intuitive deployment of packages • Easy to scale out © 2014 Vertafore, 31 Inc. and its subsidiaries.
  • 32. Push Notification Demo © 2014 Vertafore, 32 Inc. and its subsidiaries.
  • 33. © 2014 Vertafore, 33 Inc. and its subsidiaries. Questions
  • 34. © 2014 Vertafore, 34 Inc. and its subsidiaries.

Editor's Notes

  1. No longer can have product specific solutions Vertafore is a traditional .NET and SQL To choosing the right technology to solve the problem
  2. MongoDB in our bench tests was able to prove that we could get the performance required for our messaging needs The object model is the same as what is persisted in the local storage making development easier to understand and implement We use many different platforms and MongoDB support all our requirements including Java, Ruby, and of course Windows Our web services are build using these technologies and we did not have to make any major changes to use MongoDB
  3. We will demo this at the end of the talk Manaualge portal create message for a particular product when an user then logs into the product, the message will be retrieved and displayed Message created automatically as part of a workflow An user creates an activity and assigns to a different user. When the activity is created, the system will automatically creates an notification message This notification message can be pushed to proper destination like mobile device
  4. Mention that this is the “RESTful” web service implemented with odata using webapi Under API layer, talk about Dependency Injection API layer Controller Object Model Domain layer Classes Business logic Data Access layer Repository pattern MongoDB class map
  5. Repository Pattern
  6. Through interface, actual implementation is linked using dependency injection with structuremap Summary of the layered structure and intro to the next section
  7. Summary of layered diagram and transition to next section of usage examples
  8. Either an overall architecture or list of key components
  9. Many times Vertafore development selects technologies to use that are a challenge for our hosting teams to support. MongoDB was simple to train on and easy to deploy