Tank – A very high performance distributed log service
github.com
github.com
It appears to be a server not a lib. Why would someone use this instead of kafka?
If you're not mentioning kernel calls, allocations, thread synchronization, io mechanism etc. you're not going to be very believable.
The README states that replication is not implemented yet. I encourage you to also check this issue https://github.com/phaistos-networks/TANK/issues/14 for some details on the I/O semantics, and the Wiki for answers to other questions: https://github.com/phaistos-networks/TANK/wiki
Network I/O is obviously asynchronous - you may want to check the codebase. Disk I/O is synchronous, but: - uses sendfile() and read readahead() to reduce or eliminate the likelihood of blocking reads: see here please https://github.com/phaistos-networks/TANK/issues/14#issuecom...
- AIO is either broken or supported on XFS (depending on kernel release, and also in the past, appending to a file on an XFS fs could block and degrade performance). But not using DirectI/O so writes end up in memory and only get flushed if it hits the commit count, or periodically - so, particularly for local disks, HDDs or SSDs, this in practice never blocks for more than a few ms when flushing, if at all.
Multithreaded does not mean multiple files.
> But not using DirectI/O so writes end up in memory and only get flushed if it hits the commit count, or periodically - so, particularly for local disks, HDDs or SSDs, this in practice never blocks for more than a few ms when flushing, if at all.
Unless you are actually using it under a high throughput scenario which is why you would use a lib like this. It will work great until you hit the actual flush point, then possibly block for seconds even minutes.
If your performance needs are high, mandating XFS is not unreasonable.
Multiple files does mean multiple threads. Unless you manage to run this without a modern operating system.
That is completely debatable. We are talking about a "a high performance distributed log service". Not a word processor.
> Multiple files does mean multiple threads.
Which is something entirely different from what I said...
What kind of guarantees does tank make?
Suppose one such application is consuming every new event that's publishing ("tailing the log"). As soon as another application successfully publishes 1 or more new messages, the consumer will get them immediately. If the application that attempted to publish failed to do so, or didn't get an ACK for success, then you are guaranteed that no new message(s) were published(i.e no partial message content).
I am not sure if that answers your question, if not, can you please elaborate?
I'd basically like to be able to map messages from one topic to another with a guarantee that none of those messages will be lost; even when some error occurs (either a programming error, system downtime, or network partitions). I'd prefer the application to stop producing messages than lose any of them.
It sounds like that is possible with Tank so I may end up giving it a try.
The reason this hasn't happened yet is that, other than lack of free time to pursue it, we(work) haven't really needed that feature yet. We run a few instances and they are very idle and we can also mirror to other nodes (via tank-cli).
[1] https://github.com/coreos/etcd/tree/master/contrib/raftexamp...