Could this be structured in a way that makes it easily available to all modules?<br><br><div class="gmail_quote">On Mon, Sep 21, 2009 at 1:06 PM, Melanie <span dir="ltr"><<a href="mailto:melanie@t-data.com">melanie@t-data.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This would go to<br>
<br>
OpenSim.Data.XXX.XXXGenericStore.cs<br>
<br>
It would implement an IGenericData inteface in namespace OpenSim.Data<br>
<font color="#888888"><br>
Melanie<br>
</font><div><div></div><div class="h5"><br>
Hurliman, John wrote:<br>
> A lot of the work going into OpenSim recently has been modularizing the codebase and making it easy for third party developers to write plugins. One feature that I think would really complete the picture would be a (simple) generic data storage interface that leveraged the existing OpenSim storage framework. Most plugins I've seen (and wrote) currently tack on their own database tables, use a simple text file with a custom format, or use some other means of data storage that does not match up with the rest of OpenSim. Adding a new database table that had three columns: [context, key, value] would allow plugins to store key/value mappings (string to string) without worrying about data collisions between plugins or having to implement a custom data store every time.<br>
><br>
> // returns true if the key was found and data was updated, otherwise false if a new key row was added<br>
> bool AddOrUpdateKeyValue(string context, string key, string value);<br>
> // returns true if the key was found and deleted<br>
> bool DeleteKeyValue(string context, string key);<br>
> // returns the string value if the key was found, otherwise null<br>
> string GetValue(string context, string key);<br>
><br>
> Although I've been writing extensions for the OpenSim codebase for quite a while, I'm still fairly new to the guts of the system. Does this seem like the correct solution? If so, where would this interface go? I'm happy to write the code to implement this, I just want feedback from the dev community first to see if I'm on track.<br>
><br>
> John<br>
> _______________________________________________<br>
> Opensim-dev mailing list<br>
> <a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
> <a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
><br>
><br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</div></div></blockquote></div><br>