(zettel (meta (back "00001004011200 00001006020000 00001006020400 00001018000000") (backward "00001004010000 00001004011200 00001006020000 00001006020400 00001018000000") (box-number "1") (created "00010101000000") (forward "00001003000000 00001004010000 00001004051000") (modified "20220724200512") (published "20220724200512") (role "manual") (syntax "zmk") (tags "#configuration #manual #zettelstore") (title "Configure file directory boxes")) (rights 4) (encoding "") (content "Under certain circumstances, it is preferable to further configure a file directory box.\nThis is done by appending query parameters after the base box URI ''dir:\\//DIR''.\n\nThe following parameters are supported:\n\n|= Parameter:|Description|Default value:|\n|type|(Sub-) Type of the directory service|(value of \"\"[[default-dir-box-type|00001004010000#default-dir-box-type]]\"\")\n|worker|Number of worker that can access the directory in parallel|7\n|readonly|Allow only operations that do not create or change zettel|n/a\n\n=== Type\nOn some operating systems, Zettelstore tries to detect changes to zettel files outside of Zettelstore's control[^This includes Linux, Windows, and macOS.].\nOn other operating systems, this may be not possible, due to technical limitations.\nAutomatic detection of external changes is also not possible, if zettel files are put on an external service, such as a file server accessed via SMB/CIFS or NFS.\n\nTo cope with this uncertainty, Zettelstore provides various internal implementations of a directory box.\nThe default values should match the needs of different users, as explained in the [[installation part|00001003000000]] of this manual.\nThe following values are supported:\n\n; simple\n: Is not able to detect external changes.\n Works on all platforms.\n Is a little slower than other implementations (up to three times).\n; notify\n: Automatically detect external changes.\n Tries to optimize performance, at a little cost of main memory (RAM).\n\n=== Worker\nInternally, Zettelstore parallels concurrent requests for a zettel or its metadata.\nThe number of parallel activities is configured by the ''worker'' parameter.\n\nA computer contains a limited number of internal processing units (CPU).\nIts number ranges from 1 to (currently) 128, e.g. in bigger server environments.\nZettelstore typically runs on a system with 1 to 8 CPUs.\nAccess to zettel file is ultimately managed by the underlying operating system.\nDepending on the hardware and on the type of the directory box, only a limited number of parallel accesses are desirable.\n\nOn smaller hardware[^In comparison to a normal desktop or laptop computer], such as the [[Raspberry Zero|https://www.raspberrypi.org/products/raspberry-pi-zero/]], a smaller value might be appropriate.\nEvery worker needs some amount of main memory (RAM) and some amount of processing power.\nOn bigger hardware, with some fast file services, a bigger value could result in higher performance, if needed.\n\nFor various reasons, the value should be a prime number.\nThe software might enforce this restriction by selecting the next prime number of a specified non-prime value.\nThe default value is 7, the minimum value is 1, the maximum value is 1499.\n\n=== Readonly\nSometimes you may want to provide zettel from a file directory box, but you want to disallow any changes.\nIf you provide the query parameter ''readonly'' (with or without a corresponding value), the box will disallow any changes.\n```\nbox-uri-1: dir:///home/zettel?readonly\n```\nIf you put the whole Zettelstore in [[read-only|00001004010000]] [[mode|00001004051000]], all configured file directory boxes will be in read-only mode too, even if not explicitly configured."))