<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Pursuit of Simplicity</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.adobe.com/simplicity/atom.xml" />
    <id>tag:blogs.adobe.com,2009-08-03:/simplicity//132</id>
    <updated>2009-11-13T23:04:46Z</updated>
    <subtitle>Oliver Goldman on Adobe AIR</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.261</generator>

<entry>
    <title>Upcoming Certificate Renewal Changes in Adobe AIR</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/11/upcoming_certificate_renewal_c.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.44079</id>

    <published>2009-11-13T22:57:11Z</published>
    <updated>2009-11-13T23:04:46Z</updated>

    <summary>AIR currently secures application updates published with renewed certificates by comparing the publisher ID computed from the old and new certificates. If the publisher IDs are identical the update is allowed; otherwise, it&apos;s not. Recently we&apos;ve been made aware that...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="security" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>AIR currently secures application updates published with renewed certificates by comparing the publisher ID computed from the old and new certificates. If the publisher IDs are identical the update is allowed; otherwise, it's not.</p>

<p>Recently we've been made aware that the publisher ID computation is flawed in ways that make it quite likely that renewed certificates will not have identical publisher IDs. These range from the trivial to the unresolvable:</p>

<ul>
<li>In one case, an original certificate contained a typo in the publisher's identity. This was corrected in the renewal. However, the publisher ID computation requires that the publisher's identity matches exactly.</li>
<li>In another case, similar, key information changed--but in one of the intermediate certificates in the certificate chain. The change was legitimate, but again fell outside the scope of changes that the publisher ID computation allows.</li>
<li>In perhaps the most serious issue, the publisher ID algorithm requires that the root certificate in the certificate chain be identical across renewals. Root certificates are typically valid for 20 years or more, so this was not anticipated as a serious limitation. However, many root certificates will be retired in the next few years in favor of certificates with longer key lengths--long before they expire.</li>
</ul>

<p><br />
If you've run into this situation, you should use the <a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff0.html#WSFAB6E5EB-316A-42b0-81A3-0BC232ACD99A">migration signature feature</a>, which was first added in AIR 1.1. It was originally designed to allow secured updates across unrelated certificates (i.e., not renewals). As a general purpose mechanism, however, it also works just as well with renewals, whether or not they run into this issue.</p>

<p>There are, however, two drawbacks to the migration signature mechanism:</p>

<ol>
<li>You have to use the mechanism <em>before</em> your old certificate expires. Certificate renewals are often issued only after the previous certificate has expired.</li>
<li>When you migrate between certificates your publisher ID changes. Among other things, this causes the application to lose access to any data stored in the EncryptedLocalStore.</li>
</ol>

<p>This is an unfortunate turn of events for a feature that was designed to make things easier, and we apologize for the trouble all of this has caused. To address these issues, we will be making two significant changes in an otherwise minor release of AIR. This release is currently scheduled for December. The changes are:</p>

<ol>
<li>Applications will use a specified, not computed, publisher ID. This will allow them to change certificates without losing access to existing data.</li>
<li>For purposes of changing certificates, certificates will be accepted as valid for six months after they expire. This allows plenty of time to renew and update the application.</li>
</ol>

<p>Further details will be made available in conjunction with the upcoming release. </p>]]>
        
    </content>
</entry>

<entry>
    <title>MAX 2009 Follow-up</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/10/max_2009_follow-up.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.43617</id>

    <published>2009-10-19T16:22:56Z</published>
    <updated>2009-10-19T16:26:42Z</updated>

    <summary>Just a quick note to point out that my MAX 2009 talk on AIR distribution and deployment is now available on Adobe TV. Admittedly t&apos;s more like slides-with-a-voice-over than what one would traditionally call &quot;TV&quot;. Oh well. Took some great...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MAX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Just a quick note to point out that my MAX 2009 talk on AIR distribution and deployment is now <a href="http://tv.adobe.com/watch/max-2009-develop/explore-deployment-and-distribution-options-for-adobe-air-applications/">available on Adobe TV</a>. Admittedly t's more like slides-with-a-voice-over than what one would traditionally call "TV". Oh well.</p>

<p>Took some great questions from the audience during the talk. If you have further questions, please post a comment or drop me an email. (My email address is in the last slide of the presentation.)<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Object Graphs, the GC, and System.disposeXML()</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/09/object_graphs_the_gc_and_syste.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.43221</id>

    <published>2009-09-28T22:18:25Z</published>
    <updated>2009-09-28T22:47:29Z</updated>

    <summary>AIR 1.5.2 contains a new, performance-related API that heavy users of XML may find handy, System.disposeXML(), that is an instructive example regarding use (and abuse) of the AIR garbage collector. When an XML document is loaded, it&apos;s stored in memory...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR 1.5.2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="performance" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>AIR 1.5.2 contains a new, performance-related API that heavy users of XML may find handy, System.disposeXML(), that is an instructive example regarding use (and abuse) of the AIR garbage collector.</p>

<p>When an XML document is loaded, it's stored in memory as a graph of individual objects representing elements, text, attributes, and so on. Each pair of related objects--for example, a parent/child element parent--are linked, in the underlying representation, with pointers going in both directions.</p>

<p>This is a convenient representation for traversal, but can be problematic for the garbage collector. As I mentioned in my earlier post about <a href="http://blogs.adobe.com/simplicity/2009/07/as_objects_are_reference_counted.html">referencing counting and ActionScript objects</a>, the garbage collector <em>will</em> eventually find and discard the entire set of objects after the last external reference is removed. However, it takes more work for the GC than less-connected data structures.</p>

<p>In practice, the amount of time it takes the garbage collector to do its job is related both to the number of allocated objects and the number of pointers between them. So while it is nice that the GC is capable of finding even these highly-connected graphs of objects, using them is also asking it do a lot of work. You can reduce this workload by explicitly  disconnecting the pointers between objects.</p>

<p>For graphs of ActionScript objects, you can ease the GC workload by simply nulling out reference between the objects. <em>Note that you don't have to find every last reference for this to be helpful.</em> The GC will still do it's job in the end, and every bit of clearing references helps. For ActionScript objects this can be particularly helpful because, if their reference count then goes to zero, they can be cleaned up even before the GC sweep completes.</p>

<p>XML objects are a trickier case because the API doesn't allow developers to traverse the actual object graph. That's where System.disposeXML() comes in: It traverses the internal object graph backing the XML object, setting all of the internal points to null. Afterwords, the XML object is empty and, presumably, useless. But then, since you were done with it anyway, that shouldn't be a problem.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Find Out About New AIR Deployment Options at MAX 2009</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/09/find_out_about_new_air_deploym.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.43134</id>

    <published>2009-09-25T19:34:02Z</published>
    <updated>2009-09-25T19:42:25Z</updated>

    <summary>MAX wouldn&apos;t be half as exciting without new stuff to announce, and this year there will be plenty of news. And while developers tend to focus mostly on new APIs when we think about updates to AIR, there are some...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MAX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>MAX wouldn't be half as exciting without new stuff to announce, and this year there will be plenty of news. And while developers tend to focus mostly on new APIs when we think about updates to AIR, there are some new deployment options coming, too--options that may enable key new scenarios for some applications. I'll be talking about these new options as well as providing an overview of the existing optios at my <a href="https://max.adobe.com">MAX 2009</a> session, "Explore Deployment and Distribution Options for Adobe AIR Applications".</p>]]>
        
    </content>
</entry>

<entry>
    <title>Why AIR fetches a Thawte CRL no matter who signed your app</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/09/why_air_fetches_a_thawte_crl_n.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.43092</id>

    <published>2009-09-23T17:18:07Z</published>
    <updated>2009-09-23T17:29:33Z</updated>

    <summary>I was recently asked why AIR fetches a Thawte CRL (from http://tss-geotrust-crl.thawte.com/ThawteTimestampingCA.crl) every time an application is installed--even if the application was signed with a certificate from another CA. It turns out there is a good reason for this, and...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="security" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>I was recently asked why AIR fetches a Thawte CRL (from http://tss-geotrust-crl.thawte.com/ThawteTimestampingCA.crl) every time an application is installed--even if the application was signed with a certificate from another CA. It turns out there is a good reason for this, and the clue is in the URL itself.</p>

<p>By default, all AIR application signatures are timestamped. Timestamps are created by a timestamp server, and are themselves signatures. When AIR validates the timestamp signature, it downloads the CRL associated with the timestamp signing certificate--just like it would when validating any other signature. And the Thawte timestamp server uses a certificate that--no surprise here--has a CRL hosted by Thawte.</p>

<p>This default is easy to override using the "-tsa" option to the AIR file packaging tool, adt. A value of "-tsa none" turns off timestamps entirely. To specify an alternate timestamp server, specify the URL of that server after the -tsa flag.</p>

<p>For more on AIR code signing, including why timestamping is used, take a look at <a href="http://www.ddj.com/web-development/210004209">Code Signing in Adobe AIR</a>.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Downloading Historical Adobe AIR Releases</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/09/downloading_historical_adobe_a.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.43004</id>

    <published>2009-09-19T00:56:13Z</published>
    <updated>2009-09-19T01:01:38Z</updated>

    <summary>Interested in checking behavior of an older release of AIR? Or perhaps checking out how seamlessly we effect the upgrade to a newer version? You can download installers for the older releases if you know where to look: Mac OS:...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Interested in checking behavior of an older release of AIR? Or perhaps checking out how seamlessly we effect the upgrade to a newer version? You can download installers for the older releases if you know where to look:<br />
<ul><br />
<li>Mac OS: http://airdownload.adobe.com/air/mac/download/&lt;version&gt;/AdobeAIR.dmg<br />
<li>Windows: http://airdownload.adobe.com/air/win/download/&lt;version&gt;/AdobeAIRInstaller.exe<br />
<li>Linux: http://airdownload.adobe.com/air/lin/download/&lt;version&gt;/AdobeAIRInstaller.bin<br />
</ul></p>

<p>Substitute an actual version string in place of "&lt;version&gt;", i.e, "1.5" or "1.5.2".</p>]]>
        
    </content>
</entry>

<entry>
    <title>Preventing ESC in Full Screen Interactive</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/08/preventing_esc_in_full_screen.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.42489</id>

    <published>2009-08-24T18:07:21Z</published>
    <updated>2009-09-28T22:17:14Z</updated>

    <summary>Penultimate post on the AIR 1.5.2 update: Prior to AIR 1.5.2, if a user hit the escape key when an application was running in fullScreen or fullScreenInteractive, the application would be forced out of full screen mode. This remains the...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR 1.5.2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Penultimate post on the AIR 1.5.2 update: Prior to AIR 1.5.2, if a user hit the escape key when an application was running in fullScreen or fullScreenInteractive, the application would be forced out of full screen mode. This remains the intended behavior for fullScreen, but was a defect in the implementation of fullScreenInteractive.</p>

<p>Starting with AIR 1.5.2, hitting escape causes fullScreenInteractive to exit by default <strong>but</strong> the behavior can be canceled by calling preventDefault() on the keydown event. Applications that use full screen to keep users (perhaps kids) from too easily leaving the application may find this change useful. As always, remember to update your namespace to take advantage of this new behavior.</p>]]>
        
    </content>
</entry>

<entry>
    <title>SWFs in HTML in Transparent Windows in AIR 1.5.2</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/08/swfs_in_html_in_transparent_wi.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.42465</id>

    <published>2009-08-21T19:38:43Z</published>
    <updated>2009-09-28T22:16:58Z</updated>

    <summary>One of the admittedly more annoying limitations of the Adobe AIR HTMLLoader implementation is that it does not render SWFs embedded in the HTML when displayed in a transparent window. In AIR 1.5.2, this restriction has been partially lifted. The...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR 1.5.2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>One of the admittedly more annoying limitations of the Adobe AIR HTMLLoader implementation is that it does not render SWFs embedded in the HTML when displayed in a transparent window. In AIR 1.5.2, this restriction has been partially lifted.</p>

<p>The problem arises because, by default, Flash Player renders content into a separate window that is positioned on top of the correct location relative to the underlying HTML. This is the original browser rendering for plug-ins. It's straightforward, but makes it impossible for the rendered plug-in content to participate in the blending of the transparent window's contents against whatever lies behind the window.</p>

<p>Flash Player has for some time offered alternate rendering models in which the contents are drawn as part of the HTML content instead of as a separate window. This allows the content to be covered by HTML elements--drop down menus, for example. These modes are accessed by setting the "wmode" parameter to "transparent" or "opaque". See <a href="http://kb2.adobe.com/cps/155/tn_15523.html">this Tech Note</a> for details.</p>

<p>Prior to AIR 1.5.2, the HTMLLoader refused to display any SWF when it was inside a transparent window in order to avoid the incorrect rendering that would otherwise result. Starting with 1.5.2, the wmode of the content is inspected. If the wmode is "window"--the default value--the content can still not be rendered correctly, and the old behavior still applies. However, if the wmode is "transparent" or "opaque", the SWF <em>will</em> be rendered and, because it is rendered into the HTML content, will correctly participate in the window transparency.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Using LocalConnection Reliably</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/08/using_localconnection_reliably.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.42360</id>

    <published>2009-08-16T04:08:19Z</published>
    <updated>2009-08-16T04:19:21Z</updated>

    <summary>Following up on my previous post about changes to LocalConnection in AIR 1.5.2, I thought I&apos;d post some further information about how LocalConnection operates. Although definitely in the realm of implementation detail, it&apos;s critical to know if you want to...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Following up on my previous post about <a href="http://blogs.adobe.com/simplicity/2009/08/localconnectionisperuser-in-ai.html">changes to LocalConnection in AIR 1.5.2</a>, I thought I'd post some further information about how LocalConnection operates. Although definitely in the realm of implementation detail, it's critical to know if you want to use LocalConnection in a reliable fashion. To the best of my knowledge, the following applies to all versions of LocalConnection to date.</p>

<p>LocalConnection operates via a shared memory segment that contains a list of endpoints listening for messages, plus a buffer in which messages can be queued up. All clients using LocalConnection periodically poll the segment, removing any messages for which they are the recipient and enqueueing any new messages they wish to send.</p>

<p>Clients that exit gracefully will remove themselves from the endpoint list during shutdown. However, to avoid a crashed client clogging up the segment with undeliverable messages, endpoints (and associated messages) are timed out by the other clients. Basically, any client that finds old messages queued up, thus indicating an unresponsive endpoint, removes that endpoint and associated messages from the segment. "Old" is defined as a few seconds.</p>

<p>This heuristic for detecting crashed clients can be tripped up by clients that merely become unresponsive--i.e. are in a tight loop in ActionScript--for too long. When this happens, the client's endpoint is closed even though the client itself is still running. After this, the client can no longer receive any messages destined for that endpoint. Note that there are two things that have to happen to get into this situation: the listener has (1) to be unresponsive for a "long" time while (2) simultaneously having LocalConnection messages sent to it.</p>

<p>Clearly, the implementation could be modified to avoid this issue, and you certainly shouldn't depend on this behavior. Still, I hope that knowing about this issue might help you avoid it by keeping your applications responsive. Keeping applications responsive is, of course, a good thing in any case.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>LocalConnection.isPerUser in AIR 1.5.2</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/08/localconnectionisperuser_in_ai.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.42239</id>

    <published>2009-08-11T21:14:30Z</published>
    <updated>2009-09-28T22:17:47Z</updated>

    <summary>New to the AIR 1.5.2 release (and the corresponding Flash Player, 10.0.32) is the LocalConnection.isPerUser property. Note that you&apos;ll need to update your application&apos;s namespace to .../1.5.2 to access this property. Here&apos;s why you should do that. LocalConnection provides local...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR 1.5.2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Mac OS" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="design decisions" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="security" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>New to the AIR 1.5.2 release (and the corresponding Flash Player, 10.0.32) is the LocalConnection.isPerUser property. Note that you'll need to update your application's namespace to .../1.5.2 to access this property. Here's why you should do that.</p>

<p>LocalConnection provides local (i.e., on the same machine) communication between SWFs and AIR applications. It operates via a shared memory segment that's visible to all processes that use the mechanism.When LocalConnection was first implemented on Mac OS, it used a memory segment that is visible to all processes running on the machine. This was reasonable at the time, but problematic now that Mac OS is a multi-user operating system. The unfortunate result is that LocalConnection can be used to communicate across user accounts on Mac OS.</p>

<p>To address this a new, per-user implementation has been implemented on Mac OS. You should always use this mode; it's safer. To do that, set LocalConnection.isPerUser = true on <em>every</em> LocalConnection object you create.</p>

<p>Unfortunately, AIR can't do this for you transparently. The problem is that, if it did, you could get into a situation where version skew breaks use of LocalConnection. For example, this can occur if an application is running on AIR 1.5.2 and attempts to communicate with a SWF in the browser running on Flash Player 9. Until both sides are updated, there's no way to use the isPerUser = true option. By adding an API and making this an option, we've given you a chance to migrate to this option without breaking anything along the way.</p>

<p>This issue is specific to Mac OS. Windows and Linux use a user-scoped LocalConnection in all cases, regardless of the isPerUser setting. You can safely set LocalConnection.isPerUser = true everywhere and be confident that the Windows and Linux behavior won't change.</p>

<p>Final note: The <em>default</em> setting of this property is likely to change to true in a future release, in order to be consistent with our general philosophy of defaulting to safe behavior.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Pauses When Using ELS and DRM APIs</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/08/pauses_when_using_els_and_drm.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.42183</id>

    <published>2009-08-06T06:48:01Z</published>
    <updated>2009-08-06T07:04:33Z</updated>

    <summary>Lately I&apos;ve fielded a couple of different queries about long pauses in applications using the EncryptedLocalStore (ELS) and DRM capabilities in Adobe AIR. Two questions on the same topic in one week is usually a good indication that some additional...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="API tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Mac OS" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="design decisions" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Lately I've fielded a couple of different queries about long pauses in applications using the EncryptedLocalStore (ELS) and DRM capabilities in Adobe AIR. Two questions on the same topic in one week is usually a good indication that some additional explanation is required, so here it is.</p>

<p>As you are probably aware, AIR applications are protected during deployment by digital signatures. These signatures are checked at installation time in order to verify that the application has not been tampered with and, when possible, to reliably display the application's publisher.</p>

<p>The signatures are preserved by the installation process but are not normally checked when an application is running. However, there are two exceptions to this: the signature <emph>is</emph> validated when the application uses the ELS or DRM APIs. This is done to prevent attacks on the application's protected data that operate by modifying the application itself--any such modification would invalidate the signature.</p>

<p>When we designed this mechanism, we targeted applications in the 1 MB to 10 MB size range. This is important because checking the signature requires computing hashes over the entire application. For these sizes we determined that we could compute hashes over the entire application without significant delay, and so we went with the straightforward implementation that does just that. Larger applications, however--and I've seen examples of applications over 1 GB in size--will suffer painful delays during these signature validation pauses.</p>

<p>Our current recommendation is that you avoid making applications this big. That may sound trite, but every large application I've seen so far was that big because it included assets, such as videos, that consumed the majority of the space. Moving these kinds of non-code-containing assets out of the application itself--for example, downloading them separately into the application storage directory--is a straightforward way to reduce the application to a tractable size.</p>

<p>For completeness, I'll note that it is possible to design a validation mechanism that works incrementally. For example, Mac OS uses a clever scheme that hashes each page of the executable separately; the kernel can then amortize validation cost across each page as it is first referenced. (If the page is never referenced, it doesn't matter if it has been modified.) At this time, however, we have no plans to adopt such a scheme for AIR.</p>

<p>One final note: This signature validation usually occurs just once, the first time either the  ELS or DRM capabilities are used. However, if you set "stronglyBound" to true when using the ELS API, signature validation will occur on every access. I don't recommend using this stronglyBound feature, for this and other reasons.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Revised AIR 1.5.2 Application Install Experience</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/07/revised_air_152_install_experi.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.41909</id>

    <published>2009-07-30T20:50:48Z</published>
    <updated>2009-09-28T22:18:09Z</updated>

    <summary>The Adobe AIR 1.5.2 release is now available. There are relatively few changes in it, given that it&apos;s a minor release, but I&apos;ll nonetheless be posting a few entries about the more interesting changes. Perhaps most interesting of all is...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR 1.5.2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>The Adobe AIR 1.5.2 release is <a href="http://get.adobe.com/air/">now available</a>. There are relatively few changes in it, given that it's a minor release, but I'll nonetheless be posting a few entries about the more interesting changes.</p>

<p>Perhaps most interesting of all is that we've revised the much-loved <a href="http://blogs.adobe.com/simplicity/2008/05/airs_unrestricted_system_access_warning.html">unrestricted system access warning</a> that's displayed during application install. I think you'll be pleased with the new design:</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="AIR1.5.2RevisedPublisherPanel.png" src="http://blogs.adobe.com/simplicity/2009/07/30/AIR1.5.2RevisedPublisherPanel.png" width="479" height="292" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>Please note that this change applies only to applications signed with certificates that are trusted on the targeted machine. I hope you'll find some comfort in knowing that we do, indeed, listen to--and appreciate--your feedback.</p>]]>
        
    </content>
</entry>

<entry>
    <title>MAX 2009: AIR Deployment and Distribution Options</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/07/max_2009_air_deployment_and_di.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.11397</id>

    <published>2009-07-15T05:56:58Z</published>
    <updated>2009-09-25T19:43:51Z</updated>

    <summary>At this year&apos;s MAX conference I&apos;ll be speaking on deployment and distribution options for AIR applications. Here&apos;s the description: Learn how to get your AIR applications to your users and how to keep them up to date. We will discuss...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MAX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>At this year's <a href="http://max.adobe.com">MAX conference</a> I'll be speaking on deployment and distribution options for AIR applications. Here's the description:<br />
<blockquote><br />
Learn how to get your AIR applications to your users and how to keep them up to date. We will discuss important considerations for distribution on the Internet or an intranet, including impacts on your auto-update mechanism. We will cover existing deployment options such as badge installation and IBM Tivoli support. Finally, we will explore the new deployment options that will be available in Adobe AIR 2, including the native installer support required to use some of the advanced new AIR 2 APIs.<br />
</blockquote><br />
My favorite part of MAX is hearing directly from you. If you're there, I hope you'll stop by and say hello.</p>]]>
        
    </content>
</entry>

<entry>
    <title>ActionScript Objects are Reference-Counted</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/07/as_objects_are_reference_counted.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.11368</id>

    <published>2009-07-10T04:06:49Z</published>
    <updated>2009-07-10T05:39:49Z</updated>

    <summary>One of the most under-appreciated aspects of ActionScript memory management is that ActionScript objects are not just garbage collected; they are also reference counted. When their reference count hits zero, they are immediately freed. This happen irrespective of the state...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="performance" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>One of the most under-appreciated aspects of ActionScript memory management is that ActionScript objects are not just garbage collected; they are also reference counted. When their reference count hits zero, they are immediately freed. This happen irrespective of the state of the garbage collector.</p>

<p>For example, suppose you were to monitor memory use as you stepped through the following lines of code:</p>

<pre>
var buffer:ByteArray = new ByteArray();
buffer.length = 100 * 1024 * 1024;
buffer = null;
</pre>

<p>This code creates a 100 MB buffer, then discards the reference to it. After the second line executes, you'll see memory use grow by 100 MB. (Using such a large number is convenient because it makes the results really obvious in your monitoring tool.) After the third line, however, you'll see memory use drop back down immediately.</p>

<p>(Caveat: Monitoring memory use can be tricky in its own right, and you need to make sure you're monitoring the correct measurements to see this effect. See <a href="http://www.adobe.com/devnet/air/articles/air_performance.html">Performance Tuning AIR Applications</a> for more about how to monitor memory use.)</p>

<p>Despite this quick-cleanup capability, it often seems like the memory use of a given application tends to creep up over time. There are two major reasons for this.</p>

<p>First, it's quite common in ActionScript programming that objects are connected—that is, have references to each other—in cycles. When a graph of objects contains a cycle it prevents the reference counts from going to zero even if the entire graph is itself unreferenced. The garbage collector will ultimately sort out the situation and free these objects, but it can take a while, and in the meantime the memory remains in use.</p>

<p>The second possibility is that there's a "leak", which is to say there's an unintended reference to an object that is, at least logically, no longer in use. These objects simply can't be freed: they have a non-zero reference count and, because they are referenced, won't be collected, either.</p>

<p>You can combat the first issue (cycles) and help uncover instances of the second (leaks) by eliminating cycles in object graphs when discarding references to them. More about this in upcoming posts.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Upgrade Codes, Product Codes, and Silent AIR Application Uninstall</title>
    <link rel="alternate" type="text/html" href="http://blogs.adobe.com/simplicity/2009/05/upgrade_codes_product_codes_and_silent_uninstall.html" />
    <id>tag:blogs.adobe.com,2009:/simplicity//132.10438</id>

    <published>2009-05-07T23:12:15Z</published>
    <updated>2009-05-07T23:12:47Z</updated>

    <summary>Those who sign up for the Adobe AIR redistribution license have had the ability to silently install and uninstall AIR applications since the AIR 1.0 release. Unfortunately, the silent uninstall support on Windows is a bit rough. I&apos;ve included below...</summary>
    <author>
        <name>Oliver Goldman</name>
        <uri>http://blogs.adobe.com/simplicity/</uri>
    </author>
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Windows" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="enterprise" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="install &amp; update" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="tools" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.adobe.com/simplicity/">
        <![CDATA[<p>Those who sign up for the <a href="http://blogs.adobe.com/simplicity/2008/02/redistributing_air_10.html">Adobe AIR redistribution license</a> have had the ability to silently install and uninstall AIR applications since the AIR 1.0 release. Unfortunately, the silent uninstall support on Windows is a bit rough. I've included below a link to a utility I wrote that eases the problem a bit. But first, a little background on the issue.</p>

<p>When an AIR application is installed on Windows, it's installed via <a href="http://en.wikipedia.org/wiki/Windows_Installer">Windows Installer</a>. This is a good thing; it allows leveraging all the capabilities of Windows Installer. For example, silently uninstalling an AIR application on Windows can be accomplished directly via the "msiexec" utility that is part of Windows. All you need to provide to msiexec is the <i>product code</i> of the application.</p>

<p>AIR applications don't inherently contain product codes—they're specific to Windows Installer—and you won't, for example, find one in your application descriptor. Furthermore, Windows Installer requires that product codes change—even for the same application—under certain circumstances. In order to play it safe, AIR generates a unique product code for each version of your application. This, in turn, means you need to know the product code associated with the specific installed version of the application in order to uninstall it. This is a hassle.</p>

<p>Fortunately, Windows Installer also associates an <i>upgrade code</i> with each application. An upgrade code is basically an application identifier that <i>never</i> changes and, given an upgrade code, you can look up the corresponding product code. The mapping from upgrade code to product code is stored in the registry at application install time. Like product codes, AIR generates an upgrade code for your application. Unlike product codes, upgrade codes are the same across all versions of your application and are easily determined via the OSID application that comes with the redistribution support.</p>

<p>Unfortunately, the only way to look up that mapping is via the MsiEnumRelatedProducts() system call, and the msiexec utility won't do it for you. (Theoretically you can look this mapping up yourself in the registry, but that turns out to be fairly complicated, and I'm not sure it can be done reliably.)</p>

<p>How much of a problem this is depends on the uninstall technology you're using, whether or not it can perform this lookup for you, and whether or not you're in a position to write a few lines of C code to perform the lookup. For anyone out of luck on all counts—or just curious—I've written a small utility called "msiu2p". You can <a href="https://share.acrobat.com/adc/document.do?docid=82557826-2f67-45ce-97e4-0dc66a331193">download msiu2p here</a>. (The zip package includes the executable and the source.)</p>

<p>Here's an example:<br />
<pre>c:\ msiu2p {8DA920D5-C41C-42E0-BF31-87BA49984EE4}<br />
{A2BCA9F1-566C-4805-97D1-7FDC93386723}<br />
c:\<br />
</pre></p>

<p>Of course this isn't useful just for AIR applications, either: It's a handy complement to msiexec for any application using Windows Installer.</p>

<p>We plan to improve AIR's intrinsic support for this kind of thing in an upcoming release. In the meantime, I hope this utility will help fill the gap for those who need it.</p>]]>
        
    </content>
</entry>

</feed>
