SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Post-relational databases

   What's wrong with web
      development?

           Dobrica Pavlinušić
         http://blog.rot13.org
 FOI, Razmjena Vještina, Varaždin, 2010-12-10
Who am I?
●   Web programming since 1995 using FLOSS
●   Languages: php, perl, JavaScript
●   Databases: PostgreSQL, MySQL, CouchDB
●   5+ years of expirience as system architect on
    large intranet content portal
●   http://blog.rot13.org

●   Big question: are we solving same
    problems over and over again?
●   Model-View-Controller pattern
Back in mainframe days...


        View             serial           Controller            Model
        text              text             COBOL                 files

     Terminal                                          Server


    ●   All logic in COBOL application
    ●   Similar to Clipper in DOS
    ●   Payroll-type applications

1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
GUI Client/Server RDBMS


        View              Controller          SQL
        GUI      API                                          Model
                            4GL              ODBC             RDBMS

                 Client                                        Server


    ●   tabular normalized data (3NF)
    ●   SQL to query and modify data (static schema)
    ●   logic in controller and RDBMS (validation)

1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
Internet! Web 1.0


         View                             Controller
                          HTTP                                Model
         HTML             HTML              PHP
                                                       SQL
                                                              RDBMS

        Browser                                   Web server


    ●   "network is computer" – browser thin client
    ●   Logic in controller, RDBMS & view (JavaScript)
    ●   Trees (XML)? Self-referencing data?

1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
AJAX JSON REST Web2.0


        View            Controller                             Model
                                              HTTP
        HTML     JSON
                        JavaScript            JSON             JSON

               Browser 2.0                                 NoSQL server


    ●   JSON without schema (or verification!)
    ●   Logic in JavaScript on client and server
    ●   Turtles all the way down reduces complexity

1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
Perfect web stack
●   HTTP REST API with JSON
     – GET, PUT/POST, DELETE
●   JavaScript queries using map/reduce
     – Real-world dirty data from views
●   Serve application from HTTP database
    (content-type support)
●   Two-way data binding forms <-> JSON
     – HTML is only template we need!
●   Single language: JavaScript (+jquery)
●   "simple app in single afternoon" benchmark
CouchDB
●   Designed for replication over HTTP
     – applications replicatied with data (off-line)
●   Custom views, requests and _changes feed
<angular/>
●   What if web browsers where written for web
    applications today?
     – html compiler inside browser
     – ng:repeat and friends to template objects
     – Objects persisted using REST to server
●   http://docs.angularjs.org/

●   Demo
     – printer overview
     – conference submission app
angular-mojolicious
●   Mojolicious – web in the box (perl)
    – http://mojolicious.org/
●   Mojo::Client – chunked HTTP client
    – Perfrect for CouchDB integration
●   https://github.com/dpavlin/angular-mojolicious
●   REST API for Angular's $resource
     – CouchDB proxy or static JSON files
●   Replication with getangular.com service
     – not API compliant, uses newer version
●   Helpers to quickly prototype with angular
CouchDB triggers
●   Finite-state machine inside document
●   Multiple workers - FSM for lock and status
●   filter, trigger, commit on _changes feed
●   Perfect for async tasks
     – executing shell
     – sending e-mail
CouchDB full-text search
●   Implemented as filter-only trigger
●   KinoSearch – full-text search, base for
    Apache lucy (Lucene in C)
●   trigger which delete/add documents
     – Unroll structures into.flat.schema
●   CouchDB external server to perform queries
CouchDB related projects
●   BigCouch
     – https://github.com/cloudant/bigcouch
     – Consistant hashing, sharding
●   ElasticSearch
     – http://www.elasticsearch.com/
     – CouchDB river
●   GeoCouch
     – https://github.com/vmx/couchdb
     – Spartial index
Riak (search)
●   cluster of machines!
●   Amazon's dynamo model
     – r,w – eventual consistency
●   Multiple map/reduce phases in single query
     – Ad-hoc, not cached, in parallel over cluster
●   post-commit hooks (search)
●   Links (REST traversal)
●   HTTP and ProcolBuffers interfaces
●   http://www.basho.com/riaksearch.html
Overview
●   Avoid complexity
     – Model: JSON
     – View: HTML
     – Controller: angular
●   Solve offline problem: CouchDB
     – Attach async processes in the cloud!
●   Attack interesting problems
     – Tree-data, (social) networks

Contenu connexe

Tendances

Building OpenStreetMap.org, SOTM US 2015
Building OpenStreetMap.org, SOTM US 2015Building OpenStreetMap.org, SOTM US 2015
Building OpenStreetMap.org, SOTM US 2015Tom Hughes
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEANMadhukara Phatak
 
Synchronization with CouchDB and PouchDB
Synchronization with CouchDB and PouchDBSynchronization with CouchDB and PouchDB
Synchronization with CouchDB and PouchDBEU Edge
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYCChris Anderson
 
Vlad zelinschi optimizing the critical rendering path
Vlad zelinschi   optimizing the critical rendering pathVlad zelinschi   optimizing the critical rendering path
Vlad zelinschi optimizing the critical rendering pathCodecamp Romania
 
PHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHPPHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHPHenri Bergius
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntAlkacon Software GmbH & Co. KG
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF PythonMike Dirolf
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveExove
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applicationsTom Martin
 
Part One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackPart One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackMongoDB
 
Gwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunGwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunhbraun
 
RESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sRESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sKalin Chernev
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseSudhir Patil
 
Why Drupal?
Why Drupal?Why Drupal?
Why Drupal?Grossum
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionindiver
 

Tendances (20)

Building OpenStreetMap.org, SOTM US 2015
Building OpenStreetMap.org, SOTM US 2015Building OpenStreetMap.org, SOTM US 2015
Building OpenStreetMap.org, SOTM US 2015
 
Flour
FlourFlour
Flour
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEAN
 
Synchronization with CouchDB and PouchDB
Synchronization with CouchDB and PouchDBSynchronization with CouchDB and PouchDB
Synchronization with CouchDB and PouchDB
 
Ajax Zf
Ajax ZfAjax Zf
Ajax Zf
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYC
 
Vlad zelinschi optimizing the critical rendering path
Vlad zelinschi   optimizing the critical rendering pathVlad zelinschi   optimizing the critical rendering path
Vlad zelinschi optimizing the critical rendering path
 
PHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHPPHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHP
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF Python
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – Exove
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applications
 
Part One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackPart One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN Stack
 
Gwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunGwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraun
 
RESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sRESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-s
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
Intro ror
Intro rorIntro ror
Intro ror
 
00_VB_Intro
00_VB_Intro00_VB_Intro
00_VB_Intro
 
Why Drupal?
Why Drupal?Why Drupal?
Why Drupal?
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusion
 

En vedette

The Constellation Query Language
The Constellation Query LanguageThe Constellation Query Language
The Constellation Query LanguageClifford Heath
 
The Great Highland Bagpipe
The  Great  Highland  BagpipeThe  Great  Highland  Bagpipe
The Great Highland Bagpipe1LifelongLearner
 
Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0stefan.geens
 
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...PaleFire
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?Dobrica Pavlinušić
 
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...Dr Stylianos Mystakidis
 
Social Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsSocial Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsDr Stylianos Mystakidis
 
Free Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryFree Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryDobrica Pavlinušić
 
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAPVirtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAPDobrica Pavlinušić
 
Re-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent StorytellingRe-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent StorytellingPaleFire
 
Virtual Reality Applications in Career Consulting - Potential & Restictions
Virtual Reality Applications in Career Consulting  - Potential & RestictionsVirtual Reality Applications in Career Consulting  - Potential & Restictions
Virtual Reality Applications in Career Consulting - Potential & RestictionsDr Stylianos Mystakidis
 
Poaching LG15: ARG-style
Poaching LG15: ARG-stylePoaching LG15: ARG-style
Poaching LG15: ARG-stylePaleFire
 
Denk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectieDenk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectieJohan Mijs
 

En vedette (20)

Euronem Zambia 2008
Euronem Zambia 2008Euronem Zambia 2008
Euronem Zambia 2008
 
The Constellation Query Language
The Constellation Query LanguageThe Constellation Query Language
The Constellation Query Language
 
Ppt Demo Slideshare
Ppt Demo SlidesharePpt Demo Slideshare
Ppt Demo Slideshare
 
Cow2
Cow2Cow2
Cow2
 
The Great Highland Bagpipe
The  Great  Highland  BagpipeThe  Great  Highland  Bagpipe
The Great Highland Bagpipe
 
Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0
 
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
Operation Payback (...is a bitch): Hacktivism at the Dawn of Copyright Contro...
 
Oslobodimo Hardware
Oslobodimo HardwareOslobodimo Hardware
Oslobodimo Hardware
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?
 
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...
Playful Blended Digital Storytelling in 3D Immersive eLearning Environments f...
 
Test
TestTest
Test
 
Social Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsSocial Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for Choirs
 
Free Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryFree Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG library
 
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAPVirtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
 
Language Edupreneurship
Language EdupreneurshipLanguage Edupreneurship
Language Edupreneurship
 
Re-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent StorytellingRe-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent Storytelling
 
Virtual Reality Applications in Career Consulting - Potential & Restictions
Virtual Reality Applications in Career Consulting  - Potential & RestictionsVirtual Reality Applications in Career Consulting  - Potential & Restictions
Virtual Reality Applications in Career Consulting - Potential & Restictions
 
Web scale monitoring
Web scale monitoringWeb scale monitoring
Web scale monitoring
 
Poaching LG15: ARG-style
Poaching LG15: ARG-stylePoaching LG15: ARG-style
Poaching LG15: ARG-style
 
Denk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectieDenk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectie
 

Similaire à Post-relational databases: What's wrong with web development?

6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012CMC Limited
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...François-Guillaume Ribreau
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)Saltlux zinyus
 
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)zinyus
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...Serdar Basegmez
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolAlessandro Cinelli (cirpo)
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Todaybretticus
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...MskDotNet Community
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Joonas Lehtinen
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachPROIDEA
 
PHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolPHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolAlessandro Cinelli (cirpo)
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsSteve Jamieson
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturedrewz lin
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturemysqlops
 

Similaire à Post-relational databases: What's wrong with web development? (20)

Node.js scaling in highload
Node.js scaling in highloadNode.js scaling in highload
Node.js scaling in highload
 
6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
 
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the fool
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
 
Next.js with drupal, the good parts
Next.js with drupal, the good partsNext.js with drupal, the good parts
Next.js with drupal, the good parts
 
KnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative FunctionsKnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative Functions
 
PHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolPHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the fool
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.js
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 

Plus de Dobrica Pavlinušić

Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsDobrica Pavlinušić
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Dobrica Pavlinušić
 
Let's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionLet's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionDobrica Pavlinušić
 
Raspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsRaspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsDobrica Pavlinušić
 
Cheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerCheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerDobrica Pavlinušić
 
FSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGFSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGDobrica Pavlinušić
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software peopleDobrica Pavlinušić
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloudDobrica Pavlinušić
 
KohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemKohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemDobrica Pavlinušić
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Dobrica Pavlinušić
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Dobrica Pavlinušić
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Dobrica Pavlinušić
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Dobrica Pavlinušić
 
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...Dobrica Pavlinušić
 

Plus de Dobrica Pavlinušić (20)

Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
bro - what is in my network?
bro - what is in my network?bro - what is in my network?
bro - what is in my network?
 
Let's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionLet's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 edition
 
Raspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsRaspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needs
 
Cheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerCheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component tester
 
Ganeti - build your own cloud
Ganeti - build your own cloudGaneti - build your own cloud
Ganeti - build your own cloud
 
FSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGFSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAG
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
 
SysAdmin cookbook
SysAdmin cookbookSysAdmin cookbook
SysAdmin cookbook
 
Printing on Linux, simple right?
Printing on Linux, simple right?Printing on Linux, simple right?
Printing on Linux, simple right?
 
KohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemKohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID system
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?
 
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...
REST ili kao sam se prestao brinuti o HTTP-u i zavolio ga (HTTP Server sa RFI...
 

Post-relational databases: What's wrong with web development?

  • 1. Post-relational databases What's wrong with web development? Dobrica Pavlinušić http://blog.rot13.org FOI, Razmjena Vještina, Varaždin, 2010-12-10
  • 2. Who am I? ● Web programming since 1995 using FLOSS ● Languages: php, perl, JavaScript ● Databases: PostgreSQL, MySQL, CouchDB ● 5+ years of expirience as system architect on large intranet content portal ● http://blog.rot13.org ● Big question: are we solving same problems over and over again? ● Model-View-Controller pattern
  • 3. Back in mainframe days... View serial Controller Model text text COBOL files Terminal Server ● All logic in COBOL application ● Similar to Clipper in DOS ● Payroll-type applications 1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
  • 4. GUI Client/Server RDBMS View Controller SQL GUI API Model 4GL ODBC RDBMS Client Server ● tabular normalized data (3NF) ● SQL to query and modify data (static schema) ● logic in controller and RDBMS (validation) 1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
  • 5. Internet! Web 1.0 View Controller HTTP Model HTML HTML PHP SQL RDBMS Browser Web server ● "network is computer" – browser thin client ● Logic in controller, RDBMS & view (JavaScript) ● Trees (XML)? Self-referencing data? 1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
  • 6. AJAX JSON REST Web2.0 View Controller Model HTTP HTML JSON JavaScript JSON JSON Browser 2.0 NoSQL server ● JSON without schema (or verification!) ● Logic in JavaScript on client and server ● Turtles all the way down reduces complexity 1970 ... 1975 ... 1980 ... 1985 ... 1990 ... 1995 .. 2000 ... 2005 ... 2010
  • 7. Perfect web stack ● HTTP REST API with JSON – GET, PUT/POST, DELETE ● JavaScript queries using map/reduce – Real-world dirty data from views ● Serve application from HTTP database (content-type support) ● Two-way data binding forms <-> JSON – HTML is only template we need! ● Single language: JavaScript (+jquery) ● "simple app in single afternoon" benchmark
  • 8. CouchDB ● Designed for replication over HTTP – applications replicatied with data (off-line) ● Custom views, requests and _changes feed
  • 9. <angular/> ● What if web browsers where written for web applications today? – html compiler inside browser – ng:repeat and friends to template objects – Objects persisted using REST to server ● http://docs.angularjs.org/ ● Demo – printer overview – conference submission app
  • 10. angular-mojolicious ● Mojolicious – web in the box (perl) – http://mojolicious.org/ ● Mojo::Client – chunked HTTP client – Perfrect for CouchDB integration ● https://github.com/dpavlin/angular-mojolicious ● REST API for Angular's $resource – CouchDB proxy or static JSON files ● Replication with getangular.com service – not API compliant, uses newer version ● Helpers to quickly prototype with angular
  • 11. CouchDB triggers ● Finite-state machine inside document ● Multiple workers - FSM for lock and status ● filter, trigger, commit on _changes feed ● Perfect for async tasks – executing shell – sending e-mail
  • 12. CouchDB full-text search ● Implemented as filter-only trigger ● KinoSearch – full-text search, base for Apache lucy (Lucene in C) ● trigger which delete/add documents – Unroll structures into.flat.schema ● CouchDB external server to perform queries
  • 13. CouchDB related projects ● BigCouch – https://github.com/cloudant/bigcouch – Consistant hashing, sharding ● ElasticSearch – http://www.elasticsearch.com/ – CouchDB river ● GeoCouch – https://github.com/vmx/couchdb – Spartial index
  • 14. Riak (search) ● cluster of machines! ● Amazon's dynamo model – r,w – eventual consistency ● Multiple map/reduce phases in single query – Ad-hoc, not cached, in parallel over cluster ● post-commit hooks (search) ● Links (REST traversal) ● HTTP and ProcolBuffers interfaces ● http://www.basho.com/riaksearch.html
  • 15. Overview ● Avoid complexity – Model: JSON – View: HTML – Controller: angular ● Solve offline problem: CouchDB – Attach async processes in the cloud! ● Attack interesting problems – Tree-data, (social) networks