Your SlideShare is downloading. ×
You know what iMEAN? Using MEAN stack for application dev on Informix
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

You know what iMEAN? Using MEAN stack for application dev on Informix

620
views

Published on

You know what iMEAN? Using MEAN stack for application dev on Informix. MongoDB, ExpressJS, AngularJS, NodeJS combine to form a MEAN stack for quick appdev. iMEAN is using the same stack to develop …

You know what iMEAN? Using MEAN stack for application dev on Informix. MongoDB, ExpressJS, AngularJS, NodeJS combine to form a MEAN stack for quick appdev. iMEAN is using the same stack to develop applications on Informix.

Published in: Software, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
620
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Knowwhat iMEAN? DevelopingInformixapplications on MEANstack. Keshav Murthy Architect, Informix SQL, NoSQL rkeshav@us.ibm.com 1
  • 2. Agenda • NoSQL – Quick Overview • Why MEAN stack? • What is MEAN stack? • Products and dependencies of MEAN stack. • What’s Informix got to do with MEAN stack. • Know what iMEAN?
  • 3. HTML Javascript JSON CGI, Java PhP, Ruby Java SQL HTML Javascript JSON Javascript JSON Javascript JSON Complete Application 60’s 70’s – 80’s Client Application Database Server 90’s Web Browser Web Server Database Server 90’s – 00’s Web Browser Web Server Application Server Database Server 10’s Web Browser NodeJS + ExpressJS Database Server
  • 4.  Applications must support mobile  Interoperate with modern applications with agility  Enterprise infrastructure  Ability to scale to big data  Commodity hardware and software  Use case are driving big data  Data base layer meets web app requirements  Strategy: more interactions with customers  Systems of engagement needed!  71% CIOs see move toward social/digital collaboration  New class of applications are based on NoSQL Global C-suite Study, http://www-935.ibm.com/services/us/en/c-suite/csuitestudy2013/ Explosion of mobile devices Business TrendsDrivingNoSQL Adoption
  • 5. 6 SQL {NoSQL:JSON} Define Schema first Write the program first Relational Key-value, Document, column family, graph and text Changing schema is hard Assumes dynamic schema Scale-up Scale-out ACID consistency BASE consistency Transactions No Transactions SQL Proprietary API; Sometimes has the “spirit” of SQL
  • 6. Martin Fowler says: “aggregate-oriented” What you're most likely to access as a unit. Key Value Store  Couchbase  Riak  Citrusleaf  Redis  BerkeleyDB  Membrain  ... Document  MongoDB  CouchDB  RavenDB  Couchbase  ... Graph  OrientDB  DEX  Neo4j  GraphBase  ... Column  HBase  Hypertable  Cassandra  ... NoSQL Landscape Text  Lucene  Solr  Excalibur
  • 7. Informix NoSQL Apps on Informix • New Listener supports MongoDB drivers • Use the same driver for Informix & MongoDB MongoDB native Client MongoDB web browser Mobile Applications MongoDB Wire Protocol InformixMongoDB driver 8 Informix
  • 8. ApplicationDevelopment Tools The MEAN Stack
  • 9. Basic Translation Terms/Concepts 10 Mongo/NoSQL Terms Traditional SQL Terms Database Database Collection Table Document Row Field Column Index Index {"name":"John","age":21, state:”CA”} {"name":"Tim","age":28, Provence: “BC”} {"name":"Scott","age":30, country: “UK”, status:1} Name Age John 21 Tim 28 Scott 30 Collection Document Key Value Table Row
  • 10. InformixJSON Store Benefits • Row locking on the individual JSON document • Large documents, up to 2GB maximum size • Ability to compress documents • Ability to intelligently cache commonly used documents • Use existing storage options and management tools. 11
  • 11. •Supports B-Tree indexes on any key-value pairs. •Typed indices could be on simple basic type (int, decimal,) •Type-less indices could be created on BSON and use BSON type comparison •Translate ensureIndex() to CREATE INDEX •Translate dropIndex() to DROP INDEX Indexing 12 Mongo Operation SQL Operation db.customers.ensureIndex( {orderDate:1, zip:-1}) CREATE INDEX IF NOT EXISTS v_customer_2 ON customer (bson_extract(data,‘orderDate') ASC, bson_extract(data,‘zip') DESC) USING BSON db.customers.ensureIndex( {orderDate:1},{unique:true}) CREATE UNIQUE INDEX IF NOT EXISTS v_customer_3 ON customer (bson_extract(data,'c1') ASC USING BSON
  • 12. 13 Explosion of mobile devices – gaming and social apps Advertising: serving ads and real-time bidding Social networking, online communities E-commerce, social commerce Machine data and real-time operational decisions Smart Devices Internet of Data, really Internet of Things SQL SQL, {JSON}, Spatial {JSON}, TimeSeries SQL, {JSON} Simple, {JSON}, Timeseries SQL, {JSON}
  • 13. Hybrid Data Access: relational tables & JSON Collections Relational Table JSON Collections SQL API Standard ODBC, JDBC, .NET, OData, etc. Language SQL. MongoDB API (NoSQL) Mongo APIs for Java, Javascript, C++, C#, etc. Direct SQL Access. Dynamic Views Row types Mongo APIs for Java, Javascript, C++, C#, etc.
  • 14. Data Management:devicesto Cloud Enterprise replication + Flexible Grid App Server JDBC App Server Mongo Driver Listener Informix/1 Primary Informix/1 SDS/HDR Informix/1 RSS Informix/2 Primary Informix/2 SDS/HDR Informix/2 RSS Informix/3 Primary Informix/3 SDS/HDR Informix/3 RSS Informix/4 Primary Informix/4 SDS/HDR Informix/4 RSS Informix/5 Primary Informix/5 SDS/HDR Informix/5 RSS Informix/6 Primary Informix/6 SDS/HDR Informix/6 RSS Mongo API Node.JS Express.JS AngularJS REST APIs NoSQL SQLCloud Informix warehouse Accelerator
  • 15. Informix:All Together Now! 16 SQL Tables JSON Collections TimeSeries MQ Series SQL APIs JDBC, ODBC Informix IWA – BLU ACCELERATION GENBSON: SQL to {BSON} MongoDB Drivers TEXT SEARCH SPATIAL TIME SERIES {BSON}
  • 16. Mongo Application IBM Wire Listener IDXs Logs Enterprise replication + Flexible Grid + Sharding Distributed Queries Database Tables Tables IDXs Relational Tables JSON Collections SELECT bson_get(bson, ‘{}’) FROM customer WHERE bson_value_lvarchar(bson,‘state’)=“MO” db.customer.find({state:”MO”}) db.partners.find({state:”CA”}) SELECT * FROM partners WHERE state=“CA” Customer partners JSON JSON Access RelationalAccess JSON MongoAPIAccessingNoSQL & Relational Data
  • 17. Tables JDBC connections IDXs Logs Enterprise replication + Flexible Grid Distributed Queries Database Tables Tables IDXs Relational Tables JSON Collections SELECT bson.customer::JSON,bson.state::lvarchar FROM customer WHERE bson.state::lvarchar = “MO” Select * from patners where state = “CA”; Customer partners Access RelationalAccess JSON SQL Applications SQL AccessingNoSQL & Relational Data SQL TypesSQL Types
  • 18. Whatis MEAN stack?
  • 19. WhyMEANstack? Ideally, a web-dev stack should help you: • Prototype. Build a usable product fast • Test. Automate testing; Continuous integration • Adapt. Iterate on feedback • Scale. Utilize server resources efficiently
  • 20. WhyMEANstack? Ideally, a web-dev stack should help you • Write in one language: JavaScript • With MongoDB and Mongoose, easy for data handling • With NodeJS, simply write callback code – No need to manage any threads or syncronization • ExpressJS framework • AngularJS – dynamic client side templates
  • 21. Same Language onthe stack {“_id”:ObjectId(“839abcd82729387839abcd82729388”, “name”:”Joe”, zip:84724, status:”A”} {“_id”:ObjectId(“839abcd82729387839abcd82729388”, “name”:”Joe”, zip:84724, status:”A”} {“_id”:ObjectId(“839abcd82729387839abcd82729388”, “name”:”Joe”, zip:84724, status:”A”}
  • 22. MongoDB Node.JS Express.JS Angular Application Development Tools: MEAN stack You know what iMEAN?You know what iMEAN?You know what iMEAN?You know what iMEAN?You know what iMEAN?You know what iMEAN?You know what iMEAN? Mongo Drivers Node.JS Express.JS Informix Angular You know what iMEAN? Web Browser Web Server JSON Database MongooseJS MongooseJS
  • 23. Installation • Multiple options to install the required packages • Pre-packaged versions available – I used meanjs.org instructions – http://scotch.io/bar-talk/setting-up-a-mean-stack-single-page- application • Had to install the following separately – Mongodb – very simple to install – Command line github
  • 24. ApplicationStructure - app ----- routes.js - config ----- db.js - node_modules <!-- created by npm install --> - public <!-- all frontend and angular stuff --> ----- css ----- js ---------- controllers <!-- angular controllers --> ---------- services <!-- angular services --> ---------- app.js <!-- angular application --> ---------- appRoutes.js <!-- angular routes --> ----- img ----- libs <!-- created by bower install --> ----- views ---------- home.html ---------- nerd.html ---------- geek.html ----- index.html - .bowerrc <!-- tells bower where to put files (public/libs) --> - bower.json <!-- tells bower which files we need --> - package.json <!-- tells npm which packages we need --> - server.js <!-- set up our node application -->
  • 25. Example install packages // package.json { "name": "starter-node-angular", "main": "server.js", "dependencies": { "express": "~3.5.0", "mongoose": "~3.6.13" } } // bower.json { "name": "starter-node-angular", "version": "1.0.0", "dependencies": { "bootstrap": "latest", "font-awesome": "latest", "animate.css": "latest", "angular": "latest", "angular-route": "latest" } }
  • 26. Demo
  • 27. References • Intro to MEAN stack – http://www.slideshare.net/vkarpov15/mean-stack- google-developers-live-1003
  • 28. Questions? Keshav Murthy r k e s h a v @ u s . i b m . c o m 29