pb icon indicating copy to clipboard operation
pb copied to clipboard

Sqlite Option

Open meichthys opened this issue 3 years ago • 3 comments

Great work on this 🚀 I would like to suggest an option to use SQLite as the database. It would simplify the docker-compose and would be a little more light weight.

Feel free to close if you'd rather not deal with this.

meichthys avatar Jul 17 '20 15:07 meichthys

I agree, sqlite would be better. Can't say I'll work on this myself anytime soon though :slightly_smiling_face: .

buhman avatar Oct 09 '20 01:10 buhman

Another cool ideal might be to use ptpb/apocrypha as a storage backend (or support both sqlite and apocrypha at the same time, etc..)

buhman avatar Oct 09 '20 02:10 buhman

I hacked a bit at the latter in #254.

#254 currently implements a stripped-down version of paste.get and paste.post functionality. This is just enough that a paste can be created, subsequently retrieved, and, for example, syntax highlighted. This is interesting from the perspective that syntax highlighting isn't a feature that I would consider reasonable to implement in ptpb/apocrypha, but probably makes sense in an "apocrypha proxy frontend".

It's clear a lot of the current ptpb/pb implementation is very entangled with how mongodb storage was implemented, and many of those details don't make sense in the context of other implementations.

Other notes to future self:

  • Flask url routing is ~incompatible with apocrypha's "base75" symbols--honestly anything not-Flask, even stdlib http.server would be more appropriate+better.

  • to reasonably support "non-database" backends like apocrypha, it is likely that some pb API features need to be removed or become optional--most of the features that are candidates for being dropped are obscure and were likely very rarely used anyway.

buhman avatar Oct 09 '20 03:10 buhman