May, 2005

Posts
  • mgrier's WebLog

    Enough about in-memory models and transactions for now

    • 2 Comments
    I want to follow up on this topic of transactional behavior in memory but to motivate it I'm going to have to further discuss my other topics more about invariant restoration and (eventually) failure handling. The main point is this: there are potentially...
  • mgrier's WebLog

    Transactions and in-memory data (part 3 of n)

    • 2 Comments
    Last time I laid out a little framework for transactional rollback. It clearly is not sufficient for a real honest-to-goodness persistent transaction but if you can tolerate every ESE failing (due to allocating the rollback log entry) it's pretty compelling...
  • mgrier's WebLog

    Transactions and in-memory data (part 2 of n)

    • 6 Comments
    Buffering the opertations wasn't particularly successful. Let's look at maintaining a rollback log. Seems pretty simple. You can do something like: typedef void (*rollback_function_ptr_t)(void *context); typedef struct _rollback_record { rollback_function_ptr_t...
  • mgrier's WebLog

    Transactions and in-memory data (part 1 of n)

    • 1 Comments
    [Maybe I'll fill in the "n" when I'm done. I haven't had time to plan out the entire series...] In yesterday's post, I covered basically two approaches towards how to achieve transactionality. One is to build up a log of what to do when the commit...
  • mgrier's WebLog

    No Chinese Dictionaries

    • 3 Comments
    I want to go on the record and note that I will not be deveoping a Chinese/English Dictionary, in unmanaged code , managed code or any code (pages) .
  • mgrier's WebLog

    More than one way to skin a (transactional) cat

    • 4 Comments
    Let's briefly look at how databases deal with transaction rollback. I'm going to ignore a lot of other fun stuff around locking protocols, snapshots, isolation etc. and only focus on how atomicity & durability are achieved. I'll keep the conversation...
  • mgrier's WebLog

    Implementation patterns to support transactional functions

    • 1 Comments
    Let's go back now to why I had a hard time with using the STL std::map pattern. It was because for the primary failure-prone access pattern (insert), there is an inverse operation which could not fail. A common pattern in TxFn (sorry I can't keep writing...
  • mgrier's WebLog

    Local vs. global analysis revisited

    • 1 Comments
    I posted that last item before having my coffee so it's really not suprising that I forgot to get around to my point. My point is this: there are abundant tools (including the human brain) which are good at local analysis. Global analysis is hard;...
  • mgrier's WebLog

    Whole program vs. local analysis

    • 7 Comments
    A quick note for today. Maybe more tonight. Internally at Microsoft, as you can imagine, we have a number of tools to assist building our software. Many are internal-only; contrary to the black-helicopter gang out there, there is a lot of cost to shipping...
  • mgrier's WebLog

    Working with inexact error contracts

    • 1 Comments
    Last time I lamented that the fact that std::map::erase() is not permitted to fail made it hard to come up with an example. But the vector pattern has the basic problem I wanted to discuss. First I'll write the obviously correct C code and then we...
  • mgrier's WebLog

    Even good design can't succeed in isolation

    • 1 Comments
    I tried three times to write yesterday's entry which was intended to explore the same problems with trying to restore invariants in failure paths. Instead I kept getting fouled up because the collections I was using were based on the STL design. The STL...
  • mgrier's WebLog

    Why is fclose()'s contract so confusing?

    • 5 Comments
    Because it’s a long established pattern and contract, let’s explore fclose() today. Here’s my ideal fclose() implementation: int fclose(FILE *fp) { close(fp->fd); free(fp); return 0; } But of course close() can fail . Yuck. I found this man...
  • mgrier's WebLog

    What if close could fail?

    • 4 Comments
    Yesterday I made the claim that close() can’t fail in a meaningful way. Meaning that if it’s invoked on an object in a state that does not support close(), it’s a programming/coding error. I believe that this is correct but we’ll see that there are...
  • mgrier's WebLog

    Resource management scope termination

    • 2 Comments
    Ok I've pussy-footed around the topic, I'll try to draw at least one conclusion finally from one of my first entries in this series. When you have a pattern of real explicit resource management, the API that's used to denote the end of the resource...
Page 1 of 1 (14 items)