?

Log in

Journal of Omnifarious

Jun. 23rd, 2011

12:05 pm - Digital signatures and documents

Random rambling and noodling about a CAKE implementation issueCollapse )

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] contemplative

Jun. 21st, 2011

11:39 am - People are so weirdly emotional about money

I've been paying a lot of attention to bitcoin recently. It's a fascinating idea, and I'm really curious as to where it will go. But reading the comments on the Internet about it is even more interesting, though also kind of upsetting. People say the most ridiculous and stupid things, and it's all out of nearly violent emotion. I don't really understand.

Some people say ridiculous things like "It can only go up!" (in reference to the USD/Bitcoin exchange rate) or "It can't fail!". Optimism beyond the point of sanity. Bitcoin can fail. It can fail if it turns out that nobody wants to accept it. Currency that nobody will trade anything for is just as useful as a small piece of paper, and in bitcoin's case, even less useful. And that's a very definite possible future of bitcoin.

People also go through all kinds of logical contortions to declare it a scam. But it doesn't fit the definition of a ponzi scheme any more than any other currency does, nor does it fit the definition of a pyramid scheme at all. The closest it comes to is a hot tech stock. And nobody calls those scams unless they accuse them of 'pump and dump'. But 'pump and dump' doesn't fit the profile of most people who are interested in bitcoins and are trading them either.

And then people declare it valueless, as if any currency (even gold) has any intrinsic value beyond people's willingness to trade stuff for it.

Very few people talk about the worthiness of the cryptography. But even the ones who do paint either incredibly rosy pictures or ridiculous apocalyptic scenarios, neither of which really approach the truth of things.

I just find the way people ignore any reason and base their opinions on pure emotion to be kind of upsetting. And I notice this in a lot of arguments. But the arguments over bitcoin are almost comical in just how incredibly intense this phenomena is. The only thing that makes it not comical is that you realize these people are deadly serious.

I think a lot of people have a lot of unexamined hang-ups about the meaning of money. It's deeply tied to their fundamental beliefs about politics, ethics, morality, and even self-worth. I think most people are terribly unequipped to tease these things apart and examine them separately. Money is 'magic'. People do not see it as the societal cooperation tool that it is.

I think, perhaps, that is one of the most valuable parts of the bitcoin project. Its nature provides a handle or a window for examining money as a societal and organizational tool. I suspect most people won't be able to take advantage of this, but I suspect many will, and our society will become richer for it.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 5615 24th Ave NW, 98107
Current Mood: [mood icon] contemplative

Jun. 10th, 2011

04:35 pm - Help! DynDNS has become prohibitively expensive!

They want to charge me $40/yr per domain for secondary DNS! $40/yr! This is completely ridiculous. With the volume of lookups I get, I could probably host all the domains on my own server on a DSL line if I wanted.

Is anybody out there willing to provide secondary DNS for a few domains for me? I'm willing to cough up the equivalent of $10/yr in bitcoins for the service if you really want.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 5819 24th Ave NW, 98107

May. 30th, 2011

05:01 am - Session properties

I've been puzzling over a minimal and orthogonal set of properties for a session. I at first thought there were 3:

Message boundaries preserved
Whether or not your messages are delivered in discrete units, or whether they are delivered as a stream of bytes in which the original sizes of the send calls bear no relevance to how the bytes are chunked together on the other end.
Ordered
Whether or not data arrives in the order you sent it
Reliable
Well, this has a tricky definition. For TCP it means that failure to deliver is considered a failure of the underlying connection. But after such a failure you can't really be sure about exactly which bytes were delivered and which weren't.

But, as is evidenced by my description of 'reliable', these properties are not as hard-edged as they might seem. I also thought about latency, for example a connection via email is relatively high latency, and a connection between memory and the CPU is generally pretty low latency. But I'm looking for hard-edged, yes/no type properties that are in some sense fundamental. Latency seems like a property that's rather fuzzy. It exists on a continuum, and isn't really a defining feature of a connection, something that would drastically alter how you wrote programs that used the connection. In an object model, it would be an object property, not something you'd make a different class for.

But I find TCP's notion of 'reliability' very curious. It isn't really, in any sense, particularly reliable. I've had ssh connections that died, but when I reconnect to my screen session, I discover that a whole bunch of the stuff I was typing made it through, it just wasn't echoed back.

It also interacts with 'ordered' in an odd way. It might make sense to have an unordered connection that was 'reliable', but what does that really mean then? If it's a TCP notion of reliability, you could just deliver the last message and have the connection drop. Also, what would it mean to have an unreliable, but ordered connection? Would that mean you could send a bunch of messages and have only the first and last ones delivered? And would it make any sense at all to have an unordered, unreliable connection in which message boundaries were not preserved?

So I've come up with a different division...

Message boundaries preserved
Whether or not your messages are delivered in discrete units, or whether they are delivered as a stream of bytes in which the original sizes of the send calls bear no relevance to how the bytes are chunked together on the other end.
Ordered
Whether or not data arrives in the order you sent it
Must not drop
This means that if a message does not make it through, the connection is considered to be in an unrecoverable error state, and no further messages may be sent. Though you may not know which message didn't make it through.
Delivery notification
Whether or not you can know that a message made it to the other side or not.

These are not fully orthogonal. For example, if message boundaries are not preserved, then, in order for a connection to be in the least sensible, it must also have the 'ordered' and 'must not drop' properties. Also, if you must not drop messages, I'm not sure that it would then be sensible to have out-of-order delivery.

One of the rules of the system I'm designing is that any property that is not required may be provided anyway. This makes non-orthogonality much easier to deal with. So the prior cases aren't really a problem.

Can any of you think of a better set of properties, or important properties that I left out?

Some good discussion also happens in this Google Buzz post that mirrors this entry.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 4700 12th Ave NE, 98105
Current Mood: [mood icon] contemplative

May. 4th, 2011

03:03 pm - The hidden cost of your iPad

Suicide is so common in Chinese iPad factories that the company has taken to forcing prospective employees to sign no-suicide pacts.

Talk about treating the symptom instead of the disease.

A friend of mine has pointed out that this story is made to seem a lot worse than it really is. In particular the suicide at Foxconn plants is much lower than it is at other similar facilities in China. He is also not much of a fan of Apple the company, so he doesn't have a fanboy bias. I'm not completely sure I agree with this way of looking at things, but here is what he wrote, so you can make up your own minds:

This story has been highly sensationalized. The reality is almost exactly the opposite of what you read.

  1. Eighteen Foxconn employees committed suicide in 2010 [1]... out of 920,000 workers [2]. That's a rate much lower than the Chinese average of 66 per million [3], which itself is like half of the American average of 111 per million [3].
  2. Apple is just one of many Foxconn clients. Others include Amazon (Kindle), Intel, Dell, Nintendo, Sony, Samsung, and many others [2]. Apple products are a small minority of Foxconn's output, yet the media calls them the "iPad factory". This is obviously intended to sensationalize the story -- scandal involving Apple is much more interesting that scandal involving Samsung.

I suspect that Foxconn came up with these no-suicide pledges in a desperate attempt to placate the media, and due to cultural differences they don't understand that to the American audience it only makes them look worse.

[1] http://en.wikipedia.org/wiki/Foxconn_suicides
[2] http://en.wikipedia.org/wiki/Foxconn
[3] http://en.wikipedia.org/wiki/List_of_countries_by_suicide_rate

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 1309 NE 45th ST, 98105
Current Mood: [mood icon] annoyed

Apr. 19th, 2011

06:16 am - Building codes

Building codes serve a few functions. The most important one is safety. But another is ensuring that your home does not fall to pieces in 10 years (after the builders are long gone) by forcing certain minimum standards of construction.

To the latter end, I think building codes for multi-unit dwellings should require that each and every single unit have a single fiber drop in the unit. I assume there are standards for phone hookups today (and possibly cable), and the fiber standard would have a very similar purpose and structure.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] contemplative
Current Music: Goodbye Stranger - Supertramp

Mar. 28th, 2011

08:25 am - CAKE has reached a small milestone

CAKE reached a new milestone early this morning. It now successfully both generates and parses messages that use the new protocol. It also successfully detected a re-used session id. I also think the code that does this is also a lot better designed than the old code was. It's easier to see how to put it in the context of a larger system that implements a node that speaks the protocol

It's also much more extensively tested at a deeper level with tests that are designed to document the inner workings of the system.

Overall, it's in a much better state than I left it when I sort of stopped working on it much in 2004. And I'm going to handle the hard problems first, how to maintain the relationship between sessions and transports, and having two way realtime conversations between nodes. This rather than concentrating on the messages that will be traded back and forth at a higher level (which will be done using protobuf). That can come later, especially since I'm not likely to get it right the first time anyway.

I also need to think about getting nodes to participate in a DHT to share assertions (like how to reach a particular node) in a distributed way.

Lastly, the protocol has something of a problem with 'liveness' because I designed it with the idea of conversations being able to be initiated without any round trips. There are some mitigation for this problem in session ids, but that mitigation is somewhat problematic because it requires the recipient of a conversation initiation to keep track of some stuff for everybody who tries to talk to it.

I'm not really sure how to handle the 'liveness' problem though and still preserve the lack of round trips property. I could require that session ids contain an 'hour number' or something similar. Though that introduces a requirement for at least very coarse grain time synchronization for all nodes.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: 4700 12th Ave NE, 98105
Current Mood: [mood icon] accomplished

Feb. 25th, 2011

12:16 pm - Memory

Memory is stored in so many places. A sea shell contains the memory of the organism that made it. Its trials and tribulations are recorded in the layers of material it deposited. Since it was unable to make a meaningful decision based on these memories, we hesitate to call them so, but our scientists eagerly read them, read the memories in whole stratas of seashells, the memories of entire ecosystems.

We implicitly recognize this when we say something like "this house is full of memories". Every nick and change, unnoticeable by some, tells a tale of something that happened there. The patterns of wear on the floor, the neglected dusty corners tell tales as well.

Forensics is the art of reading memories from these structural changes. Reading memory from these things we hesitate to call memory because they are not immediately accessible to a living process. But memories they are.

We have a collective memory too. The most obvious and directly accessible is books. But we have memories in our cities, in our tools, in the structures both great and small. They are like mankind's seashells.

We think of ourselves as relatively self contained. We are divided from the world by the interface of our immediate perceptions. But that division is fuzzy and indistinct. We are much larger than our bodies. And much of our memory lives outside our heads.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Tags:
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] contemplative

Feb. 2nd, 2011

02:36 pm - Interesting design problem with serialization and deserialization

I have been working on a serialization framework I'm happy with for Python. I want to be able to describe CAKE protocol messages clearly and succinctly. This will make it easier to tweak the messages without having to rip apart difficult to understand code. It will also make it easier to understand if I drop the project again and then come back to it years later, or if (by some miracle) someone else decides to help me with it.

This is a very long post.Collapse )

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Current Location: Bellevue, WA
Current Mood: [mood icon] contemplative
Current Music: Supreme Beings of Leisure - Strangelove Addiction

Dec. 4th, 2010

03:26 pm - Protocol buffers?

I have a problem for which protocol buffers seem like a good solution, but I'm reluctant to use them. First, protocol buffers include facilities for handling the addition of new fields in the future. This adds a small amount to a typical protocol buffer message, but it's a facility I do not need.

Also, I feel the variable sized number encoding is less efficient than it could be, though this is a very minor issue. I also feel like I have a number of special purpose data types that are not adequately represented.

I'm also not completely pleased with the C++ and/or Python APIs. I think they contain too many googlisms. I would like to see public APIs published that were free of adherence to Google coding standards like do-nothing constructors and no exceptions.

I think, maybe, I will be using protocol buffers for some messages that are sent by applications using CAKE as a transport/session layer. These include some of the sub-protocols that are required to be implemented by a conforming CAKE implementation.

On a different note, I think Google's C++ coding standards are lowering the overall quality of Open Source C++ code. This isn't a huge effect, but it's there.

It happens because Google's good name is associated with a set of published standards for C++ coding that include advice that while possibly good for Google internally is of dubious quality as general purpose advice. It also happens because when Google releases code for their internal tools to the Open Source community, these tools follow Google's standards. And some of these standards have the effect of making it hard to use code that doesn't comply with those standards in conjunction with code that does.

Please reply to my original post on Dreamwidth. If you don't have an account there you can log in using your LiveJournal account. Just login using OpenID and give http://<LJ account name>.livejournal.com/ as your OpenID. For example, for the LJ user rosencrantz319 that would be http://rosencrantz319.livejournal.com/ as their OpenID.

Navigate: (Previous 10 Entries | Next 10 Entries)