{"id":419,"date":"2009-11-24T11:59:41","date_gmt":"2009-11-24T19:59:41","guid":{"rendered":"http:\/\/netmesh.info\/jernst\/?p=331"},"modified":"2009-11-24T11:59:41","modified_gmt":"2009-11-24T19:59:41","slug":"microsoft-turning-the-ldap-directory-into-a-graph-database","status":"publish","type":"post","link":"https:\/\/upon2020.com\/blog\/2009\/11\/microsoft-turning-the-ldap-directory-into-a-graph-database\/","title":{"rendered":"Microsoft turning the LDAP directory into a Graph Database?"},"content":{"rendered":"<p>Just finished watching <a href=\"http:\/\/www.identityblog.com\/\">Kim Cameron<\/a>&#8216;s <a href=\"http:\/\/ecn.channel9.msdn.com\/o9\/pdc09\/wmv\/SVC10.wmv\">talk<\/a> at the recent Microsoft Professional Developers Conference. A bit of a surprise that talk of WS-* has largely disappeared in favor of much about REST.<\/p>\n<p>But the most interesting part, for me, was at the end, when Gert Drapers (Principal Architect, Identity and Access Platform), gave a demo on future directions for Microsoft&#8217;s LDAP directory. Kim called it &#8220;two orders of magnitude simpler&#8221; (for the developer) than LDAP so far. The secret? Graph traversal!<\/p>\n<p>Here&#8217;s a code fragment he showed on screen (I simplified it a bit to make my point):<\/p>\n<pre>Party me = directory.GetPartyByIdentityKey( ... );\n\nIEnumerable&lt;Party&gt; managementChain = directory.GetRelatedParties( me, System.Identity.Kinds.Relationship.Manager )\n\n\/\/ Find the first manager which is a expense approver\nforeach( Party manager in managementChain ) {\n    bool isApprover = (\n        from roles in manager.ProcessRolesAre\n        where roles.KindID == System.Identity.Kinds.ProcessRole.ExpenseApprover\n        select roles.Party\n    ).count() &gt;= 1;\n    if( isApprover ) {\n         ...\n    }\n}<\/pre>\n<p>Here is how we would do it in <a href=\"http:\/\/infogrid.org\/\">InfoGrid<\/a>:<\/p>\n<pre>Party me = meshBase.findMeshObjectByIdentifier( ... ).getTypedMeshObjectFacade( IdentitySubjectArea.PARTY );\n\nMeshObjectSet managers = me.traverse( IdentitySubjectArea.ISMANAGEDBY.getSource() );\nwhile( !managers.isEmpty() ) {\n    Party manager = managers.getSingleElement().getTypedMeshObjectFacade( IdentitySubjectArea.PARTY );\n\n    if( manager.getIsApprover().value() ) {\n        ...\n    }\n    managers = manager.traverse( IdentitySubjectArea.ISMANAGEDBY.getSource() );\n}<\/pre>\n<p>There are some minor differences in the API, because it appears that Microsoft&#8217;s is a special-purpose graph database with a built-in &#8220;directory&#8221; schema and a leaky SQL underneath, while InfoGrid&#8217;s supports any kind of model (aka schema). InfoGrid can also be run on top of either SQL or NoSQL engines and does not leak SQL. For this example, I made up a hypothetical model called IdentitySubjectArea, but that would a really easy one to define.<\/p>\n<p>&#8220;Two orders of magnitude better&#8221; according to Kim? Of course, the world&#8217;s information is clearly structured more like a graph than LDAP and people seem to get around to that idea. Perhaps there are some interesting applications for InfoGrid as an enterprise directory &#8230; never thought of that one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just finished watching Kim Cameron&#8217;s talk at the recent Microsoft Professional Developers Conference. A bit of a surprise that talk of WS-* has largely disappeared in favor of much about REST. But the most interesting part, for me, was at the end, when Gert Drapers (Principal Architect, Identity and Access Platform), gave a demo on&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled":false,"footnotes":""},"categories":[60,66],"tags":[94,516,108],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-digital_identity","category-technical","tag-graph-database","tag-infogrid","tag-ldap","kind-"],"kind":false,"_links":{"self":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":0,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"wp:attachment":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}