exo-notes/content/posts/20220223.md

68 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2022-02-24 06:55:41 +00:00
Title: 20220223
Slug: 20220223
Date: 2022-02-23 22:22 PST
2022-02-24 07:35:27 +00:00
Modified: 2022-02-23 23:24 PST
2022-02-24 06:55:41 +00:00
Category:
Tags: journal
Authors: kyle
Summary: Design work on blobs.
2022-02-24 07:35:27 +00:00
## Blob structures
2022-02-24 06:55:41 +00:00
I finished writing out the basic blob database and structure types. The
blob was a structure like
2022-03-01 06:08:20 +00:00
```go
2022-02-24 06:55:41 +00:00
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.
2022-03-01 06:08:20 +00:00
```go
2022-02-24 06:55:41 +00:00
type Blob struct {
ID string
Header *Header
ContentType string
r io.Reader
}
```
2022-02-24 07:35:27 +00:00
## 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
2022-03-01 06:08:20 +00:00
```text
2022-02-24 07:35:27 +00:00
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.