[OSC_dev] namespace best practice?

Andy W. Schmeder andy at cnmat.berkeley.edu
Tue Jul 29 12:40:44 PDT 2008


This is a somewhat broad question, however...

Generally people approach OSC address space design it in terms of the  
RESTful architecture, although not all of its principles apply.

REST is basically resource-enumeration oriented, i.e., with emphasis  
on nouns.  Some examples (shamelessly lifted from http://en.wikipedia.org/wiki/Representational_State_Transfer 
  ...)

http://example.com/users/
http://example.com/users/{user} (one for each user)
http://example.com/findUserForm
http://example.com/locations/
http://example.com/locations/{location} (one for each location)
http://example.com/findLocationForm


Generally this would suggest an organization scheme of the sort, / 
devices/{device}/{properties,methods}/{...}

Another way to look at this is that pattern matching an address  
against the space of known addresses should terminate with the fewest  
possible comparisons.



On Jul 29, 2008, at 12:10 PM, mart wrote:

> Hi All,
>
> i am new to OSC and I am pretty much stuck:
> i want to setup a distributed system with several (a lot) of nodes.
> This could be uOSC-devices or so.
> Defining the namespace of methods of one node is pretty much straight
> forward to me:
>
> "/device/id"
> "/device/status"
> "/device/firmware"
> etc..
>
> cool.
>
> I know that the OSC-spec does not provide a namespace convention
> and it is all up to me
> but when it comes to trees of higher orders I don't know what to do:
>
> "/control/0/control/1/uosc_dev/2/pwm/3 ,i 255",
> "/control0/control1/uosc_dev2/pwm3 ,i 255"
> or just
> "/pwm 0 1 2 3 255" ?

---

Andy W. Schmeder
andy [at] cnmat.berkeley.edu

Programmer/Analyst II
Research Group
Center for New Music and Audio Technologies
University of California at Berkeley
http://cnmat.berkeley.edu





More information about the OSC_dev mailing list