Fork me on GitHub
#asami
<
2021-06-30
>
Mattias20:06:10

Wow, looks very solid after a first skim. I’ll spend some time doing a lot of newbie trial and error to get data in, I’ll report any huge blind spots in the docs that only the uneducated can find… 😅

quoll20:06:54

It’s tough to provide sufficient info for the various ways people want to bring in data, without also overwhelming people

Mattias20:06:54

Tiny detail fwiw, on this page: https://github.com/threatgrid/asami/wiki/7.-Asami-API the link to the “querying” chapter misses and gets you to the index. (https://github.com/threatgrid/asami/wiki/Querying) but should be (?) https://github.com/threatgrid/asami/wiki/6.-Querying

quoll20:06:17

Ah, thank you. I added numbers to try to put it into some kind of order, and that updated the links

😊 2
Mattias20:06:31

Yeah, the whole Clojure world sort of expects people to magically be vets from the start. I think all levels of docs really help, but of course, once you’ve fought your way past it might feel silly (for some) to provide the help that would have been good.

quoll20:06:12

To that point: I’m going on about Clojure syntax and “keywords” without explanation. I felt awkward expecting people to know, but I figured they’re not going to be here if they don’t know Clojure

Mattias20:06:41

Hah, well. Even advocating for lowering the bar like I do, I think you’re safe. Finding Asami and being interested does require some knowledge so I’d say you’re all right there 😀

Mattias20:06:20

Another question when you are generous with your time - what is the relation to Asami 2? Is it just the next version or is it more dramatic? 🙂

quoll20:06:34

I was debating getting rid of that page entirely. It was important back when it was still in Alpha

quoll20:06:05

Asami 1.x was entirely in-memory. Asami 2.x supports in-memory databases, and on-disk databases

quoll20:06:19

in-memory databases are created with URLs of: asami: or asami: on disk databases are created with URLs of: asami:

Mattias20:06:30

Interesting, I’m eager to try that out as well. Is there any info to be found? How are the files found or routed to, etc? 🙂

quoll20:06:06

Current directory of the process. They use the database name to create a directory and then everything is stored in there

quoll20:06:15

So if you start a repl while you’re in /home/me/data then type:

(require '[asami.core :as d])
(def c (d/connect "asami:"))
You now have a directory of /home/me/data/database which contains the files that Asami uses for storage

Mattias20:06:42

Very cool, thanks. Can you modify the path via the URL? I just know someone is going to want to specify a path to some persistent volume (running Docker) in my near future… 🙂

quoll21:06:32

Not exactly. I didn’t want people to use URLs like asami:local://../../etc/httpd and do something silly on your system, so I filter .. out from paths. If I wanted to do what you’re saying, then I’d use a symlink, and point the URL to use that

quoll21:06:41

It does handle nested paths though

quoll21:06:39

so asami: will create one/, one/two/, and one/two/three/

quoll21:06:56

Perhaps I should introduce a system property to specify where to open things, and fallback to the pwd when it’s not available

Mattias21:06:17

Sounds good, symlinking would take care of it. Keep it simple. 🙂