<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>70's Futurisitic Technology</title>
	<atom:link href="http://ozten.com/psto/feed/" rel="self" type="application/rss+xml" />
	<link>http://ozten.com/psto</link>
	<description>Programming focused drivel</description>
	<lastBuildDate>Thu, 29 Mar 2012 22:32:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IUSEA and U Should too&#8217;a</title>
		<link>http://ozten.com/psto/2012/03/29/iusea-and-u-should-tooa/</link>
		<comments>http://ozten.com/psto/2012/03/29/iusea-and-u-should-tooa/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 22:32:37 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[IUSEA]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=581</guid>
		<description><![CDATA[I want to share a new architectural pattern for web applications and services that Mozilla has been using to empower the user and put them back in control of their data and their web.
An Example

I use&#8217;a the Gmail,
I use&#8217;a the LinkedIn,
Why they no&#8217;a work&#8217;a together? &#8212; Mario
Well Mario, if Google and LinkedIn used the IUSEA [...]]]></description>
			<content:encoded><![CDATA[<p>I want to share a new architectural pattern for web applications and services that Mozilla has been using to empower the user and put them back in control of their data and their web.</p>
<h2>An Example</h2>
<p><img src="https://camo.githubapp.com/630a1c9a79ff0f4d94d38637f52e1a0e1434e06f/687474703a2f2f6f7a74656e2e636f6d2f72616e646f6d2f6d6172696f5f676d61696c5f6c696e6b6564696e2e6a7067" align="right"></p>
<blockquote><p>I <strong>use&#8217;a</strong> the Gmail,<br />
I <strong>use&#8217;a</strong> the LinkedIn,<br />
Why they no&#8217;a work&#8217;a together? &#8212; Mario</p></blockquote>
<p>Well Mario, if Google and LinkedIn used the IUSEA pattern, they would!</p>
<ol>
<li>Mario&#8217;s browser requests <code>https://gmail.com/email/compose</code>
</li>
<li>That page includes a script tag to <code>https://linkedin.com/contacts_include.js</code>
</li>
<li>Mario starts typing &#8216;Al&#8217; in the To: field</li>
<li>Gmail&#8217;s JavaScript calls <code>LinkedIn.autocompleteContact('Al')</code>
</li>
<li>If Mario&#8217;s session with LinkedIn.com has timed out, he is prompted to login in a new window. This is the same login screen as he sees everyday</li>
<li>LinkedIn asks Mario if he wants to expose his contacts</li>
<li>Mario clicks yes</li>
<li>Gmail receives rich contact data for Al and Alice, including a picture, degrees of seperation from Mario, etc</li>
<li>Gmail uses this rich data to improve their contact picker</li>
<li>Mario clicks Alice and finishes writing his email</li>
</ol>
<p><strong>IUSEA</strong> &#8211; <strong>Intentional</strong> User Service <strong>Exposure</strong> Architecture</p>
<p>If your building a web application or service, you should continue to provide REST APIs for public data, but user data should be exposed via IUSEA where possible.</p>
<h2>Technical Details</h2>
<p>LinkedIn&#8217;s <code>contacts_include.js</code> defined a <code>autocompleteContact</code> function. How is it implemented?</p>
<p>It <a href="https://github.com/mozilla/jschannel">opens a hidden iframe to </a><code>https://linkedin.com</code> and uses a <code>postMessage</code> based protocol to ask for contacts that have a first, last name, or email that start with &#8216;Al&#8217;.</p>
<p>LinkedIn.com hosts a page that is the iframe&#8217;s target. It authenticates the user, makes sure the user wants to expose this information, and delivers the data back Gmail via <code>postMessage</code>.</p>
<p>This pattern is <a href="http://caniuse.com/#search=postmessage">ready today</a> and works across Browsers, OS, Desktop, and Mobile. Mozilla&#8217;s <a href="https://github.com/mozilla/jschannel">jschannels</a> library is an easy way to rock this, even on IE.</p>
<h2>Isn&#8217;t this just OAuth?</h2>
<p>As a developer, your thinking &#8220;Congrats, you&#8217;ve re-invented the OAuth wheel.&#8221;</p>
<p>OAuth is about server to server data sharing:<br />
<img src="https://camo.githubapp.com/67eabd705ba459056bc29af48a5723cf9d967dd3/687474703a2f2f6f7a74656e2e636f6d2f72616e646f6d2f4f417574682e6a7067"></p>
<p>Value in this diagram means value for the user and the service provider, such as a user&#8217;s contacts.</p>
<p>IUSEA puts the user back into the center. Value resides in each server but also is controlled by the user and flows through the user at their discretion.</p>
<p><img src="https://camo.githubapp.com/cf2e31b717b7ff61b63304f19dda8a7c97541388/687474703a2f2f6f7a74656e2e636f6d2f72616e646f6d2f49555345412e6a7067"></p>
<h2>Business Details</h2>
<p>Did you notice that all happened in the browser? Technically, Gmail doesn&#8217;t need to upload this new LinkedIn data to their servers, since all the user benefit was provided directly in the Gmail web UI.</p>
<p>Going one step further, LinkedIn could provide this API with a TOS that forbids Gmail from importing this user data&#8230; wow.</p>
<p>Google can fulfill it&#8217;s mission to to organize the world&#8217;s information and make it universally accessible and useful. LinkedIn can fulfill it&#8217;s mission of connecting the world&#8217;s professionals to make them more productive and successful. The user wins as they gain more control of their data, while being able to reap the benefits across the web.</p>
<p>IUSEA (a term I made up to help explain this concept) is the secret sauce we&#8217;re applying liberally, and you can start using this pattern in your products.</p>
<p>IUSEA and U should too&#8217;a.</p>
<h2>Disclaimers, Image Credits</h2>
<ul>
<li>Nintendo, Google, and LinkedIn don&#8217;t have anything to do with each other and the example is hypothetical.
</li>
<li>
<a href="http://www.veryicon.com/icons/internet--web/ukrainian-motifs/male-user.html">Male User Icon</a>
</li>
<li>Mario image is copyright Nintendo, Gmail for Google, and LinkedIn to LinkedIn.
</li>
<li>
<a href="http://dehamerspace.com/2009/04/27/the-ultimate-gmail-browser/">Gmail Fluid Icon</a>
</li>
<li>
<a href="http://www.flickr.com/photos/gesamtbild/3167026024/">LinkedIn Fluid Icon</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2012/03/29/iusea-and-u-should-tooa/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How the Node Based BrowserID Service Shipped 28 New Languages</title>
		<link>http://ozten.com/psto/2012/02/16/how-the-node-based-browserid-service-shipped-28-new-languages/</link>
		<comments>http://ozten.com/psto/2012/02/16/how-the-node-based-browserid-service-shipped-28-new-languages/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 19:32:55 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[browserid]]></category>
		<category><![CDATA[l10n]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=568</guid>
		<description><![CDATA[Our amazing community has localized the BrowserID service into 28 languages.

If you are a website who is using navigator.id to authenticate your users, you
don&#8217;t have to do anything special, your users will start having a better experience&#8230; today. 
Woah, that just happened.
I wanted to share a little bit about the people and the technology.
People
Mathjazz did [...]]]></description>
			<content:encoded><![CDATA[<p>Our amazing community has localized the BrowserID service into 28 languages.</p>
<p><a href="http://www.flickr.com/photos/ozten/6887635749/" title="browserid_zh-TW by oztenphoto, on Flickr"><img src="http://farm8.staticflickr.com/7176/6887635749_1e110e52c1_z.jpg" width="640" height="407" alt="browserid_zh-TW"></a></p>
<p>If you are a website who is using <code>navigator.id</code> to authenticate your users, <strong>you<br />
don&#8217;t have to do anything special</strong>, your users will start having a better experience&#8230; today. </p>
<p><strong>Woah, that just happened.</strong></p>
<p>I wanted to share a little bit about the <em>people</em> and the <em>technology</em>.</p>
<h2>People</h2>
<p><a href="http://horv.at/blog/browserid-for-the-rest-of-the-world/">Mathjazz</a> did a great job leading the l10n effort, with pike and milos also involved.</p>
<p>I&#8217;ve helped with 7 &#8220;from scratch&#8221; localizations at Mozilla and this was the smoothest yet. The l10n drivers have done a ton of work to make collaborating on websites and services better.</p>
<p>It&#8217;s not an easy task to help coordinate volunteer efforts. You can see everyone who is involved and what locales new locales are coming soon; check out our <a href="https://localize.mozilla.org/projects/browserid/">Verbatim</a>.</p>
<p><a href="http://www.flickr.com/photos/ozten/6887635735/" title="browserid_el by oztenphoto, on Flickr"><img src="http://farm8.staticflickr.com/7205/6887635735_fb31bf0c0a_z.jpg" width="640" height="406" alt="browserid_el"></a></p>
<h2>Technology</h2>
<p><img src="http://ozten.com/wordpress/wp-content/uploads/2012/02/nodejs.png" alt="Node.js Logo" title="Node.js Logo" width="212" height="114" class="alignright size-full wp-image-574" />With our launch, we&#8217;re probably unique in being a Node app at our scale with the breadth of languages supported. We use the express framework;<br />
doing l10n on Node is totally possible <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Under the guidance of l10n drivers, we&#8217;ve reused all of our standard web l10n practices. That means<br />
<a href="http://www.gnu.org/software/gettext/">Gettext</a> for strings and <a href="http://svn.mozilla.org/projects/l10n-misc/trunk/browserid/">SVN</a> for the locale directory (let us not speak of SVN again).</p>
<p>We used the following libraries and tools:</p>
<ul>
<li>
<a href="https://github.com/andris9/node-gettext">node-gettext</a> &#8211; server side string lookup from .mo files</li>
<li>GNU Gettext &#8211; string extraction, merging, etc</li>
<li>
<a href="translate.sourceforge.net/">Translate Toolkit</a> &#8211; podebug for debug locale</li>
</ul>
<p>We wrote <a href="https://github.com/mozilla/browserid/">the following bits</a>:</p>
<ul>
<li>Client side gettext library</li>
<li>Custom middleware for accept language, exposing gettext, etc</li>
<li>Various conversion scripts</li>
</ul>
<p>We do string lookups on both the server and the client side. In the browser, JSON blobs are minified and concatenated into our usual JavaScript bundle.</p>
<p>Having excellent Django codebases like <a href="https://github.com/mozilla/zamboni">zamboni</a> (<a href="https://addons.mozilla.org">AMO</a>) and <a href="https://github.com/mozilla/kitsune">kitsune</a> (<a href="http://support.mozilla.org">SUMO</a>) to reference was also really helpful.</p>
<p>We ran into a shocking low number of i18n bugs, given that Express and Node don&#8217;t have an officially blessed stack to do l10n on.</p>
<h2>A Call for Help</h2>
<p>This release also brought in many new contributors to the project porting Perl code, reporting bugs, and other new energy that is critical to the Mozilla project.</p>
<p>As with any release, there are things we didn&#8217;t have enough people to accomplish. We <a href="https://github.com/mozilla/browserid/issues?labels=good+first+bug&amp;sort=updated&amp;direction=desc&amp;state=open&amp;page=1">need your help!</a></p>
<ul>
<li>
<a href="https://github.com/mozilla/browserid/issues/1066">CSS Help</a> &#8211; Help support the visual design for RTL locales like Hebrew?</li>
<li>
<a href="https://github.com/mozilla/browserid/issues/1132">Tools Help</a> &#8211; More robust string extraction</li>
</ul>
<p>Thanks again to everyone involved in this release. If you are waiting to try integrating BrowserID &#8220;because it only works in English&#8221;, you&#8217;re running out of excuses <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Go migrate your site&#8217;s authentication today. Get your users off of passwords. With an additional 14 locales in the works, tomorrow promises to bring even friendlier auth flows.</p>
<p></article>
  </div>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2012/02/16/how-the-node-based-browserid-service-shipped-28-new-languages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Demystifying BrowserID and Mozilla&#8217;s LDAP backed webapps</title>
		<link>http://ozten.com/psto/2011/11/08/demystifying-browserid-mozilla-ldap-sites/</link>
		<comments>http://ozten.com/psto/2011/11/08/demystifying-browserid-mozilla-ldap-sites/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 05:41:52 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openldap]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=543</guid>
		<description><![CDATA[IT, Operations, Security and Webdev have prepared a BrowserID adoption plan for our LDAP directory. Questions come up frequently, so I wanted to capture the basics of the plan.
In terms of BrowserID adoption, there are three classes of Mozilla websites.

Many webapps that use MoCo&#8217;s LDAP instance for authentication and group permissions
Mozillians.org which uses a new [...]]]></description>
			<content:encoded><![CDATA[<p>IT, Operations, Security and Webdev have prepared a BrowserID adoption plan for our LDAP directory. Questions come up frequently, so I wanted to capture the basics of the plan.</p>
<p>In terms of BrowserID adoption, there are three classes of Mozilla websites.</p>
<ol>
<li>Many webapps that use MoCo&#8217;s LDAP instance for authentication and group permissions</li>
<li>Mozillians.org which uses a new community LDAP instance for auth and groups</li>
<li>Many more webapps that manage their own authentication (via MySQL or whatever)</li>
</ol>
<p>Number 3 has nothing to do with LDAP, so we can go <a href="https://wiki.mozilla.org/Identity/BrowserID/MozillaDogfood">dogfood BrowserID</a> on a case by case basis.</p>
<p>Classes 1 and 2 depend on LDAP and what that means is fairly confusing, so I wanted to clarify our current plan and where we are at.</p>
<h3>The Cast</h3>
<p>We all know the <a href="http://en.wikipedia.org/wiki/The_Frog_Prince_%28story%29">the Frog Prince</a> story.</p>
<p><strong>BrowserID</strong> is a <strong>lonely Princess</strong> as well as a protocol that gives the person currently using your webapp a way to disclose a verified email address.</p>
<p><strong>LDAP (aka slapd)</strong> is an <strong>unloved frog</strong> that moonlights as a backend database; it authenticates people and keeps track of who is in what group. It&#8217;s got some warts, but don&#8217;t be so superficial.</p>
<p><strong>sasl-browserid</strong> is the magical <strong>golden ball</strong>. Huh? Ya, blame the Brother&#8217;s Grimm.</p>
<p>When our princess drops the golden ball into the frog&#8217;s pond, poof, the frog transmogrifies into the princess&#8217; long sought after life-partner. And they live happily ever after&#8230; </p>
<p>Okay, <a href="https://github.com/ozten/sasl-browserid">sasl-browserid</a> is more of a C plugin than a mystical sphere, but whatever. This plugin <strong>BrowserID enables LDAP</strong>.</p>
<h3>Technical Details</h3>
<p>This will be short and painful, I promise.</p>
<h4>Before sasl-browserid</h4>
<ul>
<li>You enter your email address and password into a form</li>
<li>Middleware code does a <code>simple bind</code> with a shared account</li>
<li>Code does a <code>search</code> <code>filter</code>ing by your email address to find your <code>DN</code></li>
<li>Code does a second <code>simple bind</code> using your DN and password, attempting to authenticate on your behalf:
<ul>
<li>You are a known user with a good password</li>
<li>Or not so much</li>
</ul>
</li>
<li>More stuff happens.</li>
</ul>
<p><code>simple bind</code>, <code>search</code>, <code>filter</code> and <code>DN</code> are LDAP terms.</p>
<h4>After sasl-browserid</h4>
<ul>
<li>You click a link or button and do the BrowserID dance. Frontend code gets a BrowserID assertion and sends it to middleware.</li>
<li>Middleware code does a <code>sasl interactive bind</code> with your <code>assertion</code> and <code>audience</code></li>
<li>Code uses ldap&#8217;s <code>whoami</code><a href="#whoami">*</a> and checks the output
<ul>
<li>You are a known user in the system</li>
<li>You are an unknown user in the system</li>
</ul>
</li>
<li>More stuff happens</li>
</ul>
<p><code>sasl interactive bind</code> and <code>whoami</code> are also LDAP terms.</p>
<p><em>If that didn&#8217;t make your eyes glaze over</em>, there is more <a href="https://github.com/ozten/mozillians/blob/browserid/docs/browserid.rst">gnarly details and an architectural diagram here</a>.</p>
<p>What changed between before and after BrowserID? The authentication mechanism. What usually doesn&#8217;t change? The authorization and business logic of an application. Both sections have a &quot;More stuff happens&quot; section which means the goodness your app does and the permissions your users have, usually just continue to work.</p>
<p>We <strong>do not have to re-write</strong> our internal <strong>apps</strong> to take advantage of <strong>BrowserID</strong>.</p>
<h3>Deployment Plan</h3>
<p>sasl-browserid is getting a thorough review from the platform security team. In particular, David Chan has been doing a <strong>kick-ass job</strong> of finding flaws and ways to improve it.</p>
<p>Once it is ready, we&#8217;ll deploy it to development stage servers (next week or two).</p>
<p>But which app should we start with?</p>
<p>Our MoCo LDAP powers many, many Mozilla tools. This is beyond just web applications and bleeds into Desktop, command-line, and other uses; <a href="https://mozillians.org/en-US/u/efdbf2bdbd">Reed&#8217;s</a> biological functions are literally regulated by MoCo LDAP. It&#8217;s got both critical and sensitive information, so we have to be careful, but luckily we&#8217;ve also resently launched&#8230;</p>
<p><a href="http://mozillians.org">Mozillians.org</a> also has a LDAP server backend. It has a lower risk profile, so we&#8217;ll deploy to it first. It&#8217;s lower risk for a bunch of reasons, including:</p>
<ul>
<li>Smaller, newer, fresher</li>
<li>If it falls over, it won&#8217;t block Firefox development or othe critical Mozilla processes</li>
<li>It has a dedicated team to monitor, diagnose, and fix any issues sasl-browserid introduces</li>
</ul>
<p>The current plan is to BrowserID enable mozillians.org in it&#8217;s 1.2 release (3-5 weeks out). This will give us experience with sasl-browserid. Once it has proven itself production ready&#8230;</p>
<p>We&#8217;ll add the plugin to MoCo LDAP. We&#8217;ll update the <strong>internal phonebook&#8217;s</strong> PHP code. We&#8217;ll test, deploy, wait and see. </p>
<p>If that goes well, then all the other LDAP backed webapps can follow.</p>
<h3>Summary</h3>
<blockquote><p>and gentleman&#8230; I use the acronym LDAP with all due respect for the Fear and Loathing I&#8217;m sure it provokes in each and every one of you&#8230;</p></blockquote>
<p>We&#8217;ve made an organizational commitment (training, hiring, etc) to improving our ability to maintain our aging LDAP infrastructure. Jabba and Corey have done a top-notch job of revamping the MoCo LDAP, so it&#8217;s a sustainable sub-system.</p>
<p>We can adopt BrowserID without throwing away MoCo&#8217;s LDAP backend by utilizing sasl-browserid.</p>
<h3>Questions/Answers</h3>
<ul>
<li>This will not eliminate passwords from LDAP. Someone figure that part out, please.</li>
<li>This plugin doesn&#8217;t automagically convert your webapp to BrowserID. Some additional coding is required</li>
<li>Technically, this is not Single Sign On, but has some of the same useful properties</li>
<li>Yes, I&#8217;m happy to help you design/setup/whatever your BrowserID solution. Ping me in #identity.</li>
<li>Yes, this plugin might be reusable by large organizations such as schools, businesses, and pillow fight flash mobs. Please spread the word.</li>
<li>Technically sasl-browserid should work with any <a href="http://asg.web.cmu.edu/sasl/sasl-library.html">Cyrus SASL</a> enabled client or server. OpenLDAP and Postfix are two known servers, are there more? Clients?</li>
</ul>
<p>Let&#8217;s figure out what works well and where we can improve the BrowserID project. If we can do LDAP, we can do anything <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a name="whoami">*</a> Some programming languages lack whoami bindings, search can be used to emulate this check.</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/11/08/demystifying-browserid-mozilla-ldap-sites/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Dart Daydream</title>
		<link>http://ozten.com/psto/2011/10/10/a-dart-daydream/</link>
		<comments>http://ozten.com/psto/2011/10/10/a-dart-daydream/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 21:36:45 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[dart]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[speculative_fiction]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=515</guid>
		<description><![CDATA[Since Google released the Dart spec today, I wanted to share my speculation on the reason Dart exists: Dart is a new technology to solve a cross-organization engineer people problem, internal to Google.
I have no inside knowledge, but reading between the lines, Google had several sets of engineering efficiency problems.
This is not surprising. Google is [...]]]></description>
			<content:encoded><![CDATA[<p>Since Google released the Dart spec today, I wanted to share my <strong>speculation</strong> on the reason Dart exists: Dart is a new technology to solve a cross-organization engineer people problem, internal to Google.</p>
<p>I have no inside knowledge, but <a href="”http://markmail.org/message/uro3jtoitlmq6x7t”">reading between the lines</a>, Google had several sets of engineering efficiency problems.</p>
<p>This is not surprising. Google is a massive, incredible engineering organization. They are creating cutting edge solutions to some of the world’s hardest problems. I would expect them to have huge people challenges; <br /><code style="font-size: 14pt">sudo herd cats</code> still doesn’t work.</p>
<p>Classic engineering problems</p>
<ul>
<li>Code reuse</li>
<li>Cost of shipping a project, etc.</li>
<li>Communication</li>
<li> Standards (Code Quality, Security, etc)</li>
</ul>
<p>A classic mistake is to solve these things with technology first, before solving the actual people-oriented problems. Technology can help enforce standards and make code reuse easier, but tech alone will fail.</p>
<h2>Imagined Problems</h2>
<p>As I day dream, I tried to imagine problems that could result in Dart as a (flawed) solution&#8230;</p>
<p>Perhaps Google spun up 6 teams to investigate and solve 6 problems (Why isn’t project X using GWT?, Why did project Y fail? Why did project Z take 6 extra months and 30% more $$$ to ship?).</p>
<p>Being an awesome company, these postmortems may have bubbled up into a more core question: How can we solve this once and for all?</p>
<h2>One of many possible analysis:</h2>
<p>An example of flawed logic that could lead to project Dart:</p>
<ul>
<li> Writing webapps on GWT is better (for our Java developers) than hacking together Javascript, so</li>
<li> All our teams should use GWT instead of JavaScript, but</li>
<li> We couldn’t get everyone on board with GWT, so</li>
<li> If Google could replace JavaScript with a new clean language, we wouldn&#8217;t have these engineering team problems, and it turns out</li>
<li> We employee some key language pioneers in enterprise languages, so</li>
<li> Google needs a ‘programming in the large’ friendly platform like Java was for the last decade.</li>
</ul>
<p>The end goal is enticing</p>
<ul>
<li> Lower power usage and data center costs, be greener</li>
<li>Ramp up new engineers quickly</li>
<li> All projects reusing standard language and APIs</li>
<li> Lower cost of engineers switching teams</li>
<li> Avoid legally tainted platforms (Java)</li>
<li> Provide puppies and rainbows for all</li>
</ul>
<p>Some of these are real issues. Some of these are nice to haves. Just technology isn’t the right solution to all of these problems.</p>
<h2>Perspective</h2>
<p>Some, definitely not all, but some people at Google have this perspective:<br />
Google hires all the smartest people of the world. We will figure out how to solve the world’s problems; you will live in our resulting products. You’re welcome.</p>
<p>Sometimes being the smartest person can blind oneself to the actual root problem. Having an engineering bent causes one to look at <strong>fixing tools instead of process</strong>.</p>
<h2>Solution</h2>
<p>Google has two tactical thrusts, to continue investing in the next generation of web standards (Yay!) and to replace JavaScript with Dart for all internal mobile and desktop app development (Yawn!).</p>
<p>Engineer problems like the ones I invented could have caused this new tactical decision; engineering process problems <strong>are hard to solve in any large organization</strong>s. JavaScript is a detail, not the cause of many of these types of problems.</p>
<p>In 5 years, various hypothetical teams across my imaginary Google will have drifted back into a Dart-based Babylon, if hypothetical Google doesn’t fix the core communication and standardization issues which may have prompted Dart’s creation.</p>
<p>It is possible to address root causes directly &#8211; Google&#8217;s Java programmers want GWT, but Google&#8217;s native web programmers want JavaScript&#8230; <strong>Make every employee use GWT</strong>; this fits with the only C, Go, Python, or Java languages stance. Introduce training to convert web programmers into Java oriented programmers as part of engineer on-boarding.</p>
<p>These are not fun decisions to make or communicate, but that is the point of project and engineering management.</p>
<p>Creating Dart is expensive (language, tools, runtime, etc), but may give them the social framework to communicate people oriented engineering changes (employees will all use Dart) that address the real core issues. So ultimately Dart might not be a loss for Google internally.</p>
<p>Dart alone will do nothing to solve the root problems that prompted Dart.</p>
<h2>Day Dream</h2>
<p><strong>Again, this post is based on a hypothetical situation</strong> internal to Google. I’ve pieced together this day dream from my own “Enterprise” experiences, various Google posts over the years, etc to resolve why Google would create the Dart platform.</p>
<p>I hope I haven’t offended any of my friends at Google and my speculation is probably wildly inaccurate. If nothing else this post is a parable to talk about solving people problems directly before building tools.</p>
<p>But the real world announcement has some real world impact&#8230;</p>
<h2>Collateral Damage from the Dart Launch</h2>
<p>An unintended consequence of the Dart launch is that it may weaken Google’s efficiency in promoting web standards. It is a very confusing story to explain how promoting the Dart platform and working towards next generation, open web standards are not conflicting Google projects.</p>
<h3>Example Dart versus CoffeeScript:</h3>
<p>Early adopters in the webdev community don’t see Dart as more attractive than <strong>CoffeeScript</strong> which they see as having a superior syntax to Dart. Since both must compile down to JS, they are equally viable for experimenting with language semantics. So on first blush, Dart is a meh to CoffeeScript commentators on Hacker News and Reddit.</p>
<p>Aspects of CoffeeScript may inform the next generation of JavaScript standards. CoffeeScript comes from the community organically, not from ‘the one offical smart guy in the room’.</p>
<p><strong>I’m probably wrong, as I don’t have much insight into Google’s engineering organizations</strong>, but it is quite possible that <strong>Dart is a facile throw at the wrong target</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/10/10/a-dart-daydream/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3 Years with Mozilla</title>
		<link>http://ozten.com/psto/2011/10/06/3-years-with-mozilla/</link>
		<comments>http://ozten.com/psto/2011/10/06/3-years-with-mozilla/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 18:46:54 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[browserid]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=499</guid>
		<description><![CDATA[It was 3rd years ago today that morgamic and bretr foolishly hired allowed me to join Mozilla.
But what have you done for me lately?
Here is my upcoming lightening talk for &#8220;webengagment&#8221;. It covers what I&#8217;m working on (and with whom):
Click to focus, Right Arrow to switch slides.
36 months, and I feel like I am just [...]]]></description>
			<content:encoded><![CDATA[<p>It was 3rd years ago today that morgamic and bretr <strike>foolishly hired</strike> allowed me to join Mozilla.</p>
<blockquote style="font-weight: 900"><p>But what have you done for me lately?</p></blockquote>
<p>Here is my upcoming lightening talk for &#8220;webengagment&#8221;. It covers what I&#8217;m working on (and with whom):</p>
<p><iframe src="http://people.mozilla.org/~aking/browserid/BrowserID_Whats_next_20111006/template.html#1" style="width:100%;height:430px;"></iframe><small>Click to focus, Right Arrow to switch slides</small>.</p>
<p>36 months, and I feel like I am just getting started! Onward.</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/10/06/3-years-with-mozilla/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Sketch of RiverBear</title>
		<link>http://ozten.com/psto/2011/08/26/a-sketch-of-riverbear/</link>
		<comments>http://ozten.com/psto/2011/08/26/a-sketch-of-riverbear/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:52:29 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=488</guid>
		<description><![CDATA[OpenLDAP gets a lot of things right. It gives developers the opportunity to make really progressive designs which respect a user&#8217;s privacy and provides good security.
Unfortunately it also gets many things wrong, when viewed from a web applications perspective.
Three core issues:

Long lived connections
Antiquated schema design
monolithic architecture

Let&#8217;s just focus on the last item, the monolithic architecture.
Here [...]]]></description>
			<content:encoded><![CDATA[<p><a href="www.openldap.org">OpenLDAP</a> gets a lot of things right. It gives developers the opportunity to make really progressive designs which respect a <a href="http://blog.lizardwrangler.com/2011/08/04/extending-our-reach-many-layers-of-user-sovereignty/">user&#8217;s privacy and provides good security</a>.</p>
<p>Unfortunately it also gets many things wrong, when viewed from a web applications perspective.</p>
<p>Three core issues:</p>
<ul>
<li>Long lived connections</li>
<li>Antiquated schema design</li>
<li><b>monolithic architecture</b></li>
</ul>
<p>Let&#8217;s just focus on the last item, the monolithic architecture.</p>
<p>Here is roughly slapd&#8217;s architecture.<br />
<a href="http://ozten.com/wordpress/wp-content/uploads/2011/08/openldap.jpeg"><img src="http://ozten.com/wordpress/wp-content/uploads/2011/08/openldap.jpeg" alt="" title="openldap architecture" width="447" height="273" class="aligncenter size-full wp-image-490" /></a></p>
<p>Looking at search – it&#8217;s <strong>fantastic</strong> that it provides a search mechanism, but how can you <em>get funky with the search engine</em>? Learn C! Fork OpenLDAP <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What subsystems are tightly coupled to search? </p>
<ul>
<li>Schema design</li>
<li>ACL</li>
<li>Data Storage</li>
<li>LDAP protocol</li>
</ul>
<p>How do you switch search engines? You can&#8217;t&#8230; That is the trouble with monolithic designs.</p>
<p>What we want is a system filled with loosely coupled components. Use native search one day, but swap it out for Elastic Search the next. We want a data service which can be scaled across many different servers, so I can run a search cluster on some nodes, the data storage layer on some nodes, etc.</p>
<p>There is a very good reason that OpenLDAP is monolithic&#8230; <strong>ACL are deeply baked in and affect most other subsystems</strong>. When you search &#8216;cute kittens&#8217;, you don&#8217;t just get everything. You get results that contain &#8216;cute kittens&#8217;, but subject to the currently authenticated user and their trusted roles in the system. You may get none, a subset, or all of the records relating to these adorable creatures.</p>
<p>Most modern web applications use only one or perhaps a few credentials to access <strong>all data</strong> and then <strong>trust the business logic</strong> to enforce privacy and security constraints. How many systems have you worked on that had only <strong>web, admin, and replication accounts for mysql</strong>? </p>
<p>What if we had a web oriented data store that respected user privacy as deeply as possible? Your web application would be <strong>just another user agent</strong>.</p>
<p>It would be an interesting exercise to explode this architecture into contemporary standards, protocols, and established products.</p>
<p>A hypothetical architecture, let&#8217;s call it RiverBear:<br />
<a href="http://ozten.com/wordpress/wp-content/uploads/2011/08/river_bear.jpeg"><img src="http://ozten.com/wordpress/wp-content/uploads/2011/08/river_bear.jpeg" alt="" title="river_bear system architecture" width="471" height="439" class="aligncenter size-full wp-image-491" /></a><br />
In this diagram we see authentication via BrowserID and authorization via a new service, say RiverBearGroups (ACL as webservice). This service returns portable data such as jpeg, portable contacts, html, JSON, etc. Iterating a collection of data could be done via ActivityStreams. </p>
<p>We see RiverBear coordinating these stand bits of data via Search (ElasticSearch, Sphinx, whatever), file systems, and backend datastores like Drizzle/MySQL/CouchDB/MongoDB or whatever.</p>
<p>To improve performance and deployment flexibility, a RiverBear plugin could later be added (to subsystems with plugin architectures) which would filter out data at the lowest layer possible. Example: RiverBear-Drizzle would use your current authentication and authorization to throw any unauthorized data or raise errors for modifications. Regardless, this would be done on the frontend, so without the plugin it is secure (but less efficient).</p>
<p>There are many challenges to imagining this new service. How do ACLs and schema relate? Hierarchical and graph oriented stores seem natural, but can this work with document, column or relational stores? Security and privacy come at performance or scaling costs, is it worth it? For which types of systems?</p>
<p>RiverBear is just a thought experiment at this point&#8230; what are your ideas? Feedback?</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/08/26/a-sketch-of-riverbear/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LDAP for MySQL geeks</title>
		<link>http://ozten.com/psto/2011/06/14/ldap-for-mysql-geeks/</link>
		<comments>http://ozten.com/psto/2011/06/14/ldap-for-mysql-geeks/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 18:00:00 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openldap]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=481</guid>
		<description><![CDATA[Another way to approach learning OpenLDAP is through the lens of RDBMS. As a MySQL user&#8230; here are a few slapd equivalents.
Authentication
Some tools (like slapadd against the config directory) are used via authentication provided by your Operating System (Ubuntu for me, which I think is an odd duck for OpenLDAP).
OpenLDAP&#8217;s documentation is leary of Linux [...]]]></description>
			<content:encoded><![CDATA[<p>Another way to <a href="http://ozten.com/psto/2011/06/09/openldap-notes/">approach learning OpenLDAP</a> is through the lens of RDBMS. As a MySQL user&#8230; here are a few slapd equivalents.</p>
<h2>Authentication</h2>
<p>Some tools (like slapadd against the config directory) are used via authentication provided by your Operating System (Ubuntu for me, which I think is an odd duck for OpenLDAP).</p>
<p>OpenLDAP&#8217;s documentation is leary of Linux distributions. I can see why in that <a href=”https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html”>Ubuntu has some quirks</a>. You use sudo and let the OS do authentication. It also keeps most of the config in an LDAP directory, instead of a config file. Whatever.</p>
<p>Other tools will be used with the “directory manager” username and password.  There is often a special <code>rootdn</code> user setup. rootdn is magical and outside of ACL. Kind of like the root user of MySQL I guess.</p>
<p>The <code>rootdn</code> and the <code>rootpw</code> are setup specially. You can change these by changing the config and restarting the server. All other accounts are setup over LDAP. Again, like MySQL, but takes a while to figure out.</p>
<p>Other tools, say ldapsearch, will be used as a user within the directory. These users are subject to Access Control Lists (ACL).  Speaking of ACLs&#8230;</p>
<h2>GRANT ALL ON db1.* TO &#8216;homeslice&#8217;@'localhost&#8217;</h2>
<p>ACLs are like MySQL GRANT&#8230; <strong>on 5-hour energy drink</strong>!.</p>
<p>There is a very rich DSL which lets you specify who has access to what. Access is very fine grained. I hope to cover this in another blog post.</p>
<h2>Primary Keys</h2>
<p>Remember those gnarly-ass distinguishedNames (dn)? Think of these as primary keys.</p>
<p>This was a stumbling block, but the dn, base dn, and default scope are actually cool features.</p>
<p>When I first learned RDBMS systems and tried my hand at data modeling, the natural inclination was to use composite natural keys to make a primary key. In practice you often use artificial keys.</p>
<p>In a way, directory services went for composite natural primary keys, which is situated hierarchically. This is actually way more humane. </p>
<p>So a newbie in RDBMS will look for two probably unique attributes and combine them&#8230; I&#8217;ll do John Smith and concatenate their phone numer, that should cover it. id=Fireman_JohnSmith</p>
<p>Well&#8230; this is how LDAP roles&#8230; DB == id</p>
<pre>
US
  WA
    Seattle
        Fireman
            John Smith
</pre>
<p>This example is contrived&#8230; but you get the picture.</p>
<p>Seeing this id looks gnarly, but makes a lot of sense.<br />
<code>dn: cn=John Smith, oc=Fireman, l=Seattle, s=WA, co=US</code></p>
<p>It&#8217;s a concatenation of how you get to that element in a hierarchical db.</p>
<p>You can use an arbitrary incrementing id. You could use uid=111 isntead of cn=John Smith. Contrived example above just shows how natural keys are possible.</p>
<h2>mysqldump</h2>
<p>slapcat is like mysqldump. It is low level and operates on the data directly. You can safely use this while slapd is online.</p>
<p>You can also craft ldapsearch queries to dump data, but this is slower and less complete.</p>
<h3>How do I bulk load data?</h3>
<p><code>LDIF</code> is a data serialization format used throughout the command line tools. It is a bit like JSON or using CSV dumps from MYSQL&#8230; pretty cool..</p>
<p>ldapadd or slapadd can be used to bulk load LDIF data. Slapadd is faster and operates directly on the datastore, but you must stop your server. Ldapadd goes over the LDAP protocol and is safer, but slower.</p>
<p>Writing LDIF by hand? <strong>Beware</strong> – the LDIF parser (or standard?) <strong>totally blows</strong>. Whitespace is significant. Pythonistas rejoice, but the rules are actually unexpected. I mumble and make sure to put whitespace very carefully.</p>
<h2>InnoDB</h2>
<p>Just as you can configure the backend store of MySQL, in slapd the backend is configurable. Typically data is stored in multiple Berkley DBs. There are bdb or hdb flavors.</p>
<h2>Hosting</h2>
<p>A single MySQL install can host multiple databases. A single LDAP directory server can store multiple directory trees. </p>
<h2>Schema</h2>
<p>However, schema information is global and bleeds into different directory trees. This seems like a pre-web version of distributed systems. Ouch.</p>
<p>In RDBMS systems, when you do <strong>DDL actions</strong> they <strong>are sandboxed</strong> to the current database. <strong>This is not the case with OpenLDAP</strong>. You define a <code>foo</code> attribute, it is global. You define a <code>bar</code> objectclass in directory A, yep&#8230; it bleeds into directory B.</p>
<p>So this can be confusing for writing installation instruction. This is not very agile nor sane. It&#8217;s like Dewey Decimal made it into the information age.</p>
<p><a href="http://ozten.com/wordpress/wp-content/uploads/2011/06/OID_shipping.jpg"><img src="http://ozten.com/wordpress/wp-content/uploads/2011/06/OID_shipping.jpg" alt="Photo of shipping containers" title="These have OIDs right?" width="600" height="400" class="aligncenter size-full wp-image-483" /></a></p>
<p>Oh&#8230; it gets even better&#8230; <a href=”http://www.imdb.com/video/screenplay/vi4256891161/”>Welcome to Terry Gilliam’s Brazil</a></p>
<p>Would you like to create a new <code>objectclass</code> or <code>attributetype</code>? You&#8217;ll need to register an OID with the central authorities. Please mail one SASE to … As we learned in <a href="http://www.amazon.com/gp/product/B000R7PUW4/ref=as_li_ss_tl?ie=UTF8&#038;tag=ozten-20&#038;linkCode=as2&#038;camp=217153&#038;creative=399701&#038;creativeASIN=B000R7PUW4">Everything Is Miscellaneous</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=B000R7PUW4&#038;camp=217153&#038;creative=399701" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, this is horribly antiquated.</p>
<p>Your OID, which must be globally unique, will serve as your base OID and you&#8217;ll add more numbers to it to get a globally unique object identifier per attributetype or objectclass.</p>
<p>You don&#8217;t have to look at OIDs very often. You can alias them to friendly names. But be aware of them.</p>
<p>I recommend hijacking other&#8217;s OID for fun and profit <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Works for <a href=”https://twitter.com/#!/search/Tower%20Bridge”>Twitter handles</a> and <a href=”http://www.color.com/”>domain names</a> right?</p>
<h2>Foreign Keys</h2>
<p>MySQL has foreign key references. You can do the same thing by using attributes which are <code>distinguishedName</code> references.</p>
<p>You can use a <code>dn</code> for a value. Common attributetypes for this are the <code>seealso</code> or <code>member</code> attributes. This is super cool and like a foreign key or symbolic link.</p>
<p>By default<strong> LDAP doesn&#8217;t enforce referential integrity</strong>.
<ul>
<li>You can add a dn that doesn&#8217;t exist</li>
<li>Deleting a record doesn&#8217;t purge dn references</li>
</ul>
<p>There is a <a href="http://manpages.ubuntu.com/manpages/lucid/man5/slapo-refint.5.html">RefInt overlay</a> available for providing referential integrity. Overlays are like extensions and there are several available to add services in a performance sensitive manner.</p>
<p>People are pretty comfortable enforcing referential integrity in the application or another layer these days, so it&#8217;s all good.</p>
<h2>Schema Migration</h2>
<p>A pain point with RDBMS and web applications is schema evolution. Rolling out schema migrations to big data systems is a PITA. NoSQL databases are a current topic for many reasons, but this is one of the drivers. </p>
<p>An LDAP Directory&#8217;s schema is even more rigid than RDBMS. Reading the literature, once gets a sense that you should <strong>design it right the first time</strong>. In practice, <em>it&#8217;s not that type of party.</em> </p>
<p>Wanna change something? I haven&#8217;t found an easy to use DDL. You have to use ldapmodify and a DSL to remove attributetypes then readd them, etc. Remember, this affects every directory running under slapd. I also got a lot of errors, but maybe I fat fingered something.</p>
<p>I imagine it is possible that using good Emergent Design methodology and auxiliary types might combat this issue. Following the open/closed principal and such. <strong>Good luck with that</strong> one on real world teams <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;d advocate keeping the LDAP layer as thin as possible and using it only when appropriate. Data storage can be augmented with web services, RDBMS, and NoSQL backends.</p>
<h2>Brutal Workflow</h2>
<p>Please let me know of something that works better on Ubuntu&#8217;s OpenLDAP, but here is what I do to rapidly iterate a schema design:</p>
<p><script src="https://gist.github.com/1024273.js"> </script></p>
<p>The key is nuking all OpenLDAP config files as well as the low level bdb files.</p>
<h2>DB client</h2>
<p>I use something like DBVisualizer when working on relational databases. The equivalent is <a href=”http://directory.apache.org/studio/”>Apache Directory Studio</a>. This app is great for poking around and learning LDAP concepts. It&#8217;s easier to use once you understand how directories work.</p>
<h2>Conclusion</h2>
<p>That should be enough to get the MySQL geek going on next steps with slapd. </p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/06/14/ldap-for-mysql-geeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LDAP Object Oriented Programmers</title>
		<link>http://ozten.com/psto/2011/06/13/ldap-object-oriented-programmers/</link>
		<comments>http://ozten.com/psto/2011/06/13/ldap-object-oriented-programmers/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 18:31:16 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openldap]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=460</guid>
		<description><![CDATA[As I&#8217;m learning OpenLDAP, it seems useful to draw on programming language concepts to understand the system.
Data from (and the schema behind) a LDAP directory is object oriented and seems to have less of an impedance mismatch between code and data, than the more popular RDBMS.
Structure
Schema definition appears to be highly inspired by object oriented [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://ozten.com/psto/2011/06/09/openldap-notes/">I&#8217;m learning OpenLDAP</a>, it seems useful to draw on programming language concepts to understand the system.</p>
<p>Data from (and the schema behind) a LDAP directory is <strong>object oriented</strong> and seems to have less of an impedance mismatch between code and data, than the more popular RDBMS.</p>
<h2>Structure</h2>
<p>Schema definition appears to be highly inspired by object oriented inheritance, a popular programming paradigm. Every record has a structural <code>objectclass</code>. Classes come in three flavors:</p>
<ul>
<li>Abstract</li>
<li>Structural</li>
<li>Auxiliary</li>
</ul>
<p>These notions are quite familiar to OO programers. Structural classes are the work horses of Schema definition and are basically what most languages prove as a class. Abstract are like abstract base classes in Java. Auxiliary are like interfaces in Java or mixins in Ruby.</p>
<p>Let&#8217;s look at an example Schema – an objectclass for countries<br />
<code>
<pre>
objectclass ( 2.5.6.2 NAME 'country'
        DESC 'RFC2256: a country'
        SUP top STRUCTURAL
        MUST c
        MAY ( searchGuide $ description ) )
</pre>
<p></code><br />
A record cannot be created for an abstract objectclass. All records must have one or more structural classes. The root of the LDAP Schema inheritance hierarchy comes from <code>top</code> which has one mandatory attribute <code>objectclass</code>.</p>
<p>An objectclass can use the <code>SUP</code> keyword to inherit from another objectclass. The default value for SUP is <code>top</code>. Objectclasses declare what attributes <strong>MUST</strong> and <strong>MAY</strong> appear in a record. A record <strong>can&#8217;t</strong> have arbitrary elements, the field must have been declared in the schema.</p>
<p><svg version="1.1" viewBox="0.0 0.0 960.0 420.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" clip-path="url(#clip0)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="clip0">
<path d="M0 0L960.0 0L960.0 720.0L0 720.0L0 0Z" clip-rule="nonzero"></path></clipPath>
<path d="M148.68767 46.002625L273.75854 46.002625L273.75854 110.097115L148.68767 110.097115Z" fill-rule="nonzero" fill="#cfe2f3" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M204.96892 84.5495L210.2033 70.95575L212.1408 70.95575L217.7033 84.5495L215.65642 84.5495L214.06267 80.4245L208.37517 80.4245L206.8908 84.5495L204.96892 84.5495ZM208.8908 78.971375L213.50017 78.971375L212.09392 75.190125Q211.43767 73.487 211.12517 72.377625Q210.85954 73.690125 210.3908 74.971375L208.8908 78.971375Z" fill-rule="nonzero" fill="#000000"></path>
<path d="M59.244095 169.51181L184.31496 169.51181L184.31496 233.6063L59.244095 233.6063Z" fill-rule="nonzero" fill="#cfe2f3" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M116.94722 208.05869L116.94722 194.46494L122.056595 194.46494Q123.60347 194.46494 124.54878 194.87119Q125.494095 195.27744 126.025345 196.13681Q126.556595 196.99619 126.556595 197.93369Q126.556595 198.80869 126.087845 199.58212Q125.619095 200.35556 124.650345 200.82431Q125.88472 201.18369 126.54878 202.05869Q127.212845 202.93369 127.212845 204.12119Q127.212845 205.07431 126.81441 205.89462Q126.41597 206.71494 125.82222 207.16025Q125.22847 207.60556 124.33003 207.83212Q123.431595 208.05869 122.13472 208.05869L116.94722 208.05869ZM118.744095 200.16806L121.681595 200.16806Q122.88472 200.16806 123.400345 200.01181Q124.087845 199.80869 124.43941 199.33994Q124.79097 198.87119 124.79097 198.15244Q124.79097 197.48056 124.462845 196.96494Q124.13472 196.44931 123.53316 196.254Q122.931595 196.05869 121.462845 196.05869L118.744095 196.05869L118.744095 200.16806ZM118.744095 206.44931L122.13472 206.44931Q123.00972 206.44931 123.35347 206.38681Q123.97847 206.27744 124.400345 206.01962Q124.82222 205.76181 125.087845 205.26181Q125.35347 204.76181 125.35347 204.12119Q125.35347 203.35556 124.962845 202.79306Q124.57222 202.23056 123.88472 202.004Q123.19722 201.77744 121.900345 201.77744L118.744095 201.77744L118.744095 206.44931Z" fill-rule="nonzero" fill="#000000"></path>
<path d="M251.97113 169.51181L377.042 169.51181L377.042 233.6063L251.97113 233.6063Z" fill-rule="nonzero" fill="#cfe2f3" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M318.93988 203.29306L320.73676 203.74619Q320.17426 205.96494 318.7055 207.129Q317.23676 208.29306 315.11176 208.29306Q312.90863 208.29306 311.53363 207.39462Q310.15863 206.49619 309.43988 204.80087Q308.72113 203.10556 308.72113 201.15244Q308.72113 199.02744 309.52582 197.44931Q310.3305 195.87119 311.8305 195.05087Q313.3305 194.23056 315.12738 194.23056Q317.17426 194.23056 318.56488 195.26962Q319.9555 196.30869 320.50238 198.18369L318.73676 198.60556Q318.268 197.12119 317.36176 196.4415Q316.4555 195.76181 315.09613 195.76181Q313.53363 195.76181 312.47894 196.51181Q311.42426 197.26181 310.99457 198.53525Q310.56488 199.80869 310.56488 201.15244Q310.56488 202.88681 311.0727 204.17587Q311.5805 205.46494 312.65082 206.10556Q313.72113 206.74619 314.9555 206.74619Q316.47113 206.74619 317.518 205.879Q318.56488 205.01181 318.93988 203.29306Z" fill-rule="nonzero" fill="#000000"></path>
<path d="M59.244095 276.97638L184.31496 276.97638L184.31496 341.07086L59.244095 341.07086Z" fill-rule="nonzero" fill="#cfe2f3" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M116.50972 315.52325L116.50972 301.9295L121.19722 301.9295Q122.775345 301.9295 123.619095 302.117Q124.775345 302.38263 125.60347 303.08575Q126.681595 304.00763 127.212845 305.4217Q127.744095 306.83575 127.744095 308.64825Q127.744095 310.19513 127.38472 311.39044Q127.025345 312.58575 126.462845 313.37482Q125.900345 314.16388 125.22847 314.6092Q124.556595 315.0545 123.60347 315.28888Q122.650345 315.52325 121.41597 315.52325L116.50972 315.52325ZM118.306595 313.91388L121.212845 313.91388Q122.556595 313.91388 123.32222 313.66388Q124.087845 313.41388 124.54097 312.96075Q125.181595 312.32013 125.54097 311.242Q125.900345 310.16388 125.900345 308.617Q125.900345 306.492 125.19722 305.34357Q124.494095 304.19513 123.494095 303.8045Q122.775345 303.52325 121.16597 303.52325L118.306595 303.52325L118.306595 313.91388Z" fill-rule="nonzero" fill="#000000"></path>
<path d="M251.97113 276.97638L377.042 276.97638L377.042 341.07086L251.97113 341.07086Z" fill-rule="nonzero" fill="#cfe2f3" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M309.78363 315.52325L309.78363 301.9295L319.62738 301.9295L319.62738 303.52325L311.5805 303.52325L311.5805 307.69513L319.11176 307.69513L319.11176 309.28888L311.5805 309.28888L311.5805 313.91388L319.93988 313.91388L319.93988 315.52325L309.78363 315.52325Z" fill-rule="nonzero" fill="#000000"></path>
<path d="M121.779526 169.51181L201.22745 116.736916" fill-rule="evenodd" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M203.05531 119.48861L208.78766 111.714905L199.39958 113.98524Z" fill-rule="evenodd" fill="#073763" stroke="#073763" stroke-width="2.0" stroke-linecap="butt"></path>
<path d="M314.50656 169.51181L239.09695 116.0142" fill-rule="evenodd" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M241.00838 113.319885L231.69438 110.76261L237.18553 118.70852Z" fill-rule="evenodd" fill="#073763" stroke="#073763" stroke-width="2.0" stroke-linecap="butt"></path>
<path d="M121.779526 276.97638L121.779526 245.6063" fill-rule="evenodd" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M125.08299 245.6063L121.779526 236.5301L118.47606 245.6063Z" fill-rule="evenodd" fill="#073763" stroke="#073763" stroke-width="2.0" stroke-linecap="butt"></path>
<path d="M314.50656 276.97638L314.50656 245.6063" fill-rule="evenodd" stroke="#073763" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt"></path>
<path d="M317.81003 245.6063L314.50656 236.5301L311.2031 245.6063Z" fill-rule="evenodd" fill="#073763" stroke="#073763" stroke-width="2.0" stroke-linecap="butt"></path></svg><br />
<a href="http://ozten.com/i/ooad_multiple_inheritance.svg">Multiple Inheritance</a> diagram.</p>
<p>It is <strong>illegal</strong> to do multiple inheritance where a record has two<br />
structural object classes that diverge, <strong>such as D and E</strong> in the diagram<br />
above.</p>
<p>A record can have multiple objectclasses, so a record that declares <strong>A, B, and D is fine</strong>.</p>
<p>Records may freely <strong>mix in auxiliary</strong> objectclasses to pick up new well understood properties on existing structural classes. So this is a multiple inheritance like pattern.</p>
<p>To figure out which is the most concrete class, the system <strong>looks for the structural objectclass furthest from <code>top</code></strong>.</p>
<p>In addition to objectclasses being hierarchical, the <strong>attributes</strong> on an objectclass <strong>are also hierarchical</strong>. The mechanism is also the SUP keyword.</p>
<p>Again like <code>objectclass</code>, if no parent for an <code>attributetype</code> is defined, it is <code>top</code> by default. You may always add top to be explicit.</p>
<p>Let&#8217;s see an example of attributetype schema:<br />
<code>
<pre>
attributetype ( 2.5.4.41 NAME 'name'
       EQUALITY caseIgnoreMatch
       SUBSTR caseIgnoreSubstringsMatch
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )
</pre>
<p></code></p>
<p>Ignore  1.3.6.1.4.1.1466.115.121.1.15, it is the object id (OID) for a utf-8 string. We&#8217;ll cover OID in the next (MySQL oriented) blog post.</p>
<p>The SYNTAX of an attribute specifies what kind of data can be stored in the field. UTF-8 strings, phone numbers, JPEG binary blobs, etc. These values can also be given a max length via <code>{n}</code> syntax.</p>
<p>Continuing looking at how to model countries, let&#8217;s look at the definition of &#8216;c&#8217; that the earlier objectclass declared as a MUST have attribute.<br />
<code>
<pre>
attributetype ( 2.5.4.6 NAME ( 'c' 'countryName' )
        DESC 'RFC2256: ISO-3166 country 2-letter code'
        SUP name SINGLE-VALUE )
</pre>
<p></code></p>
<p>Pretty straightforward. We inherit from &#8216;name&#8217;. Notice the SINGLE-VALUE keyword. An attribute can be a list of values, unless you constrain it to a single value. This seems like a pretty elegant solution when modeling data.</p>
<p>Looking at all the attributetypes and objectclasses is a bit like looking at a Django project&#8217;s models.py.</p>
<p>So these schemas capture the static aspects of a directory.</p>
<p>At runtime, the records in the system also exhibit Object Oriented behavior.</p>
<h2>Behavior</h2>
<p>Several declarations of an attribute control how search works. Equality and substring matching are controlled declaratively. </p>
<p><a href="http://ozten.com/psto/2011/06/10/why-ldap-isnt-more-widely-adopted-or-wtf">As noted</a> this is kind of bizarre, but a LDAP Directory provides search, so there you go. If your blogTitle should be searchable just like a person&#8217;s Given name, then you can look through the schema and make it inherit from <code>name</code> or use the same values for the <code>matchingRules</code> property.</p>
<p>These Attributes settings can be inherited and many attributes in the base schemas inherit from <code>name</code>.</p>
<p>A directory&#8217;s layout is hierarchical, but doesn&#8217;t have to follow the same structure as the objectclass structure. Records are grouped under grouping objectclasses. Data is organized with regard to data access patterns and how ACL will be written.</p>
<p>You can think of an LDAP directory as a web service that returns LDIF instead of JSON. Your code runs in the application or middleware layer, which you have full control over. The LDAP protocol provides a sophisticated protocol for reading, writing, and searching objects.</p>
<p>Here is some example LDIF for which captures a country:<br />
<code>
<pre>
dn: c=United States,dc=example,dc=com
c: United States
description: The marshmallow filling between Mexico and Canada.
</pre>
<p></code><br />
The <code>dn</code> is the only funky bit here, otherwise this looks like an easy format, perhaps a cousin of JSON.</p>
<p>As noted, a record may have multiple object classes and can be much richer than this small snippet.</p>
<h2>Summary</h2>
<p>Hey OOAD fans, directories are inherently OO! An object class is part of every record. This schema information says what can, must, and can&#8217;t be in a record&#8217;s attributes. Also&#8230; a record can have multiple object classes&#8230; Hello mixins! A record must have one super class which is called the structural object class, because that sounds tough.</p>
<p>Hopefully this gives us another perspective for starting to understand LDAP directories.</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/06/13/ldap-object-oriented-programmers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why LDAP isn&#8217;t more widely adopted&#8230; or WTF?!?</title>
		<link>http://ozten.com/psto/2011/06/10/why-ldap-isnt-more-widely-adopted-or-wtf/</link>
		<comments>http://ozten.com/psto/2011/06/10/why-ldap-isnt-more-widely-adopted-or-wtf/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 15:53:32 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openldap]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=425</guid>
		<description><![CDATA[Here are some perceived problems and recommendations. My recommendations are <a href="http://ozten.com/psto/2011/06/09/openldap-notes/">coming from a total newbie</a>, so they are fairly worthless.

This post is about barriers to adoption and will be the most negative of <a href="http://ozten.com/psto/tag/openldap/">this series</a>. <strong>I will be dropping some fbombs.</strong>

Let's start with some nice things... we'll get to the constructive feedback soon enough :)

<strong>LDAP is a protocol</strong>, not an API. This is actually really cool and very in-fashion.

LDAP directories are <strong>distributed</strong> (in more than one way), sweet.

Another cool thing about LDAP is that records can have some flexibility to their schema, but they still have a schema. You can augment a record with an “auxiliary” type. Types can have mandatory and optional elements. Ad-hoc elements aren't allowed, they must be in a schema. This seems like a <strong>sweet spot for some classes of data storage solutions</strong>.

For such an ancient and storied beast, OpenLDAP gets many things right. If you were to re-launch it as a new NoSQL project, written in NodeJS, you'd probably get some love. Developer's love the new hawtness.

<h2>Problem: Bizarre keywords</h2>
Technically these aren't keywords, but to a programmer just encountering LDAP, that is what they seem like.

Attributes are standardized and have inconsistent and wacky names. As a programmer, I'm used to creating my universe on top of a standard library. A programmer approaching data and data definitions... I make that up as I go, right?

<strong><a href="http://ozten.com/psto/2011/06/10/why-ldap-isnt-more-widely-adopted-or-wtf/">Okay fbombs ahead... click through for the rest of this post.</a></strong>]]></description>
			<content:encoded><![CDATA[<p>Here are some perceived problems and recommendations. My recommendations are <a href="http://ozten.com/psto/2011/06/09/openldap-notes/">coming from a total newbie</a>, so they are fairly worthless.</p>
<p>This post is about barriers to adoption and will be the most negative of <a href="http://ozten.com/psto/tag/openldap/">this series</a>. <strong>I will be dropping some fbombs.</strong></p>
<p>Let&#8217;s start with some nice things&#8230; we&#8217;ll get to the constructive feedback soon enough <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>LDAP is a protocol</strong>, not an API. This is actually really cool and very in-fashion.</p>
<p>LDAP directories are <strong>distributed</strong> (in more than one way), sweet.</p>
<p>Another cool thing about LDAP is that records can have some flexibility to their schema, but they still have a schema. You can augment a record with an “auxiliary” type. Types can have mandatory and optional elements. Ad-hoc elements aren&#8217;t allowed, they must be in a schema. This seems like a <strong>sweet spot for some classes of data storage solutions</strong>.</p>
<p>For such an ancient and storied beast, OpenLDAP gets many things right. If you were to re-launch it as a new NoSQL project, written in NodeJS, you&#8217;d probably get some love. Developer&#8217;s love the new hawtness.</p>
<h2>Problem: Bizarre keywords</h2>
<p>Technically these aren&#8217;t keywords, but to a programmer just encountering LDAP, that is what they seem like.</p>
<p>Attributes are standardized and have inconsistent and wacky names. As a programmer, I&#8217;m used to creating my universe on top of a standard library. A programmer approaching data and data definitions&#8230; I make that up as I go, right?</p>
<h2>dn</h2>
<p><strong>What the fuck is a dn</strong>. Oh it&#8217;s a distinguished name. <em>Well&#8230; how … <strong>distinguished</strong>.</em></p>
<p>A DN is like an ID or a KEY. People know those terms. It&#8217;s okay if it isn&#8217;t technically accurate. Humans remember a good story over a technically accurate story.</p>
<p>dn = distinguishedName&#8230; Okay, so everything is supper abbreviated, I can dig it&#8230; Let&#8217;s see  O=Acme Services, telephoneNumber=+1 800 555 9834, postalAddress= 98177, l=Seattle&#8230;</p>
<p>What, what? Inconsistent much? So it appears that objectclasses and attributetypes can have multiple aliases.</p>
<p>o is an alias for OrganizationName and l for localityName. </p>
<p>Tweet you&#8217;ll never see:</p>
<blockquote><p>OH: Hey @Jill, I forgot, <strong>which localityName do you live</strong> in again? #onthebus</p></blockquote>
<p>This causes my WTF/minute to spike. I imagine one of the following created these names:</p>
<ul>
<li>Regional oddity</li>
<li>Authors crashed on earth in space pod</li>
<li>The authors took a break from speaking Esperanto long enough to form a quorum and vote in the schema</li>
<li>Maybe that schema was baked in a BOF at DirectoryCon in Atlantis 1872</li>
</ul>
<p>Who knows&#8230; once you grok the names and the semantics, it&#8217;s all good.</p>
<h2>Mixed Case</h2>
<p>Why do I see o and O used for attributetype names? Because it&#8217;s case-insensitive. Like Windows 3.1.<br />
o_O</p>
<h2>Recommendation:</h2>
<p>Objectclasses and AttributeTypes may have multiple names. Always use the<br />
most descriptive name or <strong>invent aliases that aren&#8217;t totally fucked</strong>. Don&#8217;t use more than one alias. I know <a href="http://www.tbray.org/ongoing/When/200x/2005/12/23/UPI">naming things is hard</a>. </p>
<h2>Problem: Discoverability</h2>
<p>It&#8217;s very hard to &#8216;view source&#8217; on an existing app and understand WTF is a dn&#8230; These things are buried deep in the system in .schema or .ldif files. When you read them, they read like a Dewey Decimal&#8217;s Bureaucratic Vision of the New World Order.</p>
<h2>Recommendation:</h2>
<p>I haven&#8217;t found a really good document or manual of the existing standardized schemas. One that makes it easy to see data types, reasons they exist, etc. I have to resort to greping the schema files or browsing via Apache Directory Studio.</p>
<h2>Problem: LDAP Directories do too much</h2>
<p>I can sympathize with the successive generations of decisions that went into creating LDAPv3.<br />
In system design there are lots of hard decisions around when to separate policy (application level minutia) from application (or service). What do you</p>
<ul>
<li>Bake in?</li>
<li>Make Controllable programatically?</li>
<li>Make Configurable?</li>
</ul>
<p>LDAP makes very different design decisions (than say a SQL92 DB) in terms of what is provided via the LDAP protocol vs what is Application level or what should be provided by other tools.</p>
<p>An Example is Search.</p>
<p>LDAP schemas encode what is a valid search strategy, instead of delegating this<br />
to a search layer outside of the LDAP Schema (or at outside of LDAP entirely)&#8230; </p>
<p>Oh my. Wanna swap out Sphinx for elasticsearch? It&#8217;s not that type of party.</p>
<p>So your schema will encode that you can search with &#8216;o*&#8217; against country fields and get back a boat-load of countries. You might expect to handle this at the application layer. So if you <strong>don&#8217;t want</strong> to allow wild card characters, or you want to make sure that search results are conservative, you&#8217;ll need to remove &#8216;*&#8217; from search input or post-process the search results.</p>
<h2>Recommendation:</h2>
<p>We haven&#8217;t talked about ACL. This explains why search is tightly coupled.</p>
<p>I punt. Software is hard.</p>
<h2>Problem: The CRM/CMS/Groupware problem</h2>
<p>I think it&#8217;s incredibly heard to create large, general, reusable applications. Look at Sharepoint, Plone, Netscape Suite, etc. </p>
<p>Really good software is small and tailored exactly to the organization or social function it serves. Building really good <strong>general purpose software</strong> is usually impossible. Hats off to (any) level of success here.</p>
<h2>Recommendation:</h2>
<p>I punt. Software is hard.</p>
<h2>Problem: Schemas and Data</h2>
<p>Snippet of LDIF (serialized data):<br />
<code>
<pre>
dn: uid=john,ou=people,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 1000
gidNumber: 10000
gecos: John Doe
</pre>
<p></code><br />
Wow. Really? </p>
<p>The idea that LDAP v3 specifies schema is odd and surprising. Maybe the protocol doesn&#8217;t (I haven&#8217;t read the RFCs), but it&#8217;s deeply ingrained in the culture that you use at least the 4 most popular schemas out of the box.</p>
<p>There is an amazing amount of redundant information. Looking at ldif files, they violate the DRY principal. Tooling can fix the DRY issue.</p>
<p>But an inetOrgPerson out of the box? It&#8217;s a bit akin to a programming language providing a Person class in it&#8217;s standard library. How&#8217;s that working out for you?</p>
<p>No respectable RDBMS comes with a predefined schema. I&#8217;d giggle if MySQL offered inetOrgPerson tables with  organizationalName or localityName columns. Again this is the “too many layers to understand at once” problem.</p>
<h2>Related Problem:</h2>
<p>If I start whipping up my own schema&#8230; I quickly run into the crazy constraints that every schema on the planet is in the same namespace. W&#8230; T&#8230;F&#8230; My slapd server can host multiple directories, but it can&#8217;t have attribute name clashes between my different projects. What the What? (We&#8217;ll cover OID in another post).</p>
<p>LDAP and x.500 were designed many moons ago. This is an inferior strategy for distributed system design.</p>
<h2>Recommendation:</h2>
<p>Schema should be namespaced and more cleanly separated from the daemon that provides LDAP Directory services. I doubt a LDAPv4 could add this w/o breaking backwards compatibility. Java&#8217;s package namespacing conventions have done good work here.</p>
<h2>Problem: Unexcepted data and programming models</h2>
<p>The great thing about learning new systems or languages is that it stretches your mind. Having casual contact with LDAP, there is a lot of unexpected idioms.</p>
<ul>
<li>Search check to see if something exists, doesn&#8217;t always return a value</li>
<li>Advanced and nuanced binding is baked in, uses unusual terminology</li>
<li>Type systems are hierarchical, data is hierarchical, the two don&#8217;t have to be related</li>
</ul>
<p>The way data is modeled and organized is very different than RDBMS. </p>
<p>To this last point, exploring the data sets in LDAP directories can be a much more natural experience than wading through tables in a RDBMS.</p>
<p>LDAP Directories are fairly sophisticated. This means quite a bit of training is required before someone feels comfortable using or tweaking things. Ruby has a concept of <a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29#Philosophy">POLA</a>. For whatever reason, LDAP has a lot of surprises. </p>
<p><a href="http://www.amazon.com/gp/product/1847191029/ref=as_li_ss_il?ie=UTF8&#038;tag=ozten-20&#038;linkCode=as2&#038;camp=217153&#038;creative=399349&#038;creativeASIN=1847191029"><img align="left" border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&#038;Format=_SL110_&#038;ASIN=1847191029&#038;MarketPlace=US&#038;ID=AsinImage&#038;WS=1&#038;tag=ozten-20&#038;ServiceVersion=20070822" ></a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=1847191029&#038;camp=217153&#038;creative=399349" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
 There are <a href="http://www.amazon.com/gp/product/1847191029/ref=as_li_ss_il?ie=UTF8&#038;tag=ozten-20&#038;linkCode=as2&#038;camp=217153&#038;creative=399349&#038;creativeASIN=1847191029">several great books</a> and <a href="http://www.openldap.org/doc/admin24/">free materials out there on OpenLDAP</a>, so I don&#8217;t think this is a deal-breaker, it just reduces casual adoption.</p>
<p>So there are some initial thoughts from a web developer trying to understand LDAP. LDAP systems are widely deployed in <strong>IT Departments</strong>, but never a first tool to reach for in the <strong>startup</strong> and <strong>Internet programming</strong> worlds. </p>
<p>These assumption and confusions hopefully show some of the disconnects for potential adoption by new users. Seeing code that uses LDAP or seeing snippets of schemas or ldif files can make a programmer feel uneasy. It seems like foreign territory.</p>
<p>Having read (the two resources above) and implemented a toy project (a recipe directory), OpenLDAP doesn&#8217;t seem that crazy or foreign. It&#8217;s got a few warts and scars like any real world, successful technology.</p>
<p>Instead of just jovial complaining, my next two posts will help <strong>MySQL oriented</strong> users as well as <strong>OO programming</strong> oriented users <strong>get started with OpenLDAP</strong> concepts and tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/06/10/why-ldap-isnt-more-widely-adopted-or-wtf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenLDAP Notes</title>
		<link>http://ozten.com/psto/2011/06/09/openldap-notes/</link>
		<comments>http://ozten.com/psto/2011/06/09/openldap-notes/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 00:36:11 +0000</pubDate>
		<dc:creator>ozten</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[openldap]]></category>

		<guid isPermaLink="false">http://ozten.com/psto/?p=421</guid>
		<description><![CDATA[I&#8217;m going to write a series of short blog posts about my nascent experiences with LDAP directories.
I hope to cover the good, the bad, and the fugly of this beast.
Planned posts will include:

Why LDAP isn&#8217;t more widely adopted or WTF?!?
LDAP for MySQL peeps
LDAP for OO programmers
Care and feeding for the total newb (tips)
Directory data modeling [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to write a series of short blog posts about my <strong>nascent</strong> experiences with LDAP directories.</p>
<p>I hope to cover the good, the bad, and the <em>fugly</em> of this beast.</p>
<p>Planned posts will include:</p>
<ul>
<li>Why LDAP isn&#8217;t more widely adopted or WTF?!?</li>
<li>LDAP for MySQL peeps</li>
<li>LDAP for OO programmers</li>
<li>Care and feeding for the total newb (tips)</li>
<li>Directory data modeling example</li>
</ul>
<h2>Why Study OpenLDAP?</h2>
<p>I&#8217;m helping organize the Mozillians.org project. To enable adv privacy experiments we&#8217;re using <a href="https://wiki.mozilla.org/Mozillians/Releases/1.0/LDAP">OpenLDAP as the initial backend</a>.</p>
<p>I need to get my head around it enough to be able to shoot myself in the foot <img src='http://ozten.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve always wanted to study a hierarchical DB, beyond file systems and other common data stores. I didn&#8217;t really find one&#8230; until LDAP.</p>
<p>There are four main types of databases:</p>
<ul>
<li>Relational</li>
<li>Hierarchical</li>
<li>Graph</li>
<li>Document</li>
</ul>
<p>Web developers tend to focus on RDBMS and Document (NoSQL) databases. RDBMS are so ingrained in us, that we&#8217;ve standardize many webapp frameworks on top of the ActiveRecord pattern. </p>
<p>Lots of creative energy is being put into new database (CouchDB, MongoDB, etc) or data structure servers (Redis) that push and remix the ideas of these four paradigms.</p>
<p><a href="http://openldap.org/">OpenLDAP</a> is most closely aligns with the <strong>hierarchical</strong> flavor of a database management system. I really enjoy studying systems that have stood the test of time. You can learn a lot by examining the strength and flaws.</p>
<p>Many of Mozilla&#8217;s core developer webtools integrate with our current existing LDAP instance.</p>
<p>There are many large OpenLDAP installations in the wild. It&#8217;s ancient, robust, and optimized for certain classes of problems.</p>
<p>I&#8217;m going to say lots of positive and negative things about LDAP. These are my observations and aren&#8217;t terribly clueful or empirical, so please educate me. My goal isn&#8217;t to flame the OpenLDAP community, but to give honest insight into the beginner&#8217;s mind.</p>
<p>So&#8230; onwards!</p>
]]></content:encoded>
			<wfw:commentRss>http://ozten.com/psto/2011/06/09/openldap-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

