exo-notes/content/posts/20220223.md

1.8 KiB

Title: 20220223 Slug: 20220223 Date: 2022-02-23 22:22 PST Modified: 2022-02-23 23:24 PST Category: Tags: journal Authors: kyle Summary: Design work on blobs.

Blob structures

I finished writing out the basic blob database and structure types. The blob was a structure like

type Blob struct {
	ID          string
	Header      *Header
	ContentType string
	Contents    []byte
}

I decided to make it an io.Reader to make it better handle large files; rather than load them entirely into memory, we can do a straight buffer.

type Blob struct {
	ID          string
	Header      *Header
	ContentType string
	r           io.Reader
}

Syncing questions

I have a problem that I'm having difficult reconciling and I'll need to revisit. Let me try to talk my way through it: I plan on running exod on my laptop, or rather, I plan on having the ability to run it offline. However, if I want to stash something while my laptop is asleep, that breaks. If I store the repo remotely but make local changes offline, how do I sync it?

I think the answer to this is to set up a buffer server, something like another sync queue. If a connection fails, I'll add a task on phobos to keep retrying occasionally (with a daily report), this should work.

The use case I'm thinking of is adding to my exocortex from my phone while traveling, for example. The two modes that I think will work well with this are adding artifacts and adding quick notes.

A quick note would be a node named something like

quick =>
  2022 => 
    02 =>
      23

The quick note function will add a new cell to the existing quick note for the day. The idea is that I'll revisit that the next day, or at the end of the day, and integrate those notes into the rest of the exocortex.

I'm satisfied with this approach for now.