Hacker News new | past | comments | ask | show | jobs | submit | cfferry's comments login

This look cool! great job, congrats.

What are you using as data storage? I understand btcd uses leveldb, are you using something similar?


I considered using leveldb initially, but that would require a C++ compiler and it also requires linking to libstdc++. So at that point, you might as well just write the project in C++, which defeats the point of this project.

Mako uses LMDB. Aside from Berkeley DB, it's pretty much the only key-value store in town if you want a pure C project.

In the end, it worked out well because I really like LMDB. It has a very intuitive API, and it's very small, which sort of matches the spirit of this project.

The zero-copy on reads feature is also amazing. When reading a UTXO from the database, we do no copying and no allocation whatsoever. The UTXO is simply parsed from the pointer LMDB returns. This is something LevelDB cannot do at all.


There's always SQLite, which can also be used as a key-value store.


And is similarly pure c, self contained


I am really impressed with your work! If you ever need or look for C++ collabs, let me know!

Also, consider opening a discord server to talk more about this project!


Looks lovely, mate!

Any Kangaroo() function so far???


C'MON SKIP for a goto maybe


bind(sport, &Kangaroo)


Great article! I'll dig more into the skyscraper technique, thanks.


This is great feedback, yingq. Thanks for it.

I'll research a bit on providing a different approach. I am now thinking about returning arrays (containing a $status var), but will remain open to ideas.

Ideas? At any rate, I appreciate your input.


Both the redis and memcached PHP apis return boolean false when their equivalent of get() is called and no such key exists.

Personally, I'd stick with that and raise an exception on network and similar types of errors. PHP also supports trigger_error() but there doesn't seem to be top level guidance on errors vs exceptions. Try/catch just seems more straightforward to me.


This is exactly what I had in mind. I'll stick with it and add a catch exception.

Thanks for your feedback!


Thanks for your input!

It's a TCP-based text protocol. We have implemented a simple protocol (https://github.com/beryldb/beryldb/blob/unstable/include/pro...)

Thank you for your feedback. I am going to update the documentation and explain this issue using a different approach.

Appreciated.


Thank you very much for your kind post!

I am currently working on a cluster system. I am gauging whether to use the Raft consensus algorithm, or the typical master-slave replication schema. Not only that, but I am working on this as we speak.

As your question about long-term goals goes: I am interested in real time analytics, so hopefully we can deploy a SaaS-based platform. I am working hard to make our modules developer-friendly, so you can have access to C++ speeds with little coding. These are dreams for now, as we are just getting started, I hope you understand.

BerylDB is still in beta, and your input is appreciated.

Sincerely.


Thank you the tip, junon. I am just new to the community. Does current title work?


It's specifically "Show HN"


Haha this is cute the author has now changed it to have the quotes. I think they misunderstood, but,--hello!-- my suggestion to the author is check out the shownew page and see the format of the submissions there and alter the title to reflect those. then it will show up on the shownew page and could hit the show page.

https://news.ycombinator.com/shownew


the title should read - "Show HN: A small key-value database" -- without the double quotes.


As it is now, yes. :)


hello YCombinator Community:

I hope everyone is having a great week!!

I'm working on a small key-value database, written in C++ and powered by RocksDB. It started as a hobby, but I am trying to slowly turn it into a stable project.

The project is called BerylDB. A PHP API was released a couple of days ago, and currently working on a NodeJS gateway. I'm super excited about the project and actively improving its functionalities. The server is fully modular, which means that components can be loaded/unloaded as required. In addition to data storage, the server has channels, and clients can subscribe to them. This make it a great solution for real time analytics.

The ultimate goal of this project is to have a community of custom modules that users may be interested on. This may be useful for developers and/or companies requiring specific needs.

I'm open to collaborations! If you happen to have interested in databases, please let me know. I am on Discord. Any kind of collaboration or feedback would be appreciated. If you work for an startup or need high speed performance, please let me know!

Discord: https://discord.gg/H6HVxeDq

Docs: https://docs.beryl.dev/

Server repository: https://github.com/beryldb/beryldb

Client (command line): https://github.com/beryldb/beryldb-cli

PHP API: https://github.com/beryldb/php-beryl


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: