<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] ColdStore --> <!--X-From-R13: [vebfyni Evybivp <fvybivpNmrfbv.sre.ue> --> <!--X-Date: Thu, 09 Dec 1999 04:07:34 -0800 --> <!--X-Message-Id: 7ezovk9w64.fsf#zesoi,fer.hr --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199912082146.PAA12997#laurel,actlab.utexas.edu --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] ColdStore</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:silovic#zesoi,fer.hr"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00561.html">Previous</a> | <a href="msg00563.html">Next</a> ] Thread: [ <a href="msg00552.html">Previous</a> | <a href="msg00563.html">Next</a> ] Index: [ <A HREF="author.html#00562">Author</A> | <A HREF="#00562">Date</A> | <A HREF="thread.html#00562">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] ColdStore</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] ColdStore</LI> <LI><em>From</em>: Miroslav Silovic <<A HREF="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</A>></LI> <LI><em>Date</em>: 09 Dec 1999 12:43:31 +0100</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> Cynbe ru Taren <cynbe#muq,org> writes: > I'm particularly interested because I'm planning on converting Muq > to using mmap() next year. Your comments suggest that perhaps I > should retain the ability to run non-mmap()ed when I do. Note that mmapped is okay if you make it possible to serialize the object in some intelligent way and then copy them into the mmapped memory. > Did you mean "most 32-bit OSes"? Of course. Thought I mentioned 32-bits somewhere above but on rereading the post, aparently I didn't. > I don't mean to carp, but outside of Intel x86 boxes, 32-bits seems > basically dead, and I'd presumed that the 64-bit world was roomier > than this? Hmm. 64-bit is available on Alphas, and on SUN Ultras if you install Ultrapenguin (I was told that to run 64-bit code on Solaris, you need to open the machine and switch a jumper - aparently it's some sort of a bug workaround. They may have fixed it by now, though). HPUX and AIX are both 32-bit and will stay that way till Itanium begins shipping (that's in a year). IMHO you will almost certainly run your MUD on I-32 for the next 2 years. So, I stay with my 'most OSes' claim. :) > You obviously have alternatives in mind, but they aren't clear to > me. Cache + separate db is one alternative - this involves one more layer of copying, in exchange for safety (and other things I mentioned). You also have Texas Persistent Store (Altavista should be able to tell you about it). It works by making pointers to unloaded objects point to unreadable/unwritable page. This causes segfault on object access, and in the segfault handler you can munge the object contents without problems - namely, you demingle data pointers from object IDs to real object pointers and you track all the pointers to the original page and make them point to the real object instance. ColdStore authors chose not to implement this because, according to them, it performs really slowly. > I'd guess broken C++ code hitting memory could in principle trash > any db, but you see the risks as several orders of magnitude greater > when the entire db is memory-mapped, vs just a cache of it? Yes - when you bomb your cache and segfault, it's likely that serialisation code will bomb as it runs into inconsistent data, or that the server will break before it manages to write out the faulty objects. In both cases, inter-object consistency will break (i.e. objects may dissapear from their location's content list). However, if you only write out your cache periodically (like every 2-3 minutes) or use transactional database (see archives), this won't be an issue, either, and your server is free to crash at will *grin* > Or do you have solutions in mind for doing bug recovery well in > mmap()ed implementations, which ColdStore merely isn't implementing? No, apart from mmapped dbm with API layer. Note that a program is far less likely to wildly trash the memory than to overwrite the contents 'near' the objects currently being manipulated (that's what index overflows, writes into unmalloced, and writes into freed do... although if you manage to overwrite data structures used by allocator, you're out of luck). Things change when you ditch C++ altogether, though - there is a number of languages that don't allow you pointer arithmetics. This seems sucky because you can't implement array datastructure - but these languages generally come with arrays builtin. However, once you ditch pointer arithmetics, you also can't implement fancy allocation schemes by hand, so these languages also come with garbage collector built in. Java is a prime example (and with gjc, you can compile it into native code). Others are Sather, TOM, ML, Scheme (with Stalin and Hobbit compilers), Common LISP (with CMU CL compiler). Needless to say, none of these will allow for mmaps, either. Tradeoff is that you never again have to worry about memory bugs (modulo compiler bugs). > Is the db format COFF? Or what was the relationship to COFF? Or > am I misunderstanding completely some of the ColdStore-related > traffic I vaguely remember? They intern ELF symbols to keep updated with code changes (i.e. with moving method implementations). The problem is in data layout within the objects. I.e. adding new properties. And in the fact that C++ compilers may reorder properties at will. Let's be more specific about ELF interning (quoting from ColdStore docs): ------------ I realise that this decision entails considerable portability problems, and probably binds me to the distribution of special purpose link loaders, but I think it's the right technical choice, and I think the functionality should probably be present in standard libdl.nso. Since I can't even get an unequivocal consensus from the glibc team that relocating absolute symbols is a bug as well as a contradiction in terms, or that it doesn't conform to ELF standards, I hold no hope of having useful (but fairly specialised) functionality added to libdl.so unless I do it myself. ------------ From what I gather in their docs, this system is Linux/gcc-only. > You sound knowledgable: I'd be interested to hear you comment further. I'll post it in a separate thread. :) -- How to eff the ineffable? _______________________________________________ MUD-Dev maillist - MUD-Dev#kanga,nu <A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A> </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="00563" HREF="msg00563.html">Re: [MUD-Dev] ColdStore</A></strong> <ul compact><li><em>From:</em> J C Lawrence <claw#kanga,nu></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00552" HREF="msg00552.html">Re: [MUD-Dev] ColdStore</A></STRONG> <UL><LI><EM>From:</EM> Cynbe ru Taren <cynbe#muq,org></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00561.html">Re: [MUD-Dev] AI's in MUDS and Online Gaming</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00563.html">Re: [MUD-Dev] ColdStore</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00552.html">Re: [MUD-Dev] ColdStore</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00563.html">Re: [MUD-Dev] ColdStore</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00562"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00562"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: [MUD-Dev] New AI Engine released</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00566" HREF="msg00566.html">Re: [MUD-Dev] New AI Engine released</A></strong>, Bruce Mitchener, Jr. <a href="mailto:bruce#puremagic,com">bruce#puremagic,com</a>, Thu 09 Dec 1999, 17:05 GMT </LI> </ul> </LI> <LI><strong><A NAME="00545" HREF="msg00545.html">[MUD-Dev] ColdStore</A></strong>, J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 08 Dec 1999, 19:30 GMT <UL> <LI><strong><A NAME="00546" HREF="msg00546.html">Re: [MUD-Dev] ColdStore</A></strong>, Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Wed 08 Dec 1999, 20:28 GMT </LI> </UL> <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00552" HREF="msg00552.html">Re: [MUD-Dev] ColdStore</A></strong>, Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 08 Dec 1999, 21:48 GMT <UL> <LI><strong><A NAME="00562" HREF="msg00562.html">Re: [MUD-Dev] ColdStore</A></strong>, Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Thu 09 Dec 1999, 12:07 GMT <UL> <LI><strong><A NAME="00563" HREF="msg00563.html">Re: [MUD-Dev] ColdStore</A></strong>, J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 09 Dec 1999, 12:43 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> <LI><strong><A NAME="00543" HREF="msg00543.html">[MUD-Dev] Scenarios</A></strong>, Chris Lloyd <a href="mailto:crl199#soton,ac.uk">crl199#soton,ac.uk</a>, Tue 07 Dec 1999, 23:54 GMT <LI><strong><A NAME="00526" HREF="msg00526.html">[MUD-Dev] New member</A></strong>, IronWolf <a href="mailto:ironwolf#ewa,net">ironwolf#ewa,net</a>, Mon 06 Dec 1999, 06:10 GMT <LI><strong><A NAME="00523" HREF="msg00523.html">[MUD-Dev] Neural Networks as the AI system for a MUD?</A></strong>, PartyG2816 <a href="mailto:PartyG2816#aol,com">PartyG2816#aol,com</a>, Fri 03 Dec 1999, 00:35 GMT </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>