<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Data Persistence (Mailnews Exchange Support)</title>
	<atom:link href="http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/feed/" rel="self" type="application/rss+xml" />
	<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=data-persistence-mailnews-exchange-support</link>
	<description>Messaging with Mozilla by rkent</description>
	<lastBuildDate>Thu, 09 Feb 2012 02:10:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Leo Maslen</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-3045</link>
		<dc:creator>Leo Maslen</dc:creator>
		<pubDate>Sun, 02 Oct 2011 11:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-3045</guid>
		<description>ÿþ&#124;</description>
		<content:encoded><![CDATA[<p>ÿþ|</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Sutherland</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-711</link>
		<dc:creator>Andrew Sutherland</dc:creator>
		<pubDate>Mon, 28 Jun 2010 22:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-711</guid>
		<description>It&#039;s worth noting that the SQLite 3.7.0 development series has a new log mechanism that will allow multiple reads to happen without delay even while a writer is active.  The problem is that its release may not be imminent and it&#039;s pretty much guaranteed that will never land on 1.9.2.  Even 1.9.3 might be a stretch depending on when 3.7 is released and how willing Firefox is to take a chance on it / whether Firefox will gain an immediate benefit.

Which is just to say, if you&#039;re not planning to ship against Thunderbird 3.1, don&#039;t write off SQLite changing the game.</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth noting that the SQLite 3.7.0 development series has a new log mechanism that will allow multiple reads to happen without delay even while a writer is active.  The problem is that its release may not be imminent and it&#8217;s pretty much guaranteed that will never land on 1.9.2.  Even 1.9.3 might be a stretch depending on when 3.7 is released and how willing Firefox is to take a chance on it / whether Firefox will gain an immediate benefit.</p>
<p>Which is just to say, if you&#8217;re not planning to ship against Thunderbird 3.1, don&#8217;t write off SQLite changing the game.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Sutherland</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-710</link>
		<dc:creator>Andrew Sutherland</dc:creator>
		<pubDate>Mon, 28 Jun 2010 22:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-710</guid>
		<description>My concern about the flame war is secondary.  My primary concern is that I am a firm believer in &quot;show me the code&quot; and telling people about things when they can use them or meaningfully contribute to them.  That moment is several weeks out.

Which is not to say it will be a &quot;surprise! here&#039;s a fully formed implementation&quot; kind of thing, just that it will be &quot;here&#039;s a coherent set of ideas, some of which are already working and all suggest the proposed future steps are not insane, and here&#039;s what you can do to provide insight/feedback/hack on things.&quot;

I should probably also point out that I&#039;m expecting to see you, bienvenu, jcranmer, and other contributors in a week in-person at the mozilla summit.  I want to leverage that high-bandwidth reduced-chance-for-misunderstandings environment.  If that wasn&#039;t coming up, I would be much more likely to solicit public feedback.  (I&#039;m actually working on different stuff (UI framework) between now and then, so there&#039;s little lost opportunity.)</description>
		<content:encoded><![CDATA[<p>My concern about the flame war is secondary.  My primary concern is that I am a firm believer in &#8220;show me the code&#8221; and telling people about things when they can use them or meaningfully contribute to them.  That moment is several weeks out.</p>
<p>Which is not to say it will be a &#8220;surprise! here&#8217;s a fully formed implementation&#8221; kind of thing, just that it will be &#8220;here&#8217;s a coherent set of ideas, some of which are already working and all suggest the proposed future steps are not insane, and here&#8217;s what you can do to provide insight/feedback/hack on things.&#8221;</p>
<p>I should probably also point out that I&#8217;m expecting to see you, bienvenu, jcranmer, and other contributors in a week in-person at the mozilla summit.  I want to leverage that high-bandwidth reduced-chance-for-misunderstandings environment.  If that wasn&#8217;t coming up, I would be much more likely to solicit public feedback.  (I&#8217;m actually working on different stuff (UI framework) between now and then, so there&#8217;s little lost opportunity.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rkent</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-706</link>
		<dc:creator>rkent</dc:creator>
		<pubDate>Mon, 28 Jun 2010 17:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-706</guid>
		<description>I don&#039;t really understand your reluctance to blog for fear of a flame war. I&#039;ve said before, and I will repeat again, that Skink develpment is sorely lacking vision at the moment IMHO, at least publically (and I am part of &quot;the public&quot; here who does not see the vision.) Spirited discussions are part of the process of developing vision. Skink is much more likely to die a slow death for lack of vision, than to die because of excessive controversy over that vision. Take a risk. Expect some negative responses, and try to learn from those responses.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t really understand your reluctance to blog for fear of a flame war. I&#8217;ve said before, and I will repeat again, that Skink develpment is sorely lacking vision at the moment IMHO, at least publically (and I am part of &#8220;the public&#8221; here who does not see the vision.) Spirited discussions are part of the process of developing vision. Skink is much more likely to die a slow death for lack of vision, than to die because of excessive controversy over that vision. Take a risk. Expect some negative responses, and try to learn from those responses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rkent</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-705</link>
		<dc:creator>rkent</dc:creator>
		<pubDate>Mon, 28 Jun 2010 16:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-705</guid>
		<description>Thanks for the response. Based on that, I&#039;ll definately want to avoid sync in my implementation of native object persistence, since I am not forced down that path by a lot of existing code.</description>
		<content:encoded><![CDATA[<p>Thanks for the response. Based on that, I&#8217;ll definately want to avoid sync in my implementation of native object persistence, since I am not forced down that path by a lot of existing code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Sutherland</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-690</link>
		<dc:creator>Andrew Sutherland</dc:creator>
		<pubDate>Sat, 26 Jun 2010 20:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-690</guid>
		<description>In terms of displaying non-nsIMsgDBHdr stuff, you are right that I want to display non-nsIMsgDBHdr stuff.  But it won&#039;t be done using the current folder, thread pane, or message reader implementations.  It is a goal to enable familiar-looking displays along the same lines with similar (or better) performance characteristics, but the current code implementation has certain deeply-rooted limitations that are not suitable for other performance and presentation goals.

It&#039;s the kind of thing I am reluctant to blog about until I am further along in the implementation process.  At the current stage, it is a speculative and contentious plan whose most likely immediate outcome would be at least a low-level flame war.

Which is to say, it would likely make a good number of people unhappy and concerned about where Thunderbird is (or at least I am) headed without any evidence to reassure them or help them change their minds.  The people who would be enthused by the direction would likely be happy, but things are not yet at a stage where anyone can really contribute meaningfully.  Also, I feel like I&#039;ve already expressed the gist of my gameplan to those would be enthused.  For example, if you found this strategy on my part wholly surprising, I would, in turn, be surprised.

It&#039;s very important to note that this is not going to be a short-term kind of effort and the 3-pane view as it currently exists is certainly not going away anytime I can see.  In fact, bienvenu&#039;s thinking is much more aligned with your own than mine, and he&#039;s pretty bad-ass, so we could end up in a situation where the 3-pane and &#039;skink&#039; in general evolve to the next level and continue to exist much as they do today.</description>
		<content:encoded><![CDATA[<p>In terms of displaying non-nsIMsgDBHdr stuff, you are right that I want to display non-nsIMsgDBHdr stuff.  But it won&#8217;t be done using the current folder, thread pane, or message reader implementations.  It is a goal to enable familiar-looking displays along the same lines with similar (or better) performance characteristics, but the current code implementation has certain deeply-rooted limitations that are not suitable for other performance and presentation goals.</p>
<p>It&#8217;s the kind of thing I am reluctant to blog about until I am further along in the implementation process.  At the current stage, it is a speculative and contentious plan whose most likely immediate outcome would be at least a low-level flame war.</p>
<p>Which is to say, it would likely make a good number of people unhappy and concerned about where Thunderbird is (or at least I am) headed without any evidence to reassure them or help them change their minds.  The people who would be enthused by the direction would likely be happy, but things are not yet at a stage where anyone can really contribute meaningfully.  Also, I feel like I&#8217;ve already expressed the gist of my gameplan to those would be enthused.  For example, if you found this strategy on my part wholly surprising, I would, in turn, be surprised.</p>
<p>It&#8217;s very important to note that this is not going to be a short-term kind of effort and the 3-pane view as it currently exists is certainly not going away anytime I can see.  In fact, bienvenu&#8217;s thinking is much more aligned with your own than mine, and he&#8217;s pretty bad-ass, so we could end up in a situation where the 3-pane and &#8216;skink&#8217; in general evolve to the next level and continue to exist much as they do today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Sutherland</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-689</link>
		<dc:creator>Andrew Sutherland</dc:creator>
		<pubDate>Sat, 26 Jun 2010 20:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-689</guid>
		<description>In terms of synchronous stuff...

Yeah, efficient single record lookups should generally result in acceptable performance as long as the header cache is large.  The trick is that if you ever want to do more expensive queries, you have to be very careful not to do things in such a way that you block your main-thread synchronous reader.

Probably the safest way to accomplish that would be to use a combination of 1) using a read-only second connection for long running reads when the user is non-idle and 2) only ever performing writes asynchronously on your &#039;main&#039; connection and when the user is idle.

The rationale is that multiple connections can be open and performing concurrent read-only operations without interfering with each other.  A single connection can be used on multiple threads, but a mutex means that only one thread can be in a sqlite3_step at a time, which means that a complex query on the async thread (or any other thread) could block the main thread with a complex query, even if it is read-only.

From a write perspective, you definitely do not want to be performing writes on the main thread because you will clog up the event loop.  It&#039;s potentially inadvisable to perform writes from a different connection than your main one just because the file locking makes all reads impossible until the transaction has completed (which again will likely result in blocking the main thread), whereas if you&#039;re writing from your main connection then you have a chance to get a read operation in from the main thread even while stuff is happening on the other thread.  (Although you are then in danger of getting inconsistent reads.)

So, to summarize, doing any synchronous access from the main thread is not really a great idea, but if you&#039;re working with the existing UI framework, you don&#039;t have much of a choice.</description>
		<content:encoded><![CDATA[<p>In terms of synchronous stuff&#8230;</p>
<p>Yeah, efficient single record lookups should generally result in acceptable performance as long as the header cache is large.  The trick is that if you ever want to do more expensive queries, you have to be very careful not to do things in such a way that you block your main-thread synchronous reader.</p>
<p>Probably the safest way to accomplish that would be to use a combination of 1) using a read-only second connection for long running reads when the user is non-idle and 2) only ever performing writes asynchronously on your &#8216;main&#8217; connection and when the user is idle.</p>
<p>The rationale is that multiple connections can be open and performing concurrent read-only operations without interfering with each other.  A single connection can be used on multiple threads, but a mutex means that only one thread can be in a sqlite3_step at a time, which means that a complex query on the async thread (or any other thread) could block the main thread with a complex query, even if it is read-only.</p>
<p>From a write perspective, you definitely do not want to be performing writes on the main thread because you will clog up the event loop.  It&#8217;s potentially inadvisable to perform writes from a different connection than your main one just because the file locking makes all reads impossible until the transaction has completed (which again will likely result in blocking the main thread), whereas if you&#8217;re writing from your main connection then you have a chance to get a read operation in from the main thread even while stuff is happening on the other thread.  (Although you are then in danger of getting inconsistent reads.)</p>
<p>So, to summarize, doing any synchronous access from the main thread is not really a great idea, but if you&#8217;re working with the existing UI framework, you don&#8217;t have much of a choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rkent</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-686</link>
		<dc:creator>rkent</dc:creator>
		<pubDate>Sat, 26 Jun 2010 15:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-686</guid>
		<description>&quot;You can use SQLite synchronously via mozStorage if you want&quot;

In my implementation, I&#039;m allowing sync grabbing of single records from a simple indexed key, but not of the queries (like &quot;get a list of all item ids that need updating&quot;). I was going to ask you if you thought that was OK, since the mozStorage MDC article &quot;strongly discourages&quot; that, it sounds like you think it is.

&quot;account/message types to just exist at the gloda level&quot;

That must mean that you are tring to get the standard display logic (folder and message panes) to work with some sort of message abstraction other than nsIMsgDBHdr objects. It would be great if you could blog about that.</description>
		<content:encoded><![CDATA[<p>&#8220;You can use SQLite synchronously via mozStorage if you want&#8221;</p>
<p>In my implementation, I&#8217;m allowing sync grabbing of single records from a simple indexed key, but not of the queries (like &#8220;get a list of all item ids that need updating&#8221;). I was going to ask you if you thought that was OK, since the mozStorage MDC article &#8220;strongly discourages&#8221; that, it sounds like you think it is.</p>
<p>&#8220;account/message types to just exist at the gloda level&#8221;</p>
<p>That must mean that you are tring to get the standard display logic (folder and message panes) to work with some sort of message abstraction other than nsIMsgDBHdr objects. It would be great if you could blog about that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Sutherland</title>
		<link>http://mesquilla.com/2010/06/25/data-persistence-mailnews-exchange-support/comment-page-1/#comment-680</link>
		<dc:creator>Andrew Sutherland</dc:creator>
		<pubDate>Sat, 26 Jun 2010 00:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://mesquilla.com/?p=884#comment-680</guid>
		<description>Cool!

You can use SQLite synchronously via mozStorage if you want.  It&#039;s only a serious problem when you have potentially long-running operations.  As long as you stay away from using the full-text search mechanism or complex queries you should be sufficiently fine.

Note that I&#039;m not suggesting that it&#039;s a good idea long term, but if your goal is to work with nsMsgDBView and existing message reader and friends, it&#039;s a better idea than the convolutions that would be required to try and make them work with async.

Vision-wise, my plan is for new account/message types to just exist at the gloda level and never touch the &#039;skink&#039; level, as you so dub it.  The work to support that is under way and not proven yet, so nothing is set in stone.  Functionality developed at the skink level should still be able to be lofted to the gloda level as will continue to be the case for POP/IMAP for at least the medium term.</description>
		<content:encoded><![CDATA[<p>Cool!</p>
<p>You can use SQLite synchronously via mozStorage if you want.  It&#8217;s only a serious problem when you have potentially long-running operations.  As long as you stay away from using the full-text search mechanism or complex queries you should be sufficiently fine.</p>
<p>Note that I&#8217;m not suggesting that it&#8217;s a good idea long term, but if your goal is to work with nsMsgDBView and existing message reader and friends, it&#8217;s a better idea than the convolutions that would be required to try and make them work with async.</p>
<p>Vision-wise, my plan is for new account/message types to just exist at the gloda level and never touch the &#8216;skink&#8217; level, as you so dub it.  The work to support that is under way and not proven yet, so nothing is set in stone.  Functionality developed at the skink level should still be able to be lofted to the gloda level as will continue to be the case for POP/IMAP for at least the medium term.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

