Tag Archives: IndexedDB

Streaming full-text search for NodeJS and browsers. Built on LevelDB.

via cshum/levi · GitHub.

Streaming full-text search for Node.js and browsers. Using LevelDB as storage backend.

npm install levi

Full-text search using TF-IDF and cosine similarity. Stream based query mechanism plus query-time field boost options. Provided with configurable text processing pipeline: Tokenizer, Porter Stemmer and Stopwords filter.

Levi is built on LevelUP – a fast, asynchronous, transactional storage interface. By default, it usesLevelDB on Node.js and IndexedDB on browser. Also works with a variety of LevelDOWN compatible backends.

In addition, Levi provides relevancy scoring for live changing data using TF-ICF – a TF-IDF approximation based on existing corpus. Such scoring matches comparably close to TF-IDF when existing corpus is sufficiently large, with significantly better performance O(N) instead of O(N^2).

Ember Pouch: PouchDB/CouchDB adapter for Ember Data

via nolanlawson/ember-pouch · GitHub.

Ember Pouch is a PouchDB/CouchDB adapter for Ember Data.

With Ember Pouch, all of your app’s data is automatically saved on the client-side using IndexedDB or WebSQL, and you just keep using the regular Ember Data store API. This data may be automatically synced to a remote CouchDB (or compatible servers) using PouchDB replication.

What’s the point?

  1. You don’t need to write any server-side logic. Just use CouchDB.
  2. Data syncs automatically.
  3. Your app works offline, and requests are super fast, because they don’t need the network.

For more on PouchDB, check out pouchdb.com.

BasketJS: A simple (proof-of-concept) script loader that caches scripts with localStorage

via basket.js – a simple script loader that caches scripts with localStorage.

This section was rendered using the micro-templating in Underscore.js. It’s just one of a number of scripts that were added to this document using basket.js when you loaded it and should now be cached in localStorage (if supported). If you visit this page again, the scripts will be loaded from there rather than being refetched. Backbone.js was also loaded and we created a new model with the name: Nyan Cat (just for funsies).


via IndexedDB | Médiaforma.

This folder will show you how to use the JavaScript API IndexedDB  to store data in its own local database in the Web browser used. IndexedDB is a transactional database management system . You may be baffled if you’re used to working with relational databases . Indeed, IndexedDB is an object-oriented basis, which differs significantly from the tables consist of rows and columns of relational databases …

In a few chips, the benefits of IndexedDB:

  • Ability to manage a large number of client-side structured data, online or offline. Performing searches based on one or more indexes.
  • Asynchronous operation.

Taming the asynchronous beast with ES7

via Taming the asynchronous beast with ES7.

One of the trickiest aspects of PouchDB is that its API is asynchronous. I see no shortage of confused questions on Stack Overflow, Github, and IRC, and most often they stem from a misunderstanding of callbacks and promises.

We can’t really help it. PouchDB is an abstraction over IndexedDB, WebSQL, LevelDB (in Node), and CouchDB (via Ajax). All of those APIs are asynchronous; hence PouchDB must be asynchronous.

HTML5 Offline Mobile App Using Ionic and PouchDB

via HTML5 Offline Mobile App Using Ionic and PouchDB – WebSpeaks.

In this article I will demonstrate how to create an HTML5 mobile app using Ionic Framework which will be available even in offline mode. This app will show the RSS feeds from webspeaks.in and store them on your mobile device for offline access. So you will be able to view the feeds even when your internet connection is down.

I have chosen Ionic Framework for app development as I feel this is one of the most powerful and developer friendly framework with great command line support. For storing data we have a number of options available in terms of local storage, IndexedDB, WebSQL etc. But cross browser and cross platform implementation of these standards is a real pain. So for storage purposes I have usedPouchDB database. PouchDB is a NoSQL database and is a JavaScript implementation of Apache CouchDB. Great thing about PouchDb is that it abstracts the underlying database implementation from us. It means that it can automatically chose which database engine to use behind the scenes. The greatest thing about PouchDB is that it has real time syncing capabilities i.e it can sync the local database on client with the remote database on server. However in this application we will not be using the syncing feature.
Download Script   Live Demo