Author Archive: Santanu

Structured Data Management for AJAX Applications, Part 2

Part 1 of this series introduced Stache, a Javascript library for structured data management in AJAX applications. Part 2 describes how to construct data schemas and work with associations, indexing, and constraints. To run the code samples below, you’ll need to include two Javascript files in addition to stache.js: common.js and bplus.js. As an example …

Continue reading

Structured Data Management for AJAX Applications, Part 1

The AJAX application model lends itself to dynamic, responsive user interfaces.  However, as the application and data model increase in complexity, it becomes harder to keep track of data in a consistent and manageable manner.  This is the first of a series of posts introducing a Javascript library I created called Stache that aims to …

Continue reading

Profiling and Optimizing the Javascript B+ Tree, Update 1

In the previous post, I neglected to demonstrate one important performance consideration, which is the type of key used to insert elements into the B+ tree. The baseline code was using string keys, as were all improved versions discussed. If instead numeric keys are used, the performance improves significantly. Insertion/removal/insertion times are now 2037ms/2161ms/2522ms, which …

Continue reading

Profiling and Optimizing the Javascript B+ Tree

In an earlier post, I built a B+ tree in Javascript.  This post is about improving it’s performance by profiling and optimizing it. You can grab the baseline code that is going to be optimized if you want to make the changes and run the demo in your own browser. First of all launch the …

Continue reading

Laziness, DTOs and the Open Session in View (Anti)Pattern

If you’ve built web applications using an ORM library like Hibernate, you’ve probably run into the “open session in view” (anti)pattern.  The online discussion of this swings back and forth, and I’m not here to comment on whether this is or is not a good idea.  But generally, all the posts on this topic take …

Continue reading

A Simple Near Duplicate Detection Algorithm

Near duplicate detection (NDD) is the operation whereby two documents are tested for partial similarity.  A typical application of this would be to ignore similar web pages for a search engine result set.  These sorts of partly similar pages are common nowadays due to syndication, re-posting, media content pools, etc. The problem with NDD (vs. exact …

Continue reading

A Javascript B+ Tree

This post describes a Javascript implementation of the B+ tree data structure.  If you’re just here for the code, and don’t want to read any of this jibber jabber, here’s the github link: https://github.com/santanubasu/BPlusJS. Ok, so now a bit more about this.  First off, here’s a link to a page on wikipedia describing a B+ tree.  Speaking …

Continue reading

Time to Start a Blog

I’ve worked in tech long enough now that I have more than a few ideas bouncing around in my head.  They might even be good ideas, but let’s not get ahead of ourselves. This blog is a place for me to jot stuff down.  Writing about things seems to be one way to gain a …

Continue reading