

Show HN: A fast append-only data store for Java 8 - probablyfine
http://probablyfine.co.uk/2015/04/11/announcing-java-dirty/

======
sgt
An example of good idiomatic Java 8 source code.

Example:

[https://github.com/mrwilson/java-
dirty/blob/master/src/main/...](https://github.com/mrwilson/java-
dirty/blob/master/src/main/java/uk/co/probablyfine/dirty/Store.java)

~~~
tlrobinson
What are the Java 8 features being used here, besides the obvious lambda
expressions?

(genuine question, I haven't stayed current with Java)

~~~
cedrickthecrow
Optional is also new to Java 8 although syntactically very similar that Guava.

------
nicksellen
How would you compare and contrast this with
[http://openhft.net/products/chronicle-
queue/](http://openhft.net/products/chronicle-queue/)? (which I knows does a
bunch more but seems like it could be used for this purpose too).

~~~
faizshah
This is not comparable to chronicle, this is one of the mechanisms by which
chronicle works (memory mapped files).

[http://stackoverflow.com/a/9268065](http://stackoverflow.com/a/9268065)

------
apo
This reminds me of the log abstraction:

[http://engineering.linkedin.com/distributed-systems/log-
what...](http://engineering.linkedin.com/distributed-systems/log-what-every-
software-engineer-should-know-about-real-time-datas-unifying)

------
MrBuddyCasino
> frequently find myself wanting a light append-only data store for pet
> projects

As someone who is mystified by that statement: why?

~~~
dyladan
Could be used as an event store. Rather than storing a list of mutable objects
as in a normal database, you store the changes themselves as a list of facts.
This makes things like replication a lot easier and can be optimized to be
much faster than a traditional database.

~~~
batbomb
There's Apache BookKeeper to fill some of those needs.

~~~
eropple
I've never seen BookKeeper in production. Where would you recommend its use
over something like Kafka?

------
jerven
Really nice, I am just needing this ;) Super that it is MIT licensed as well.
I was halfway on building something on top of XZ SeekableInput Streams but
this is probably a lot saner to use ;)

------
hello_there
Great. I've been wanting something like this for a while. I've got a few
questions:

1\. How large files are supported?

2\. It says that it will only persist primitive fields on objects - does that
exclude persisting a byte array?

3\. What are the failure semantics? For example, what happens if my computer's
power supply fails in the middle of a write? How will the program behave the
next time it is started?

~~~
javajosh
Good questions, but wouldn't it be fun to find out the answers using empirical
tests? You might even be able to add tests and submit a PR, and be
immortalized in the annals of github.

~~~
mrits
You don't get things done very fast, do you?

~~~
dang
> You don't get things done very fast, do you?

Please don't make rude comments on Hacker News.

~~~
mrits
It is a legitimate response to a problem that plagues the hacker community.
Focus on the task at hand. Trying to understand the intricacies of a system
can be educational but the best lessons learned are from completing your
current project.

I'm surrounded by intelligent people that can't get anything done.

~~~
dang
Ok, but the problem with your previous comment wasn't your view, but the
rudeness. It's possible to express your view without rudeness; you just did.
That's what we're going for here.

------
jkot
\+ For chronicle

Have look at my profile. Also there is KVEngine from H2.

~~~
nicksellen
I tried googling for H2 KVEngine but didn't come up with anything, did you
mean
[http://www.h2database.com/html/mvstore.html](http://www.h2database.com/html/mvstore.html)
perhaps?

~~~
jkot
yes

------
knd775
This actually seems pretty useful. I'll be sure to check it out for my next
Java project.

