Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.
Title: NoSequel: Database FS and schema note: It is appropriate to think of `User` and `Index` as a **folder**. For example, each user will have a folder dedicated to them, and each index (which will be clear later) will have a folder for itself, and so on. A `Collection` is a grouping of `Document`s. For example, we might have many swimlane diagrams, each one of these can be considred a individual document. If we grouped these documents by say, likeness, then each group is a collection of swimlanes. Now, the documents we're going to be working with here are essentially *schema-less structures*; similar to MongoDB. So, `Collection`s are essentially files (most likely text files), and `Document`s are blocks of data in readable text that are written to the `Collection` text file. The following schema defines the structs. The data in these structs will be stored in a seperate file. To be defined later. - To do: What happens when an integer id overflows (greater than 2^64)? Should we do this in hex? User -> Index: note: - Useful in API calls related to signing in. When a user signs in, they'll want to receive data about the indices and collections they possess, so this is a good starting point for an API like that. ``` struct User{ username string password string indexList [string] //name ofindex folders this user owns id //the uid aeskey //32 byte AESkey attached IFF signed in clientPub //client's public key. used only during sign in } ``` - User folders are named as such: `<uid>` where uid is a number from a counter than increments each time a new user is created. Index -> Collection: note: - Think of indexes like seperate and distinct projects. I might have 3 concurrently ongoing projects, so its reasonable I have 3 distinct databases and thus 3 distinct and seperate indices. - Also used mostly in signing in. However, this *might* have additional application when doing CRUD operations. More details to be refined ``` struct Index{ owner string //owner's uid indexName string collectionList [string] //name of collections in this index } ``` - Index folders are named as such: `<uid>-<iid>` where iid is a number from a counter than increments each time this user creates a new index. Collection -> Document: note: - Collections are files, and documents are objects inside the file. ``` struct Collection{ colName string //name of collection docIdSet set[string] //set of docIDs } ``` - We maintain `docList` to facilitate lookups. However, there is no working idea on how to do this efficiently. Ideally, we don't load all the documents in this collection into memory every time we want something. - `Document`s have the form ``` struct Document{ docId string data interface{} //the actual data. } ```