dasemuandClaude Sonnet 5 c96b8a7a68 Fase 7: cache the daemon's per-invoke lock check, harden mobile server config storage
assert-lock-owner! ran on every write invoke and did fs.existsSync +
fs.readFileSync + JSON.parse + a process.kill(pid, 0) syscall each
time -- all synchronous on the Node event loop, once per request. Now
cached in db_worker_node_lock.cljs: the lock file's content is cached
and invalidated by watching its containing directory (survives an
unlink+recreate, unlike watching the file path directly), and the
liveness check is skipped entirely when the recorded pid is this
process's own -- the dominant case, since assert-lock-owner! is the
owner checking its own lock, not a stranger checking someone else's.
Writes this process makes itself (create-lock!/update-lock!/
remove-lock!) invalidate the cache synchronously in the same call, so
the only staleness window is for a lock file changed by another
process -- a few ms until the fs.watch callback fires, which doesn't
weaken the two-daemons-can't-both-hold-a-live-lock guarantee.

Verified against a real daemon (5 consecutive write invokes, no
lock-watch-failed warnings) and with two new tests: one proving
repeated assert-lock-owner! calls keep agreeing with an unchanged
lock, one proving a lock file rewritten by "another process" (a raw
fs.writeFileSync bypassing update-lock!'s own invalidation) is picked
up within the polling window instead of being served stale forever.
All 8 pre-existing lock tests and all 61 db-worker-node-test tests
still pass.

frontend.config's db-worker-server-url/token getters/setters stay
synchronous localStorage reads everywhere (retrofitting their many
callers to await an async native store is out of scope), but on native
mobile, writes now also mirror into frontend.mobile.secure-storage
(OS keychain/keystore) as a durability backstop -- WebView localStorage
can be evicted under storage pressure or not survive a reinstall.
mobile.init/init! now fires config/<restore-server-config-from-secure-
storage! at startup to copy a surviving value back into localStorage
if it came back empty. Guarded so this is a true no-op outside native
mobile (including under Node tests, where it's additionally gated by
the same util/node-test? check the existing localStorage calls already
used) -- verified via the :mobile shadow-cljs target compiling clean
and the full test suite (subs-test, config-test, db-worker-node-test,
db-worker-node-lock-test, subs-loader-test) staying green.

iOS ATS and Android cleartext traffic, also called out in this phase
of the plan, turned out to already be configured permissively
(NSAllowsArbitraryLoads in Info.plist, cleartextTrafficPermitted in
network_security_config.xml) -- no changes needed there.

Investigated whether db-core's .remoteInvoke serializes concurrent
invocations, per the plan's own open question: it does not --
frontend.common.thread-api/remote-function dispatches straight into
the handler with no per-repo queueing, so two concurrent write invokes
to the same repo could in principle interleave at any await point
inside the handler. Deliberately did NOT add a write queue for this:
the plan gates that on Fase 0 telemetry showing real invoke overlap in
practice, and doing it without solid evidence of need risks a mistake
in read-vs-write method classification for uncertain benefit --
querying methods (:thread-api/q, :thread-api/get-render-snapshots,
etc.) share the same repo-scoped lock-check path Fase 6 just optimized
for read latency, and serializing those too would undo that work.
Left as an explicitly open question rather than guessed at.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 11:33:30 +02:00
2026-08-25 15:32:15 +02:00

Logseq

A privacy-first, open-source platform for knowledge management and collaboration



Download Logseq

forum chat on Discord follow on Twitter

latest release version

Table of Contents

🚀 Database Version

The Database version (DB version) of Logseq introduces DB graphs. See this page to get an overview of the main features for DB graphs. If you are an existing user, see changes with the DB version. The DB version has its own new mobile app (on iOS, with Android coming soon)! To participate in the mobile app alpha, please complete this brief form. The DB version also has a new sync approach, RTC (Real Time Collaboration)! You can use it to sync graphs between multiple devices or collaborate with others. To participate in the RTC alpha, please fill out this form.

The DB version is in beta status while the new mobile app and RTC is in alpha. This means that data loss is possible so we recommend automated backups or regular SQLite DB backups. We recommend you create a dedicated test graph and choose one project that’s not crucial for you.

To get started with the DB version:

  • To try the latest web version, go to https://app.logseq.com/.
  • To try the latest desktop version, go to https://github.com/logseq/logseq/releases/tag/nightly and download the artifact for your operating system.
  • To try the latest by building from the source code
    • Use test/db for stable releases. Fewer bugs and slower updates. Update frequency: days or weeks.
    • Use master for the latest updates as they are developed. Expect more bugs and faster changes. Update frequency: hours or days.
  • To report bugs, please file them at https://github.com/logseq/db-test/issues.
  • For feature or enhancement requests, please file them on Discord on the #db-feedback channel.
  • For discussions:
    • General ==> see the #db-chat channel in Discord.
    • Sync and RTC ==> see the #sync-test channel in Discord.
    • Mobile ==> see the #mobile-test channel in Discord.

🤔 Why Logseq?

Logseq is a knowledge management and collaboration platform. It focuses on privacy, longevity, and user control. Logseq offers a range of powerful tools for knowledge management, collaboration, PDF annotation, and task management with support for multiple file formats, including Markdown and Org-mode, and various features for organizing and structuring your notes.

In addition to its core features, Logseq has a growing ecosystem of plugins and themes that enable a wide range of workflows and customization options. Mobile apps are also available, providing access to most of the features of the desktop application. Whether you're a student, a professional, or anyone who values a clear and organized approach to managing your ideas and notes, Logseq is an excellent choice for anyone looking to improve their productivity and streamline their workflow.

logseq-demo

Download Logseq

👀 How can I use it?

To start using Logseq, follow these simple steps:

  1. Download the latest version of Logseq
  2. Install Logseq on your device and launch the application
  3. Start writing ✍️

That's it! You can now enjoy the benefits of using Logseq to streamline your workflow, manage your projects, and stay on top of your goals. Have fun! 🎉

Linux users: Use the automated installer script for the best experience:

# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash

# Or install a specific version
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- 0.10.14

# For user-specific installation (no root required)
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- --user

📚 Learn more

🫶 Support Logseq Development

If you find Logseq useful and want to help us keep the project growing, please consider supporting our contributors on Open Collective. Your support shows our contributors that their efforts are appreciated and motivates them to continue their excellent work. Every contribution, no matter how small, helps us keep improving Logseq.

💡 Feature requests

We value your input on improving Logseq and making it more useful for you. If you have any ideas or feature requests, please share them in the Logseq Forum: Feature Requests section.

Your feedback helps us understand our users' needs and prioritize the features that matter most to you. We appreciate your time and effort in sharing your thoughts with us.

We appreciate your support, and we look forward to hearing your ideas!

🔌 Plugin API

Logseq provides a plugin API that enables developers to create custom plugins and extend the functionality of Logseq. The plugin API documentation is available at plugins-doc.logseq.com, where you can find everything needed to get started with plugin development.

We value your feedback and suggestions on how to improve our documentation. Please do not hesitate to contact us with any comments or questions. Your input helps us to provide a better experience for our users and developers.

Thank you for using Logseq, and we look forward to seeing what you create with our plugin API!

🌟 Contributing to Logseq

To start contributing to Logseq, please read CONTRIBUTING.md. There are ways to contribute with code and without code. We welcome all contributions, big or small, and we appreciate your time and effort in helping us improve Logseq. We look forward to your contributions 🚀

🛠️ Setting Up a Development Environment

If you want to set up a development environment for the Logseq web or desktop app, please refer to the Develop Logseq guide for macOS/Linux users and the Develop Logseq on Windows guide for Windows users.

In addition to these guides, you can also find other helpful resources in the docs/ folder, such as the Guide for Contributing to Translations, the Docker Web App Guide and the mobile development guide

🧰 Logseq CLI (Node)

Logseq CLI documentation is maintained in docs/cli/logseq-cli.md.

✨ Inspiration

Logseq is inspired by several unique tools and projects, including Roam Research, Org Mode, TiddlyWiki, Workflowy, and Cuekeeper.

We owe a huge debt of gratitude to the developers and creators of these projects, and we hope that Logseq can continue to build on their innovative ideas and make them accessible to a broader audience.

Thank you to all those who inspire us, and we look forward to seeing what the Logseq community will create with this tool!

Logseq is also made possible by the following projects:

  • Clojure & ClojureScript - A dynamic, functional, general-purpose programming language
  • DataScript - An immutable database and Datalog query-engine for Clojure, ClojureScript and JS
  • OCaml & Angstrom, for the document parser mldoc
  • isomorphic-git - A pure JavaScript implementation of Git for NodeJS and web browsers
  • SCI - A Small Clojure Interpreter

🙏 Thank You

We want to express our sincere gratitude to our Open Collective sponsors, backers, and contributors. Your support and contributions allow us to continue developing and improving Logseq. Thank you for being a part of our community and helping us make Logseq the best it can be!

💎 Sponsors

[Become a sponsor]

🌟 Contributors

Logseq - Your joyful, private digital garden | Product Hunt

S
Description
Mirror of github.com/Dasemu/Synapse
Readme
31 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 59.5%
Dart 36.1%
CMake 1.8%
C++ 1.7%
Shell 0.5%
Other 0.3%