[Opensim-dev] Please do not revert fixes without careful comtemplation
Antti Kokko
aakokko at gmail.com
Mon Feb 16 07:07:43 UTC 2009
Hello,
With NHibernate you can always fetch bulk objects from database. AssetBase
has about 10 columns and in case you just need the metadata do a
BulkAssetData which only has the metadata and maybe UUID. Then fetch just
those fields and convert the object to BulkAssetData. So in this case always
keep the whole assetdata in the database and when fething AssetMetaData do a
bulk object fetch and cast it to AssetMetaData. This bulk stuff speeds up to
database handling since instead of e.q. fething the whole user profile just
fetch the columns you need cast to a bulkobject and then you can handle the
object in object-oriented manner. There is no need for foreach datarows or
similar.
I hope that makes sense.
Best,
- Antti
2009/2/14 Tommi Laukkanen <tommi.s.e.laukkanen at gmail.com>
> Hello,
>
> On second though we could keep the current structure and expose all fields
> also through AssetBase properties. Then we could save / load the AssetBase
> with nhibernate as a single object and leave out the Metadata property from
> NHibernate mapping. Does this sound good?
>
> regards,
> Tommi
>
> On Sat, Feb 14, 2009 at 5:06 PM, Mike Mazur <mmazur at gmail.com> wrote:
>
>> Hi,
>>
>> On Sat, Feb 14, 2009 at 4:05 PM, Tommi Laukkanen
>> <tommi.s.e.laukkanen at gmail.com> wrote:
>> > I was talking with mikkopa and he suggested we should create two tables
>> to
>> > cover AssetBase to solve this issue properly. Namely AssetMetadata for
>> > metadata information and AssetData for blobs to avoid situation where we
>> end
>> > up accessing also the blob data just to read metadata.
>>
>> I was hoping not to have to do that.
>>
>> It should be straightforward to support the current
>> AssetBase/AssetMetadata composition in the existing OpenSim data
>> layers, but as sdague warned me earlier, by mapping multiple classes
>> to one table I was entering a world of pain. Seems that's exactly
>> what's happening with NHibernate.
>>
>> The reason I introduced the AssetMetadata class is to supply metadata
>> information only for some requests that Cable Beach, the new asset
>> server, supports. Now I realize that this was probably a premature
>> optimization.
>>
>> Instead of modifying the DB schema, we could have AssetBase inherit
>> from AssetMetadata, as I outlined before[1]. Alternatively, we could
>> get rid of AssetMetadata altogether and store everything in AssetBase
>> as before, splitting out the metadata sometime in the future when a
>> use case warrants it.
>>
>> What do you think?
>>
>> Thanks,
>> Mike
>>
>>
>> [1]
>> https://lists.berlios.de/pipermail/opensim-dev/2009-February/004918.html
>>
>
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20090216/6a179fbc/attachment-0001.html>
More information about the Opensim-dev
mailing list