Your main challenge with be how to have the consumer ensure the
correct ordering and visibility of the data that is being written to
the memory mapped file. The current implementation of the Disruptor
relies on the Sequence class providing the necessary happens before
edges. If you are backing onto a memory mapped file being read by
another process then the sequence objects won't be visible to another
process, also how will you make the consumer sequences available to
the Disruptor to ensure that you don't wrap the ring buffer?
There are solutions to these, but it's probably not possible with the
Disruptor as is. I think that it can be done, however you may want to
look at Java Chronicle
(
https://github.com/peter-lawrey/Java-Chronicle) as it may be a closer
fit to what you're trying to achieve.
Mike.
On Mon, Feb 25, 2013 at 3:20 AM, adam.h. <
adam.p...@gmail.com> wrote:
> Hi Disruptors,
>
> I'm working on transaction engine which is split for several components
> running on separate JVM's. Although Disruptor was originally designed to
> pass messages between threads on the same JVM, the overall concept seems to
> be very tempting also in my case. So my thinking would be along these lines:
>
> - producer creates the Disruptor and allows it to allocate memory via
> MappedByteBuffer
> - producer stores marshalled messages (Google Protobufs)
> - consumers (different JVMs) can link to the same memory mapped buffer
> - consumers will unmarshall messages before passing them to the business
> logic processor
>
> Do you see any drawbacks of that design? Am I loosing any of advantages
> using Disruptor that way?
>
> Thanks,
> Adam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Disruptor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
lmax-disrupto...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>