News for hackers. Stuff that matters.
Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by slowmovintarget on Monday March 14, 2016 @08:43PM (#11286698)
You don't (or shouldn't) do ordinary RPC over messaging any way. Rather, use an Event Sourcing style: http://martinfowler.com/eaaDev/EventSourcing.html
Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by lobster_johnson on Monday March 14, 2016 @08:59PM (#11286757)
I didn't read that web page carefully, but it seems to describe a transaction log, which is what Kafka excels it, but it has precious title to do with RPC.

RPC is point-to-point communication based on requests and replies. Kafka's strictly sequential requirement would be terrible for this because a single slow request would hold up its entire partition — no other consumer would be able to process the pending upstream events. Kafka is also persistent (does it have in-memory queues?), which is pointless for RPC.

Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by eropple on Monday March 14, 2016 @09:53PM (#11286950)
Message queues, period, aren't particularly good for RPC. HTTP, as an online protocol, has such huge advantages that trying to replace it doesn't make sense to me. However, for comms between services where a consumer isn't waiting on the other end, a message queue is plenty appropriate--and Kafka is much, much better at that than RabbitMQ is in terms of throughput and data sanity.

I also quite like NATS, but Kafka provides similar performance characteristics in the general case (generally higher latency being the exception, though I have never encountered latency-sensitive processes where a message queue made sense in the first place) and means babysitting fewer systems.

Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by lobster_johnson on Monday March 14, 2016 @10:03PM (#11286981)
To be clear, NATS is not a heavy messaging broker like RabbitMQ. For one, it's in-memory only, and queues only exist when there are consumers: If you publish and there are no subscribers, the message doesn't go anywhere. NATS is closer to ZeroMQ than RabbitMQ or Kafka.

A lot of people use HAProxy to route messages via HTTP to microservices — what's HAProxy if not a glorified message queue?

If you don't use an intermediate — meaning you to point-to-point HTTP between one microservice and another — you have to find a way to discover peers, perform health checks, load-balance between them, and so on. Which you can do — services like etcd and Consul exist for this — but using an intermediary such as NATS or Linkerd [1] is also a great, possibly simpler solution.

[1] https://linkerd.io/

Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by slowmovintarget on Tuesday March 15, 2016 @11:06PM (#11294700)
The point I was making is that use of messaging in the first place implies an architectural style other than RPC.

If you're going to use RPC, host a REST endpoint and cache the living daylights out of it.

Re:Alchemy Micro-Service Framework: Using RabbitMQ Instead o... by lobster_johnson on Wednesday March 16, 2016 @10:38AM (#11297648)
But if you read what I wrote elsewhere in this thread, NATS is not a traditional messaging broker, and is highly suitable for RPC.