Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
475 stars 295 forks source link

Make it possible to save in an external database #305

Closed wilmardo closed 3 years ago

wilmardo commented 3 years ago

Same issue as https://github.com/Koenkk/zigbee2mqtt/issues/4947

As stated in the linked issue this would be a welcome addition for users who write on SD card like storage.

My usecase is a bit specific but nonetheless a bit of explanation. I am trying to get a stateless Zigbee2MQTT implementation so it can failover between Kubernetes nodes (external CC2530 TCP serial) without the need of a volume (since distributed storage is hard on low power devices). I am using Kubernetes configmaps for the configuration so only the database.db and the coordinator_backup.json are blocking a completely stateless approach. If these could be stored in an external database then the image can be run without a volume (stateless) which offloads the persistence to a NAS for example.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

wilmardo commented 3 years ago

Not stale.

With something like Sequelize it would be possible to maintain the current SQLite implementation as backwards compatible option.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

wilmardo commented 3 years ago

Still not stale though haha

timdonovanuk commented 3 years ago

+1 to this. But you mention a NAS - you could always mount the k8s container storage on a NFS shared drive. Or GlusterFS.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Toastyyy3 commented 3 weeks ago

I suppose there is still no support for external databases?