Hi all, I currently run a Discord bot with a SQLite backend database. It was working fine until I enabled sharding, meaning there are multiple threads writing/reading from the same SQLite database. I've enabled WAL mode however I still get SQLITE_BUSY error codes.
I stumbled upon Bedrock, so I figured I could give it a shot. I was able to build and run Bedrock successfully, pointing to my existing SQLite file, however, because there's no Java SDK for Bedrock I decided to give the MySQL plugin a shot. This is where the horror story starts, I'm only able to make SQL queries by connecting to Bedrock via the MySQL CLI client, but not if I'm connected via my bot using the ORM.
Am I out of luck here?
I hope this channel can help me: I just created Expensify/Bedrock#788
The tests pass and it is running, but it doesn't seem to matter what I send on 8888, I get no response. Any advice?
$ nc localhost 8888 SELECT 1; Query: SELECT 1; Query: SELECT 1;
All with no response
/var/log/syslogto see if any errors are being output? Also, what is the exact command line you are running?
SLogStackTrace()': /Bedrock/libstuff/SLog.cpp:10: undefined reference tobacktrace'
SGetCallstack[abi:cxx11](int, void* const*)': /Bedrock/libstuff/libstuff.cpp:107: undefined reference tobacktrace_symbols'
SException::SException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, SString, STableComp, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SString> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /Bedrock/libstuff/libstuff.cpp:95: undefined reference tobacktrace'
_SSignal_StackTrace(int, siginfo_t*, void*)': /Bedrock/libstuff/SSignal.cpp:151: undefined reference tobacktrace'
Hello there, I am just starting with Bedrock Jobs and have some questions, I hope this is the right place?
I want my consumers to wait up to 30s for any Job thats with "hello.", so I send this request:
GetJob name: hello.* connection: wait timeout: 30000
But this command immediately returns a "404 No job found". Shouldn't it wait 30s before returning?
Connection: waitis currently not working. I believe we broke it when adding some multi-threaded optimizations, and hasn't been rebuilt yet. Is that right @tylerkaraszewski ?
would hope to be able to completely lose the .db file for a particular node when/if a crash happens on an instances or a VM needs a reboot (and be able to easily restore from s3 using an initContainer before starting bedrockdb).
Ah we do have a method to bootstrap from a S3 backup and then catch up, but we haven't automated it to the level you are likely thinking (ie, it doesn't identify the most recent backup and download it automatically). I could imagine you adding this without too much effort however. (I'm not 100% sure if our backup code is open source now that I think about it, we could look into this if you were seriously interested.)
the last question is about priority and whether or not one can be assigned dynamically on startup? So if i have a startup script that assigns a random integer as the priority are there any drawbacks to that?
Yes, that could likely work fine. In practice we find it makes the system easier to manage if the priorities are static, as then you have a better sense of which nodes are doing which without needing to consult the logs.
Would you guys accept pull requests for these types of enhancements? It would obviously have to touch other places in the codebase so just checking before putting in time here.
Yes, PRs very welcome!!
I like #sqlite and works pretty much good with #strapi and #directus
seems to me still better choice than use "cloud db" but I need more instances into 1file - so I searched and found this article https://sqlite.org/forum/info/339d237d6517783a which refers to you
I what I read is pretty great https://bedrockdb.com very good builded project 😃👏
Q) so it is process service above #sqlite connected through port for sync ?
Q) it that communications encrypted somehow ?
Q) how colisions are handeled ?
For MySQL or PostgreSQL, if you sometime get a lot of data, it may happen that you would need to migrate to SQLite to keep costs manageable:
Many small queries are efficient in SQLite:
Using SQLite is 35% faster than using filesystem:
For GDPR encrypted stuff, there is Databunker:
If MySQL is not your preferred option, you could also look is MySQL compatible Noria any better: