SlideShare a Scribd company logo
Migration of a web service back-end from a relational to a
document-oriented database
Sebastian Drenckberg, Marius Politze
IT Center
RWTH Aachen University
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
2
Outline
• Motivation
• From Relational to Document oriented
• Validation of Migration
• Generalization
• Conclusion
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
3
Motivation: Infrastructure
• ~20 Software developers for Process Supporting Software
 4-5 Agile Teams
 Student Lifecycle, RWTHApp, eLearning, Quality Management, eScience
• Database server used for several “small” software projects
 Agile development process  regular changes
 Some are interactively used by 1000+ users
• Previously single instance of MS SQL Server 2008 R2
 No redundancy
 No scalability
 Nightly Backups
  Single Point of Failure
• Goal: more flexibility, scalability and redundancy
 Consider new database systems / technologies
 Limit migration effort / costs
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
4
Motivation: Case Study for Migration
• Audience Response System that is part of RWTHApp
 Targeting large audiences 500-1200 students
 Anonymous usage
• “Chat-like” 1:n communication during lectures
 Teacher – Student
 Teacher – all Students
• Multiple Message Types
 Images
 Polls
• Available via
 RWTHApp
 HTML5 Web Application
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
5
SQL Server: Relations
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
6
Language Integrated Query (LINQ)
• LINQ is a language extension to formulate queries on collection Classes like Lists
• LINQ to SQL
 Code generator to access relational databases
 Relations can be accessed like Lists
For example:
is (roughly) translated to:
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
7
Popularity of Document Oriented Databases
Source: https://db-engines.com/en/ranking
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
8
Document Oriented Databases / NoSQL
• Popularity is recently rising from niche to common use
• No predefined structure
 Holds Documents consisting of key-value-pairs
 Documents are organized in collections
• Common Formats:
 JavaScript Object Notation (JSON)
 Extended Markup Language (XML)
 (or dialects)
• Implementation specific query languages
{
"address": {
"street": "Seffenter Weg",
"no": 23,
"zip": 52074,
"city": "Aachen",
"country": "Germany"
}
}
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
9
MongoDB
• Published in 2009
• Connector library needed, available for many languages
 C# library: MongoDB.Driver
 Supports LINQ
• Multiple Collections per database process
 DB process relatively lightweight (~300MB Disk, ~100MB Memory)
 Allows DB process on Application servers
• Replication
 Master-Multi Slave
 Automatic Failover
 “Every server-VM is equal”
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
10
Estimation of Migration Effort
• Before
• After
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
11
Migration I: Replacing Code Generated By LINQ2SQL
• Replace generated classes by own code
 DB connection
 Serializable Types for stored Information
• Add explicitly typed methods for current application
• Generic connection class is reused in future
migrations
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
12
Generalization: 1:1 Relation
A B
1 1
A B
…
b: int / gguid
id: int / gguid
…
Association by reference
A B
…
b: B
…
Association by embedding
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
13
Generalization: 1:n Relation
A B
1 n
A B
1 1
I
1 n
A B
…
b: List<int>
id: int
…
Association by reference List
A B
…
b: List<B>
…
Association by embedding multiple documents
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
14
Generalization: n:m Relation
A B
n m
A B
1 1
I
n m
Association by embedding?
A B
id: int
b: List<int>
id: int
a: List<int>
Association by reference List
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
15
Validation Using Coded Tests
• Integration Level Tests
 API Level / Blackbox
 Compare actual and expected results
• Independent for different use cases
 Init and Cleanup always create the initial setup
 Coded tests are executed on check-in
• Tests remain untouched
 Results before and after can be compared
 Creates a check-list during migration
• Additional Unit Tests should be considered
Migration of a web service back-end from a relational to a document-oriented database
Sebastian Drenckberg, Marius Politze
EUNIS 2018 | 05. - 08. June 2018
16
Conclusion
• Migration successful
 Validation using automated integration tests
 Generalization guides future migrations
• Production system running since Aug 2017
 Clear documentation, steep learning curve
 Running without significant issues
• Major Version Update was successful
 Updating one server after another
 0 downtime
• More optimizations for MongoDB “native” applications
 Server side aggregation pipelines
 Map-Reduce
 Sharding
Thank you for your attention
Vielen Dank für Ihre Aufmerksamkeit

More Related Content

PPTX
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
PDF
San Francisco SharePoint Users Group - Mission Possible: Keeping SharePoint S...
PPTX
Best practices for managing and operating your SharePoint farms
PPTX
Upgrading from Full Trust Code to Add-In Model and SharePoint Framework
PDF
The business and end user guide into the new and modern SharePoint
PPTX
Distilled Power BI Updates for April 2016
PPTX
Efficient & effective data management for research projects : ILRI's Data Ma...
PDF
Rethinking Document Management in Office 365
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
San Francisco SharePoint Users Group - Mission Possible: Keeping SharePoint S...
Best practices for managing and operating your SharePoint farms
Upgrading from Full Trust Code to Add-In Model and SharePoint Framework
The business and end user guide into the new and modern SharePoint
Distilled Power BI Updates for April 2016
Efficient & effective data management for research projects : ILRI's Data Ma...
Rethinking Document Management in Office 365

What's hot (19)

PDF
Microsoft Teams Deep Dive
PPTX
Distilled Power BI Updates for April 2016
PPTX
Big Data Ingestion Using Hadoop - Capstone Presentation
PPTX
Simplifying SQL Server & SharePoint Migrations using PowerShell
PPTX
Let's do PowerBi - Together
PDF
20180901 - 9th Meeting - Power BI Module 0-1
PPTX
Alma, the Cloud & the Evolution of the Library Systems Department - Kevin Kidd
PDF
(ATS6-APP06) Accelrys LIMS and Accelrys ELN integration
PDF
Extending Teams & Groups
PDF
Microsoft Graph with ASP.NET MVC
PPTX
Use PowerShell superpower to tame your Office 365
PDF
ABench: Big Data Architecture Stack Benchmark
PDF
Microsoft Flow Advanced : tips, pitfalls, problems to be known before staring...
PPTX
DevOpsDays Amsterdam 2016 workshop
PDF
DBA Thomson reuters db
PDF
Getting into the flow building applications with reactive streams
PDF
[Sirius Day Eindhoven] Integrating Textual and Graphical Editing in the POOSL...
PPTX
Pracital application logging and monitoring
PPTX
Architecture Blue Print
Microsoft Teams Deep Dive
Distilled Power BI Updates for April 2016
Big Data Ingestion Using Hadoop - Capstone Presentation
Simplifying SQL Server & SharePoint Migrations using PowerShell
Let's do PowerBi - Together
20180901 - 9th Meeting - Power BI Module 0-1
Alma, the Cloud & the Evolution of the Library Systems Department - Kevin Kidd
(ATS6-APP06) Accelrys LIMS and Accelrys ELN integration
Extending Teams & Groups
Microsoft Graph with ASP.NET MVC
Use PowerShell superpower to tame your Office 365
ABench: Big Data Architecture Stack Benchmark
Microsoft Flow Advanced : tips, pitfalls, problems to be known before staring...
DevOpsDays Amsterdam 2016 workshop
DBA Thomson reuters db
Getting into the flow building applications with reactive streams
[Sirius Day Eindhoven] Integrating Textual and Graphical Editing in the POOSL...
Pracital application logging and monitoring
Architecture Blue Print
Ad

Similar to EUNIS 2018 - Migration of a web service back-end from a relational to a document-oriented database (20)

PDF
APNIC services and Policy Development Process | IDNOG 5
PPTX
Digital Business Transformation in the Streaming Era
PPTX
Webinar: The Slippery Slope of Migrating to SharePoint Online or On-Premise
PDF
Semantic Technologies for Enterprise Cloud Management
PDF
Introducing Neo4j
PDF
2014 12-16 biwug - cgi SharePoint Factory Framework
PPTX
IBM Connections 6 Component Pack
PDF
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
PDF
Content Migration for SharePoint 2013
PDF
Resource sync overview and real-world use cases for discovery, harvesting, an...
PDF
ResourceSync - Overview and Real-World Use Cases for Discovery, Harvesting, a...
PPTX
Big and fast data strategy 2017 jr
PDF
IN103 MongoDB What You Need To Know
PDF
MongoDB Breakfast Milan - Mainframe Offloading Strategies
PDF
AEC Hackathon -London (06-08/10/2017) Team Conenctivity- BIM and smart city c...
PPTX
Benchmarking of distributed linked data streaming systems
PPTX
Cloud Customer Architecture for Big Data and Analytics V2.0
PDF
Combinação de logs, métricas e rastreamentos para observabilidade unificada
PPTX
Unlocking Operational Intelligence from the Data Lake
PDF
Creating a Modern Data Architecture for Digital Transformation
APNIC services and Policy Development Process | IDNOG 5
Digital Business Transformation in the Streaming Era
Webinar: The Slippery Slope of Migrating to SharePoint Online or On-Premise
Semantic Technologies for Enterprise Cloud Management
Introducing Neo4j
2014 12-16 biwug - cgi SharePoint Factory Framework
IBM Connections 6 Component Pack
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
Content Migration for SharePoint 2013
Resource sync overview and real-world use cases for discovery, harvesting, an...
ResourceSync - Overview and Real-World Use Cases for Discovery, Harvesting, a...
Big and fast data strategy 2017 jr
IN103 MongoDB What You Need To Know
MongoDB Breakfast Milan - Mainframe Offloading Strategies
AEC Hackathon -London (06-08/10/2017) Team Conenctivity- BIM and smart city c...
Benchmarking of distributed linked data streaming systems
Cloud Customer Architecture for Big Data and Analytics V2.0
Combinação de logs, métricas e rastreamentos para observabilidade unificada
Unlocking Operational Intelligence from the Data Lake
Creating a Modern Data Architecture for Digital Transformation
Ad

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
L1 - Introduction to python Backend.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administraation Chapter 3
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Cost to Outsource Software Development in 2025
PPTX
history of c programming in notes for students .pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Wondershare Filmora 15 Crack With Activation Key [2025
L1 - Introduction to python Backend.pptx
CHAPTER 2 - PM Management and IT Context
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Which alternative to Crystal Reports is best for small or large businesses.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Design an Analysis of Algorithms I-SECS-1021-03
Odoo POS Development Services by CandidRoot Solutions
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administraation Chapter 3
Softaken Excel to vCard Converter Software.pdf
Cost to Outsource Software Development in 2025
history of c programming in notes for students .pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Why Generative AI is the Future of Content, Code & Creativity?
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

EUNIS 2018 - Migration of a web service back-end from a relational to a document-oriented database

  • 1. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze IT Center RWTH Aachen University
  • 2. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 2 Outline • Motivation • From Relational to Document oriented • Validation of Migration • Generalization • Conclusion
  • 3. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 3 Motivation: Infrastructure • ~20 Software developers for Process Supporting Software  4-5 Agile Teams  Student Lifecycle, RWTHApp, eLearning, Quality Management, eScience • Database server used for several “small” software projects  Agile development process  regular changes  Some are interactively used by 1000+ users • Previously single instance of MS SQL Server 2008 R2  No redundancy  No scalability  Nightly Backups   Single Point of Failure • Goal: more flexibility, scalability and redundancy  Consider new database systems / technologies  Limit migration effort / costs
  • 4. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 4 Motivation: Case Study for Migration • Audience Response System that is part of RWTHApp  Targeting large audiences 500-1200 students  Anonymous usage • “Chat-like” 1:n communication during lectures  Teacher – Student  Teacher – all Students • Multiple Message Types  Images  Polls • Available via  RWTHApp  HTML5 Web Application
  • 5. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 5 SQL Server: Relations
  • 6. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 6 Language Integrated Query (LINQ) • LINQ is a language extension to formulate queries on collection Classes like Lists • LINQ to SQL  Code generator to access relational databases  Relations can be accessed like Lists For example: is (roughly) translated to:
  • 7. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 7 Popularity of Document Oriented Databases Source: https://db-engines.com/en/ranking
  • 8. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 8 Document Oriented Databases / NoSQL • Popularity is recently rising from niche to common use • No predefined structure  Holds Documents consisting of key-value-pairs  Documents are organized in collections • Common Formats:  JavaScript Object Notation (JSON)  Extended Markup Language (XML)  (or dialects) • Implementation specific query languages { "address": { "street": "Seffenter Weg", "no": 23, "zip": 52074, "city": "Aachen", "country": "Germany" } }
  • 9. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 9 MongoDB • Published in 2009 • Connector library needed, available for many languages  C# library: MongoDB.Driver  Supports LINQ • Multiple Collections per database process  DB process relatively lightweight (~300MB Disk, ~100MB Memory)  Allows DB process on Application servers • Replication  Master-Multi Slave  Automatic Failover  “Every server-VM is equal”
  • 10. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 10 Estimation of Migration Effort • Before • After
  • 11. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 11 Migration I: Replacing Code Generated By LINQ2SQL • Replace generated classes by own code  DB connection  Serializable Types for stored Information • Add explicitly typed methods for current application • Generic connection class is reused in future migrations
  • 12. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 12 Generalization: 1:1 Relation A B 1 1 A B … b: int / gguid id: int / gguid … Association by reference A B … b: B … Association by embedding
  • 13. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 13 Generalization: 1:n Relation A B 1 n A B 1 1 I 1 n A B … b: List<int> id: int … Association by reference List A B … b: List<B> … Association by embedding multiple documents
  • 14. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 14 Generalization: n:m Relation A B n m A B 1 1 I n m Association by embedding? A B id: int b: List<int> id: int a: List<int> Association by reference List
  • 15. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 15 Validation Using Coded Tests • Integration Level Tests  API Level / Blackbox  Compare actual and expected results • Independent for different use cases  Init and Cleanup always create the initial setup  Coded tests are executed on check-in • Tests remain untouched  Results before and after can be compared  Creates a check-list during migration • Additional Unit Tests should be considered
  • 16. Migration of a web service back-end from a relational to a document-oriented database Sebastian Drenckberg, Marius Politze EUNIS 2018 | 05. - 08. June 2018 16 Conclusion • Migration successful  Validation using automated integration tests  Generalization guides future migrations • Production system running since Aug 2017  Clear documentation, steep learning curve  Running without significant issues • Major Version Update was successful  Updating one server after another  0 downtime • More optimizations for MongoDB “native” applications  Server side aggregation pipelines  Map-Reduce  Sharding
  • 17. Thank you for your attention Vielen Dank für Ihre Aufmerksamkeit

Editor's Notes

  • #4: Die Arbeit ist im Kontext…entstanden Bestehende AW: Audience Response System: Direktfeedback in der RWTHApp
  • #6: DirectFeedbackMessageTag: Tag für eine Nachricht DirectFeedbackTag: Tags, die im Channel möglich sind
  • #7: SQL: SQLConnection, query erstellen, ausführen, reader erstellen, reader auslesen
  • #9: NoSQL: Not only SQL
  • #10: Master-Multi Slave erklären Failover: Wechseln des ansprechbaren Servers aus unvorhersehbaren Gründen
  • #11: und
  • #12: MongoDBConnector: stellt Verbindung zur DB her DASDataConnector: enthält Zugriffe auf Collections; Hilfsobjekte; stellt Hilfsmethoden zur Verfügung, die DB-Op. Kapselt DASData: beinhaltet ein Objekt von DASDataConnector;
  • #13: Links ER, rechts „MongoDB“-Darstellung Einbetten des Dokumentes spart zusätzliches Dokument für NodeB
  • #14: Verknüpfung ebenfalls durch neues Attribut
  • #16: Blackbox: Testen auf Ergebnis und nicht intern korrekten Ablauf