Asynchronous database connections in the Mozilla Platform

July 19, 2013 § 2 Comments

One of the core components of the Mozilla Platform is mozStorage, our low-level database, based on sqlite3. mozStorage is used just about everywhere in our codebase, to power indexedDB, localStorage, but also site permissions, cookies, XUL templates, the download manager (*), forms, bookmarks, the add-ons manager (*), Firefox Health Report, the search service (*), etc. – not to mention numerous add-ons.

(*) Some components are currently moving away from mozStorage for performance and footprint reasons as they do not need the safety guarantees provided by mozStorage.

A long time ago, mozStorage and its users were completely synchronous and main-thread based. Needless to say, this eventually proved to be a design that doesn’t scale very well. So, we set out on a quest to make mozStorage off main thread-friendly and to move all these uses off the main thread.

These days, whether you are developing add-ons or contributing to the Mozilla codebase, everything you need to access storage off the main thread are readily available to you. Let me introduce the two recommended flavors.

Note: This blog entry does not cover using database from *web applications* but from the *Mozilla Platform*. From web applications, you should use indexedDB.

« Read the rest of this entry »

Beautiful Off Main Thread File I/O

October 18, 2012 § 7 Comments

Now that the main work on Off Main Thread File I/O for Firefox is complete, I have finally found some time to test-drive the combination of Task.js and OS.File. Let me tell you one thing: it rocks!

« Read the rest of this entry »

OS.File, step-by-step: The Schedule API

December 13, 2011 § 7 Comments


One of the key components of OS.File is the Schedule API, a tiny yet powerful JavaScript core designed to considerably simplify the development of asynchronous modules. In this post, we introduce the Schedule API.


In a previous post, I introduced OS.File, a Mozilla Platform library designed make the life of developers easier and to help them produce high-performance, high-responsiveness file management routines.

In this post, I would like to concentrate on one of the core items of OS.File: the Schedule API. Note that the Schedule API is not limited to OS.File and is designed to be useful for all sorts of other modules.

« Read the rest of this entry »

Goodbye MLstate, goodbye Opa

September 6, 2011 § 6 Comments

Tides come and tides go.

Two years ago, I accepted to join MLstate, to take lead of the R&D group, and turn Opa from a promising early-stage demo into a world-class technology. And I am happy to say that we succeeded. Certainly, there are still many things that we would like to improve in Opa, but looking back on those two years, I am proud of the work we have accomplished, of the number of topics upon which we have pushed forward the state of the art, and even of many of the mistakes we have made, because they have expanded our understanding so much.

Now, after two years at MLstate, I am leaving. Our work is accomplished and I do not feel that I can contribute in any meaningful way to what MLstate has now become, nor that today’s MLstate can keep me excited and interested any longer. In the past few days, Opa has been featured on Lambda the Ultimate, on Hacker News and on Slashdot. Small and large high-tech companies have tried and enjoyed the technology. What better time than this to set sail and say goodbye to these two exciting years of my life?

As of today, I am not the Head of Research & Development, Chief Scientific Officer or Technological Evangelist at MLstate anymore. I will keep a distant eye on Opa, but I will not design or supervise its future versions. Mathieu Baudet, our COO, is replacing me as the supervisor for the development of Opa, while Adam Koprowski is replacing me as Technological Evangelist. Mathieu is a very intelligent security researcher and I am sure that he will impose a new style to the Opa team, and Adam is a bright and enthusiastic researcher/developer, and certainly the best person at MLstate to carry on Opa advocacy.

I would like to thank my University for supporting this foray into the exciting world of start-ups. I would like to thank our CEO for recruiting such a talented team. I would also like to thank Mehdi Ben Soltane, our CFO/HR director, who managed to do his job with a nice and welcome pinch of humor, even in the toughest of times. And mostly, I would like to thank all the R&D team: Maxime Audouin, Mathieu Barbin, Vincent Benayoun, Anthonin Bonnefoy, Raja Boujbel, Quentin Bourgerie, Sébastien Briais, Valentin Gatien-Baron, Louis Gesbert, Nicolas Glondu, Hugo Heuzard, Adrien Jonquet, Mikolaj Konarski, Adam Koprowski, Laurent LeBrun, Sarah Maarek, Grégoire Makridis, François Pessaux, Guillem Rieu, Pascal Rigaux, Norman Scaife, Rudy Sicard, François-Régis Sinot, Cédric Soulas, Quickie Squeaky, Hugo Venturini, Frédéric Ye, and all our successive generations of interns[1]: you are the best team I have ever had the chance to join, it really was an honor and a pleasure working with you all and I hope that those among you who have chosen to remain in MLstate have as much fun working under Mathieu’s leadership as I had working with you all.

Time to set sail! My next missive should arrive from the next port.

[1] Sorry, I do not have the list of interns at hand. But do not worry, I enjoyed working with you, too :)

OPA internships (continued)

February 26, 2010 § Leave a comment

Thanks for all the high-level applications to MLstate’s internships. All positions are now filled.

See you soon for the next release of OPA.

Merci pour toutes les (très bonnes) candidatures aux stages que nous avons proposé. Tous les stages ont été pris.

À bientôt pour la prochaine version d’OPA.

Programming language internships in Paris, France

January 8, 2010 § Leave a comment

Edit: Thanks for all the high-level applications to MLstate’s internships. All positions are now filled.

See you soon for the next release of OPA.

« Read the rest of this entry »

Internship in Virtual Machine Design

August 31, 2008 § Leave a comment

Start-up MLState and team SDS (Security of Distributed Systems, part of Laboratoire d’Informatique Fondamentale d’Orléans) offer a research or engineering internship in the domain of Programming Language Design, under the supervision of David Teller (SDS) and Henri Binsztok (MLState).

« Read the rest of this entry »

Post-doctorate position in Programming Language Design

August 28, 2008 § Leave a comment

Start-up MLState and team SDS (Security of Distributed Systems, part of Laboratoire d’Informatique Fondamentale d’Orléans) offer a post-doctorate position in the domain of Programming Language Design, under the supervision of David Teller (SDS) and Henri Binsztok (MLState).

« Read the rest of this entry »

PhD position in either Applied Security or Foundations of Security

August 16, 2008 § Leave a comment

A PhD position in Security is to be filled in CEA (Commissariat à l’Énergie Atomique) and team SDS (Security of Distributed Systems, part of Laboratoire d’Informatique Fondamentale d’Orléans), in France, on the topic of Mandatory Access Control for Distributed Systems, under the administrative supervision of Mathieu Blanc (CEA) and Christian Toinard (SDS).

Studentship is for three years (renewable) and includes a salary rising from €1990.25/month (during years 1 and 2)  to €2049.75/month (during year 3). The earliest start date is October 1st 2008.

Profile and skills

The ideal candidate should have an excellent undergraduate degree/Master 2 in Computer Science and an interest in either System Security or Formal Methods. Candidates should have a background in one or more of the following areas:

  • system security
  • operating systems
  • distributed systems
  • system programming
  • clusters
  • static analysis
  • graph theory
  • theory of concurrency
  • logics
  • denotational semantics
  • operational semantics
  • foundations of trust.

Candidates should be eligible to work in France and should expect to work on-campus in ENSIB (École Nationale Supérieure d’Ingénieurs de Bourges). They will work on the theory and/or implementation of effective and manageable enforcement mechanisms for security policies in distributed systems such as clusters and grids.  The main objective of this PhD is to build upon existing local enforcement mechanisms for security policies to design (and, if possible, implement) techniques which may be applied for large distributed systems, as used for data analysis or numeric analysis.

Application procedure

To apply, please send your resume and a motivation letter, either by e-mail or by paper-mail, to both Christian Toinard and Mathieu Blanc. If possible, join a sample of your academic work. The application process entails a background check by the French Department of Defense.

Don’t fear the monads

February 26, 2008 § Leave a comment

If you are a developer keeping somewhat up-to-date with the latest and upcoming trends, chances are that you have heard of monads. Now, one of the traditions among developers who hear about monads is to figure them out then write a tutorial. I haven’t quite reached the second stage, but I can point you to a 1h on-line video lecture, targeted for C# and Java developers, and introducing both functional programming and monads.

Enjoy !

Where Am I?

You are currently browsing entries tagged with concurrency at Il y a du thé renversé au bord de la table.


Get every new post delivered to your Inbox.

Join 29 other followers