Slashdot Mirror


User: noelbk

noelbk's activity in the archive.

Stories
0
Comments
8
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 8

  1. Re:Read the linked article, and... on Google Blacklists CNet Reporters · · Score: 1
    It's likely just a matter of time until the US uses the Patriot Act to get personal info out of Google without disclosure. The Patriot Act http://www.aclu.org/Privacy/Privacy.cfm?ID=11054&c =130 obliges US companies to disclose any information without notifying their customers. Your search history and gmail accounts are effectively the property of Uncle Sam.

    Google may wish to Do No Evil, but that doesn't mean they can't be coerced.

  2. Re:Threads on Visions Of The Future Of Grid Computing · · Score: 1

    Moving threads is possible and desirable. Think of a single MySQL server spread over a cluster.

    I did some work on that at Uni years ago. You can move threads from one machine to another transparently. You page in memory over the network on demand, mark "dirty" pages, and send page diffs back. It's neat to see it working (two threads running on different machines), but network latency is a problem.

    Google for distributed shared memory for similar projects.

  3. Re:BKBox.com on Where are the 'Modern' Directory Services? · · Score: 1

    Oops! That hurt. The BKBox demo server is feeling a little Slashdotted, please check later.

  4. BKBox.com on Where are the 'Modern' Directory Services? · · Score: 1

    Check out http://bkbox.com/ It integrates OpenLDAP, Kerberos, OpenAFS, Apache, and WebDAV.

  5. Re:Sorry I Haven't Gotten It Yet on Object-Oriented 'Save Game' Techniques? · · Score: 1

    Yes, you shouldn't have to write serialization code by hand. And there's no C++ library I know that serializes objects (perl and python have such facilities built in.)

    If you want a code-less way to save lots of state, and aren't worried about cross-platform portability, try mmalloc: http://www.math.utah.edu/docs/info/mmalloc_1.html. That can allocate all your game state variables in memory which also persists in a file on disk, automatically.

    To create game state:

    fd = fopen("my_state_file", "r+");
    md = mmalloc_attach(fd, 0)
    my_state_root = mmalloc(md, sizeof(*my_state_root));
    mmalloc_setkey(md, 1, my_state_root);
    // add linked list of state structs
    mmalloc_detach(md);
    fclose(fd);

    To restore game state instantly (no serialization code at all):

    fd = fopen("my_state_file", "r+");
    md = mmalloc_attach(fd, 0)
    my_state_root = mmalloc_getkey(md, 1);
    // change state, free and alloc nodes
    mmalloc_detach(md);
    fclose(fd);

    Note that when you restore, all data (including pointers) will be valid without any serialization code at all. But, the save file will not be portable between different architectures.

    HTH

    --Noel

  6. Re:I use XDR myself on Object-Oriented 'Save Game' Techniques? · · Score: 1

    OK, It's at http://www.bkbox.com/~noel/bkxdr-0.01.tgz. Let me know how it goes.

  7. I use XDR myself on Object-Oriented 'Save Game' Techniques? · · Score: 1

    I needed to serialize C structs too (for a network protocol), and writing serialization code for every message was too tedious and error prone. So, I made my own serialization package based on Sun's XDR code.

    This is from the README:

    The bkxdr library is for serializing C data structures to portable
    compact byte streams or XML. You describe the data structures in a
    C-like type library, and this library generates the C header file and
    serialiation code for you.

    It handles almost all C types including strings, arrays, pointers
    (liked lists and graphs), and binary blobs. It's handy for sending
    structs as network messages, saving complex structs to disk, or making
    deep copies of linked structs.

    The code is based on Sun's XDR specification which is used to
    serialize structs for RPC. XDR is a standard (rfc1832) compact
    machine-portable binary format. I've modified the library to use XML
    instead of the binary format, if you choose. So, you can serialize
    your structs to compact portable binary or readable XML.
    You're welcome to it if you like, just send me a reply.
  8. Re:Non-Java Implementations? on Database Clusters for the Masses · · Score: 1

    Yes! Check out www.hotswap.net. We're developing process replication and failover at the OS level, so any program (C, Java, Python, whatever) can fail over transparently. So far we've tested Perl, Python, and PostgreSQL.