DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • Microservices With Apache Camel and Quarkus
  • Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]
  • Writing a Vector Database in a Week in Rust
  • How To Approach Java, Databases, and SQL [Video]

Trending

  • Microservices With Apache Camel and Quarkus
  • Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]
  • Writing a Vector Database in a Week in Rust
  • How To Approach Java, Databases, and SQL [Video]
  1. DZone
  2. Data Engineering
  3. Databases
  4. CouchDB in the Browser vs. Indexed Database API

CouchDB in the Browser vs. Indexed Database API

Nuno Job user avatar by
Nuno Job
·
Dec. 04, 11 · Interview
Like (0)
Save
Tweet
Share
8.82K Views

Join the DZone community and get the full member experience.

Join For Free

There's something fundamentally wrong with the way we do browser apps in javascript which can be described in a single sentence: You can't use a local database. Or a local search engine.

Even if you try to build your own abstractions you will never be able to build something that can work minimally well as databases go. e.g. javascript doesn't allow you to create custom datatypes that are optimized for database processing, such as BTrees and stuff.

The Indexed DB API tries to formulate the minimal common denominator, the things that browser vendors must provide to you so you build your own databases using javascript.

This is much better than what we have right now so you would expect a database geek such as myself to feel ecstatic about the Indexed DB API. I am happy about it but still have some really big concerns about it:

Indexed DB API is not a finished product. Developers need something that can sync our data to another machine, that can store JSON, and where we can run some queries. Maybe something that can gives us push notifications in a flexible way? The Indexed DB API focus in none of these things.

The Indexed DB API specification is heavily relational geared in nature. One might say I'm being untrue, but if they are they probably never worked in a document database. You can read about cursors, transactions, and all sort of things that I would not expect to be in early drafts of a database API for the web. At least I wouldn't.

The Indexed DB API is years from mainstream usage when we need it now! This is my biggest pain point with it: We need to wait for a recommendation, then people will build products (hopefully). Then we need to wait for browsers to catch up and then we need to wait for users to upgrade their browsers. Not easy considering how many people still use IE 6 today.

It looks like we are in the HTML5 vs. XHTML standoff again. This is taking way to long for thing we needed yesterday. I for once think HTML5 was a great thing and broke free from endless boring discussion about making the perfect markup language.

I for once would just vote for putting CouchDB in the browser and standardize it's HTTP API and replication engine. CouchDB is already an Apache project and is extremely successful in doing the stuff we need to do in web applications. Why reinvent the wheel? Take it and build your standard around it, not some relational biased IDB that people will then implement CouchDB on top of.

I would love to hear why this is such a terrible idea. Base the standard on something that works today and modify it accordingly to what the browser needs?

PS. I have no interest in contributing to confusion or instigate anyone. My sole intention is to have this shit running before I have grey hair and look like Jack Nicholson. If you are looking for trolling I suggest you look somewhere else.


Source:  http://writings.nunojob.com/2011/11/couchdb-in-the-browser-vs-indexed-database-api.html


API Database Relational database

Opinions expressed by DZone contributors are their own.

Trending

  • Microservices With Apache Camel and Quarkus
  • Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]
  • Writing a Vector Database in a Week in Rust
  • How To Approach Java, Databases, and SQL [Video]

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: