eventbus routing

已查看 48 次
跳至第一个未读帖子

Bojan Šernek

未读,
2015年7月3日 06:21:422015/7/3
收件人 ve...@googlegroups.com
Hi!

I'm currently evaluating vert.x as a library for my next project. I have a question that's been bugging me during the review of eventbus principles and verticle isolation..

There is a use case where there are several nodes, each running their own copy of the same "I/O service" that I would prefer to be a busmod and each also runs a busmod that does application level logic. Each I/O service does talks to the hardware on that node, so it is important which one receives which command. I would like to send messages from the application busmods to the I/O service busmods, but on the same node only.

The way I see it that would only be possible if:
 - each I/O service had the node id of some sort embedded in its address
 - the eventbus send options would include something to disable clustering

Are there any other options I didn't consider?

I like the idea of isolated verticles talking via JSON only and I like the ad-hoc networking nature of hazelcast clustering below it. Together you have what appears to be a very nice library to work on and to structure microservices with. But I need to resolve the above, any other takers on how to tackle this?

Tim Fox

未读,
2015年7月3日 06:23:302015/7/3
收件人 ve...@googlegroups.com
Hi Bojan,

Which version of Vert.x are you using?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bojan Šernek

未读,
2015年7月3日 06:25:252015/7/3
收件人 ve...@googlegroups.com
I'm evaluating vert.x 3. vertx -version outputs "3.0.0"

Tim Fox

未读,
2015年7月3日 06:29:512015/7/3
收件人 ve...@googlegroups.com
Ok great.

The term "busmod" threw me, as this is really a Vert.x 2.x term - Vert.x 3 doesn't have modules any more, so I guess you meaning verticles listening on the event bus.

The vert.x event bus doesn't care if the listener is local or not. If you want only a particular listener to get a message, just give that listener a unique address and send to that.

Bojan Šernek

未读,
2015年7月3日 06:43:012015/7/3
收件人 ve...@googlegroups.com
Hi,

I'm reading all kinds of documentation before I get started to evaluate with actual code and hardware, so that's probably the reason for the confused terms.

Alright, so unique addresses are the preferred way to route to a specific instance? That should be easy  to do then, I'll just generate a UUID at first boot and use that.

Thanks,
Bojan.
回复全部
回复作者
转发
0 个新帖子