Webinar slides. Describes how you create a backend application, in the cloud or on premise, that join data from MongoDb and SQL databases with a single RESTful API.
3. Agenda
• Espresso Logic
• SQL vs Mongo concepts & use cases
• Building a secure REST Integration Server
• Blending MongoDB with SQL
• Q&A
3
4. Espresso Logic
Declarative development for data-intensive apps
• RESTful API
• Reactive programming and JavaScript for logic
• Fine grain role-based security
• Application lifecycle facilities
7. SQL vs MongoDB Concepts
SQL Terms/concepts MongoDB Terms/concepts
DATABASE DATABASE
TABLE COLLECTION
ROW DOCUMENT OR BSON DOCUMENT
COLUMN FIELD
INDEX INDEX
TABLE JOINS EMBEDDED DOCUMENTS AND
LINKING
PRIMARY KEY PRIMARY KEY
TRANSACTIONS
BEGIN, COMMIT/ROLLBACK
NA
SCHEMA NA
8. Language Syntax is different
8
SQL Terms, Function, Concepts MongoDB Aggregation Operators
WHERE $match
GROUP BY $group
HAVING $match
SELECT $project
ORDER BY $sort
LIMIT $limit
SUM $sum
COUNT $count
JOIN No direct support
9. Use Cases for MongoDB & SQL
Drivers: Scale, Size, Cost Drivers: ACID, Reporting, Familiarity
MongoDB
– Big Data – Business
Intelligence
– New Mobile Apps (high
volume reads)
– Logs and Web events
– Product and Image catalogs
– Content Management
SQL Database
– Financial and Accounting
– Legacy Business Applications
– Anything that involves $$$
10. Blending MongoDB and SQL
SQL and MongoDB
– Financial and Sales transactions with archived history
– Account and Payment Processing
– Shopping Carts and Order Entry
How do we do this?
11. We need a RESTful Server
http://eval.espressologic.com/rest/sample/demo/v1/
Multiple Data Sources
Endpoints:
/customer/{id}
/employee/{id}
/customerWithOrders
/product/{id}
{
“@metadata": {
"checksum": "A:6c253d56830572ea",
},
"name": "Alpha and Sons",
"balance": 0,
"credit_limit": 9000
}
…. so you need to build a REST Server
12. Building a secure REST Integration Server
Apache Tomcat
Hibernate (JPA)
Entity Framework/WCF
JDBC Driver
Jersey/Jackson Logging
Library (log4J)
Web Hosting
Servlet API
Identity Security services
JavaScript engine
Configuration Properties
User & roles definitions,
SQL and NoSQL Server connections
Declarative (Reactive) Rules
Role-based Access Control
Schema ORM Model
Security tokens
REST API definitions
Event Code
metadata
Now we need to host this…
17. Step 2- Creating REST endpoints
1. Name a new resource
2. Specify the SQL table
3. Add Mongo sub-documents
18. Step 3- Blending MongoDB with SQL
Point and Click
1. Select Parent SQL
2. Add Sub Document
3. Enter MongoDB Server,
database, and collection
4. Specify ‘join’
Test in REST Lab
21. Step 4 – Customize your API
• Alias Attributes
(rename)
• Change format
• Select/Project columns
to include
• Add new virtual
columns (Row Event)
• Filter/Sort
• Limit/Offset (paging)
23. What’s Next
• Business logic via reactive programming & JavaScript
• Adding authentication to your new REST Server
• Setting up users and roles
• Column and row level security
24. Summary
• Applications today need to support multiple databases
• Building a Rest Integration Server
• With Espresso, need just four simple steps
to join Mongo and SQL in a single REST API
– Connect to multiple databases
– Create new REST endpoints
– 'Join' Mongo and SQL with point-and-click
– Test the REST API
25. Next steps
• Webinar next week
From specs to an app: 10X faster with reactive programming
• Sign up for a free trial – Build a proof of concept with your data
Let us help you connect to your data
26. Thank You
Questions????
www.espressologic.com
Technical: tyler@espressologic.com
Business: ron@espressologic.com
Editor's Notes
New Company with a long history of delivering enterprise business applications
Introduction of topic, company, and people
Long history of Logic on different platforms -VB/Stored Procs, CORBA, J2EE, Hibernate, REST
Shown JSON, XML, SQL TDS, and ODATA – many formats and translations to a single REST JSON API
Many similarities and a few differences – NO SCHEMA & No Transactions are big ones
Language syntax differences – pipeline (programmer does the order of operations in MongoDB)
REST is simply and easy to consume (hide abstraction). Great for Mobile apps and for public consumption of information (see. Healthcare.gov) -- Need to be a REST Server
A lot to learn and a lot to build (left side) then you need to figure out where and how to maintain and store the meta data. This is before you pick your Mobile front-end
Clock/race car
A Complete stack with a UI to edit and manage every aspect of building and delivery of RESTful API’s connect to SQL and MongoDB (as well as any backend service)
Demo starts here
Point and Click, Alias and Format columns, filters, sorts (Live Demo) – No Jagging
Live Demo
Select any table, view, stored procedure, or user-defined resource - Live Demo
Instant documentation using Swagger Spec
Security, Business Logic
Connect, Create resources, test (mongo and sql) in single REST
Architecture
REST Resources
Data Integration
Security
Logic Tutorial
Live Browser (Instant View UI)