<div dir="ltr">On Fri, Jul 18, 2008 at 12:46 PM, Havoc Pennington <<a href="mailto:hp@pobox.com">hp@pobox.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Anyway, you're right the object path is just an arbitrary string and<br>
can be anything; but, it needs to be a unique string for each distinct<br>
object. So that means either random/guid type strings (like mktemp or<br>
uuid), or namespaced strings, or guids inside a namespace is another<br>
common pattern (like /org/foo/{guid}).</blockquote><div><br>This gets to my current recommendation, which boils down to:<br><br>If your app has a global singleton object, namespace it like<br>/org/myapp/MyService<br><br>
If your app has dynamic objects, use GUIDs (/org/myapp/8f1569af-2893-478b-84da-743b04c52121), or a runtime-specific unique object mapping (in C, this could just be the pointer address; on the JVM you might be able to use System.identityHashCode() for this purpose though I'm not entirely sure.).<br>
<br>Don't try to create a human-readable string for the object as the restrictions on names in the object path will likely trip you up. This has happened now with both HAL and NetworkManager. Or if you do, be really sure you URL quote it everywhere.<br>
<br><br></div></div></div>