reactive programming and rest/json for sql databases - microsoft sql server meetup, san francisco
DESCRIPTION
Presented by Val Huber, CTO of Espresso Logic, Inc, at the SQL Server Meetup in San Francisco, this talk discusses what is and how does Reactive Programming for Database reduce development time. It also discusses what is needed from RESTful/JSON API for SQL databases.TRANSCRIPT
Reactive Programming for Databases
by Val Huber ([email protected]) CTO, Espresso Logic, Inc.
April 9, 2014
Topics
• Introduction
• Reactive: what, usage…
• Reactive for Database, using REST
• Demo
– Connecting to a database: create/test default RESTful API
– Reactive Logic: Define, Test and Debug
• Complex Examples
• Q&A
Page 3
Espresso Logic, Inc. Overview
• History– Previous iterations of technology deployed at over 500 Fortune 1000
companies
– Current version in development for 3 years; launched V1.0 in November 2013
• Investors– Inventus Capital, a VC firm founded by Kanwal Rekhi focusing on early stage
firms
– Angel investors include: Anurag Jain (Perot Systems), Gokul Rajaram (Square), Lee Nackman (IBM), Raju Reddy (Hitachi), Saeed Amidi (Plug and Play)
• What we do – Backend-as-a-service to accelerate web and mobile application
– Offered as a service hosted on Amazon, Azure and on premise
• Distribution – Direct and via resellers / integrators
Reactive Programming
What is it, how is it being used
Maintain State (dependencies) over change
Time Statement Imperative Reactive
t0 A = B+C
t1 B = 2 * Recompute A
Define
Watch referenced values
React to changes
Common Uses
• GUI: Change Model, reflect on View (Microsoft active here)
• Spreadsheet– CellA = sum (ColumnB)
• Challenging Problem– Language integration – where’s the model?– Simpler as domain-specific: database… ?
Reacts to inserts, updates and deletes to B
Reactive, RESTand Database
Reactive DB: Conceptual
• Schema is the Object Model
• Add– Derivation Expressions, bound to columns– Validation Expressions, bound to tables
– Imperative Integration
Bal = sum (unpaid order totals)
Bal <= creditLimit
Reactive DB: Architecture
• Triggers
• App Server (but model is fuzzy)
• RESTful DB
TechnologyIndependent
• Mobile• SOA• Public API
RESTful DB
• Perfect start– Tables are resources (find from schema)– GET, POST, PUT and DELETE… – HTTP Arguments for filter, sort
• But not quite enough– Rich Resources (views “business objects”)
Reactive, RESTful
DB
Reactive DB• Schema as Model• Derivation / Validation Expressions
RESTful DB• Schema as Resources• Get, Post, Put, Delete
Golden Spike
• Rich Resources• JavaScript Integration• Security• Test & Debug
Our Take
Technology Evaluation
• Re-use– N clients 3 events 1 rule
• Conciseness– 5 lines of logic is hundreds of lines of triggers
• Maintainability– (Re) Ordering by dependency analysis
• Quality– Execution ensured (per middle tier)
• Performance– Well-known patterns ensured
Examples
• Simple
• Budget Rollup
• Payment Allocation
• Bill of Materials
Summary
• Reactive is like spreadsheet – Used appropriately it can offer you huge
savings in development cost
• JavaScript or some procedural language model needed to augment reactive
• RESTful API to your SQL data – Must have ability to customize, add security,
filtering, pagination, optimistic locking
• Check out video and more examples at http://www.espressologic.com
/resources/