This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Reading Code

My recent threads

Recently updated threads

Week 6: Storage! MongoDB and HTML5 Web Storage

Go back to: General discussion

Hi everybody!

Information on our two libraries for this week are below.  

To summarize your assignment this week:
1. choose a library and start reading!
2. by weds, get an idea of a bug or issue you'd like to study further
3. for sunday, we'll be discussing your experience with the code and the specific issues you chose. 

Lots of links and info below. Good luck!

-------------------------------

This week our theme is storage, and we'll be covering two technologies. The first is mongoDB, a popular "schema-less database". The main assignment is to look at either mongo's core code (which is c++), or to look at one of the drivers that let you interface with mongo in your language of choice-- these are typically a conbination of c/c++ code, and the code in the specific language. Either way, hopefully it will expose you to come of the coolness that is schema-less data stores,and mongo in particular which has a reputation for being well-documented and fun to use.

MongoDB source code downloads for the main application as well as language-specific drivers can be found here (make sure to choose the right platform!), and their bug tracker is here.

The second storage technology is a standard called web storage. It was originally part of the html5 spec, but was spun out into its own standard. The basic idea is to define a standard interface with which browsers can implement local in-browse storage for applications, where cookies were historically abused to provide the same functionality. Local storage does not get sent over the network, and is persistent across browser sessions. DiveIntoHTML has a good overview of web storage here, and the W3C standard itself can be viewed here.

Since web storage is only a standard, to look at code we'll need to look at a specific implementation in one of the many browsers which supports this technology. The one i found easiest to search is chromium (more so than firefox). They have an interface for searching their code, and the source code itself, and here's a resource that discusses the local storage APIs

The chrome code is a bit hairier than the other things we've been reading. It seems like the best place to start is by a search for "LocalStorage" (since the api is implemented via window.LocalStorage). From there, there's a variety of files that implement the storage, the APIs on the c++ side, and on the javascript side. The developer documentation has an overview of getting around the chromium source code. Finally, here is a link to the issue tracker for chromium, with a specific search for localstorage.

Your mission! We discussed in class this week that our goal would be to choose one of these options and begin reading their code by WEDS. For the second half of the week, we'll choose a specific bug. I'll be asking you for some suggestions, so please think about it and refer back to the issue trackers for these projects while you start reading!

Eric Bréchemier's picture
Eric Bréchemier
Tue, 2010-10-19 22:22

Hi,

I will focus on MongoDB, studying one of these bugs:

[SERVER-150] Javascript closures
http://jira.mongodb.org/browse/SERVER-150

[SERVER-1938] create db.exists() and collections.exists()
http://jira.mongodb.org/browse/SERVER-1938

Eric

Rin Raeuber's picture
Rin Raeuber
Wed, 2010-10-20 07:27

Hey,

I'll try my luck with MongoDB too. Curious to see if it's all greek to me :).

issue:
http://jira.mongodb.org/browse/SERVER-1874

- Rin

madarve's picture
madarve
Wed, 2010-10-20 09:17

I'll go with this one, seems "doable" for now:

http://jira.mongodb.org/browse/SERVER-1703

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Wed, 2010-10-20 15:28

that's great guys! i think i'll have something by the end of today, too. what about others? don't be shy... if you've missed some weeks, there's no dependencies between each framework, so feel free to jump back in at any time! :). and if you have questions/need help, drop me a line as well.

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Sun, 2010-10-24 20:44

just a reminder that we'll be meeting in about 15 minutes at 3pm EDT!