asami

Asami, the graph database https://github.com/threatgrid/asami
quoll 2021-06-30T20:12:35.213200Z

@mattias504 How does this look? https://github.com/threatgrid/asami/wiki/3.-Loading-Data

2021-06-30T20:36:10.215800Z

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… 😅

quoll 2021-06-30T20:38:54.217100Z

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

2021-06-30T20:39:54.217800Z

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

quoll 2021-06-30T20:41:17.219700Z

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

😊 1
2021-06-30T20:41:31.219900Z

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.

2021-06-30T20:42:20.220700Z

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? 🙂

quoll 2021-06-30T20:43:12.221Z

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

quoll 2021-06-30T20:43:34.221600Z

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

quoll 2021-06-30T20:44:05.222200Z

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

quoll 2021-06-30T20:45:19.223500Z

in-memory databases are created with URLs of: asami:<mem://database> or asami:<multi://database> on disk databases are created with URLs of: asami:<local://database>

2021-06-30T20:50:30.226800Z

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? 🙂

quoll 2021-06-30T20:52:06.229300Z

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

2021-06-30T20:52:41.230400Z

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 😀

quoll 2021-06-30T20:53:15.231200Z

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:<local://database>"))
You now have a directory of /home/me/data/database which contains the files that Asami uses for storage

2021-06-30T20:58:42.234100Z

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… 🙂

quoll 2021-06-30T21:04:32.236100Z

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

quoll 2021-06-30T21:04:41.236400Z

It does handle nested paths though

quoll 2021-06-30T21:05:39.237400Z

so asami:<local://one/two/three> will create one/, one/two/, and one/two/three/

quoll 2021-06-30T21:06:56.238Z

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

2021-06-30T21:15:17.238700Z

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