Rochefort – Poor Man's Kafka
github.com
github.com
Just use Kafka. Seriously, it's rock solid and is practically lingua franca in backend architecture these days. Everyone understands it and every data processing framework or service supports it.
Kafka is much, much more than just distributed pub/sub. It's disk cache optimizations alone make rolling your own a terrible idea.
(That said, I'm highly in favor of innovation of most any kind; building new things is great, if the new thing has some plausible innovation over the old thing!)
In between 0% Kafka and 100% Kafka: Kafkas REST proxy gives a minimalistic API surface for using the system. Recreating that API in another language with a simpler backend is highly achievable...
My Kafka installation has a parallel relational backend that provides an onboarding story for smaller apps and groups, for example. It provides about 13% of Kafkas functionality and can't scale meaningfully, but provides baseline data streaming in a pinch and is API compatible with how we use Kafka most of the time.
http://antirez.com/news/114 (I think the API has changed a bit since this blog post, but the concepts and capabilities are the same.)
> Losing Data and NIH
> You can lose data on crash and there is no replication, so you have to orchestrate that yourself doing double writes or something.
> The super simple architecture allows for all kidnds of hacks to do backups/replication/sharding but you have to do those yourself.
> My usecase is ok with losing some data, and we dont have money to pay for kafka+zk+monitoring(kafka,zk), nor time to learn how to optimize it for our quite big write and very big multi-read load.
> Keep in mind that there is some not-invented-here syndrome involved into making it, but I use the service in production and it works very nice :)
Simple code with "obviously no bugs" vs complex code with "no obvious bugs".
This is one of our biggest headaches, and it's not even that a Kafka server itself is so configurable. We have hundreds of teams writing client applications, and jumping on bridges because Kafka clients have poor configurations is getting old. Too many knobs to twiddle, but I guess that's what happens if you're expecting to be able to tweak for high performance.
That just leaves the "simple work" of administering and tuning which, as you pointed out, is competence that's steadily growing in the industry.
Granted, I am not monitoring Kafka, but I do other processes.
The other nice thing is that now that I have ZK, other software that need it can just reuse the same process.
I think using the maintenance cost as a reason to write your own tool, is a short-sighted decision.
Me and my team understands the 300 lines of code that go into rochefort and can twist and modify it for our needs.
Performance will make or break our startup, which deals with real time user behaviour analytics, and doing high performant java for a while, I know very well how much time I will have to spend looking at G1 logs to fine tune it.
I am sure we wont use rochefort after we scale up, but for now I think gives us greather velocity than kafka (just because if we want to modify kafka we have to spend a week on a simple change).
I want to be able to add more meta information in the header, or read the files from another process, rsync and read them to my laptop, add custom reducers etc, all those things will take me minutes with rochefort and days with kafka.
Ideally the read me would explain why Kafka didn't cut it, why the trade offs the authors made were worth it (in this case), and why I did consider using a this system.
Sadly I don't have enough time to read an entire repo of code to try and figure these things out.