No subject


Sat Apr 19 02:14:48 UTC 2014


=20
* Overly complex (the configuration seem to, in themselves, be on par with =
actually coding generic mappers)
* Mandating major changes in our object structure (opening up for encapsula=
tion violations or forcing dependencies on hibernate)
* Totally invasive (as in, in practice demanding its storage philosophy to =
be acommodated for and coded into core objects)
=20
It has been proven a very bad thing to let objects take care of their own d=
b serialization. More often than not, the object cannot be serialized from =
within its own context (it might not have data like 'parent' needed for rel=
ational storage) - and the object itself should not know about any given se=
rialization method.
=20
It IS a very bad thing to rely on 'storage' as a prime db serialization con=
cept - you want 'changes': the first thing we need to do when we get to opt=
imize the db layer, is to introduce more fine-grained update calls, like 'C=
hangeOwner' and 'StoreTextures' instead of 'store object, with prims, textu=
res and shapes'. I have asked several times how this would be accomodated i=
n nhibernate, but have got no answers.
=20
Now, I've been asking for some kind of overview of the wins with this and w=
hat the drawbacks are, but have so far got none that gives me any idea of w=
hat impact this has on our modular approach or on performance.
=20
If we're not going to let it 'hibernate' objects, as in 'let the objects th=
emselves store themselves' and if we have to set up config files detailing =
out the mappings, why simply not just CODE the thing and get the granularit=
y, performance and customizability (as in, being able to let the objects be=
 serialized according to their different internal structures) that comes wi=
th it?
=20
Best,
/Stefan


Date: Fri, 4 Apr 2008 10:23:33 +0200From: impalah at gmail.comTo: opensim-dev@=
lists.berlios.deSubject: Re: [Opensim-dev] nhibernate progress, baby stepsH=
ello everyone:I hadn't any time to "nhibernating" opensim (as I told months=
 ago) but the code I did is there.Sean I know my code may be "complicated" =
when starting, that's for the use of factories and DAO's. My intention was =
to convert every nhibernate object in a DAO, so they will know how to save,=
 update, delete... themselves (a simple call to AssetDAO.Save(id) for examp=
le). Well, for testing your approach is better if you don't have enough exp=
erience with hibernate.Second, my approach was to not modify the current ob=
jects, mapping them to nhibernate classes. Of course the better idea is to =
use the libsl-hibernatized objects (with getters and setters) throughout th=
e code w/o intermediate mapping classes. I think the advantages of having "=
intelligent" getters and setters where we could put validations, or even cl=
asses than can serialize (to XML or whatever) are more than the "overload a=
nd memory use" disadvantages.Third (fuck, I'm making a list) the ID questio=
n: do not use the "auto" ids (generated by nhibernate). Let opensim create =
them. The overhead of letting hibernate create these ids is higher than the=
 CoCreateId call opensim does. If you want to use a byte array for storing =
ids (due to better performance), use it; hibernate hasn't any problem with =
it (the "recommended id" is an integer because hibernate is often used in "=
enterprise environments", there isn't any other reason).Four, I tested my p=
revious code (apart from .NET) with mono + SQLite + nhibernate w/o "touchin=
g" anything (I used the included sqlite drivers included with opensim). I c=
an't help you here.Five, instead of using the hbm.xml files you can use map=
ping attributes (that was the point where I stopped). The same with the hib=
ernate.cfg.xml, you can set its properties "programatically". The advantage=
s: if you change one data object you don't have to change the xml file too;=
 and less files in the bin directory as well.Six, you can generate the db s=
chemma automatically (I think I provided an example), it's db independent. =
If you are using mapping attributes instead of hbm.xml just serialize the o=
bjects (there are some examples looking for "nhibernate mapping attributes"=
 in google). It works...Seven, sorry. I wanted to help you developing a hib=
ernate base but I had only 1 "relatively" free week to did it. Maybe in the=
 future.Greetings and good luckImpalah "busy guy" Shenzhou
2008/4/3, Stefan Andersson <stefan at tribalmedia.se>:=20

Yeah, well; I'm not saying it IS, just that we need to check on it.I glimps=
ed that as I was trying to find out what the 'best practice' for storing gu=
ids in MySQL databases was; I actually didn't find any good info on that. /=
Stefan

> Subject: RE: [Opensim-dev] nhibernate progress, baby steps> From: brianw@=
terrabox.com> To: stefan at tribalmedia.se> CC: opensim-dev at lists.berlios.de> =
Date: Thu, 3 Apr 2008 13:04:37 -0500=20
> > > Ouch. That's not good. > > > On Thu, 2008-04-03 at 19:55 +0200, Stefa=
n Andersson wrote:> > It seems the MySQL connector for .net assumes the db =
field is a> > string for its internal MySqlDataReader.GetGuid() implementat=
ion.> > > > (I could have been looking at source for an old revision of the=
> > connector, but that needs to be checked out anyway)> > > > So, that mig=
ht mean that going binary could wreck stuff like> > nhibernate, if that's u=
sing a DataReader.> > > > Best,> > /Stefan> > > > > > > > > > > > _________=
_____________________________________________________________> > > > > Date=
: Thu, 3 Apr 2008 13:49:03 -0400> > > From: sean at dague.net> > > To: brianw@=
terrabox.com; opensim-dev at lists.berlios.de> > > Subject: Re: [Opensim-dev] =
nhibernate progress, baby steps> > > > > > On Thu, Apr 03, 2008 at 11:19:58=
AM -0500, Brian Wolfe wrote:> > > > *nod* sounds good to me as well. I just=
 have one request since> > we'll be> > > > changing things up at this level=
. Can we shoot for UUIDs being> > stored as> > > > a byte[16] in order to g=
ain the 10x speedup in SQL> > indexing/storage vs> > > > string(32|36) ?> >=
 > > > > That's definitely an option. It did however seem like there was so=
me> > > speedup on LLUUID processing if we kept strings. I'm not sure where=
> > the> > > two end up colliding on speedup effects.> > > > > > -Sean> > >=
 > > > -- > > > ___________________________________________________________=
_______> > > > > > Sean Dague Mid-Hudson Valley> > > sean at dague dot net =
Linux Users Group> > > http://dague.net http://mhvlug.org> > > > > > There =
is no silver bullet. Plus, werewolves make better neighbors> > > than zombi=
es, and they tend to keep the vampire population down.> > > _______________=
___________________________________________________> > > __________________=
_____________________________Opensim-dev mailing listOpensim-dev at lists.berl=
ios.dehttps://lists.berlios.de/mailman/listinfo/opensim-dev=

--_3e0aae69-b7da-4b90-ae8a-20bc57d06fce_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'>At this point I must, again, ask 'what is the poi=
nt of nhibernate'?<BR>
 <BR>


More information about the Opensim-dev mailing list