Git Product home page Git Product logo

Comments (10)

JPWatson avatar JPWatson commented on August 23, 2024 1

hmm I take that back, you can't do that unless you know the last message in the batch

from aeron.net.

JPWatson avatar JPWatson commented on August 23, 2024 1

While I see the benefit of the request, I'm hesitant to introduce changes to this code base that aren't used directly by the Aeron client. It seems like you've already got what you need in RampUp.
If you haven't already, it might be worth having a look at the Disruptor.NET.
Looking at the EventHandler in Getting started (java) it seems like it might fit with your use case.

from aeron.net.

JPWatson avatar JPWatson commented on August 23, 2024

something like this?https://github.com/AdaptiveConsulting/Aeron.NET/blob/master/src/Adaptive.Agrona/Concurrent/RingBuffer/ManyToOneRingBuffer.cs#L114

from aeron.net.

Scooletz avatar Scooletz commented on August 23, 2024

This is not what I meant. Let me rephrase my initial description.
The Read method provides a capability of reading multiple messages one after another and clears the memory afterwards. It does not provide an access to the whole chunk of memory though. I could imagine scenarios, where one wants to have multiple writers which write messages to a buffer. Then a reader would access the whole chunk of buffer and use it somehow (send to a file/socket/something else). In this case existing Read wouldn't be suitable - it reads messages one after another.

from aeron.net.

JPWatson avatar JPWatson commented on August 23, 2024

ahh I see similar to https://github.com/real-logic/Aeron/blob/master/aeron-client/src/main/java/io/aeron/Image.java#L515?

from aeron.net.

Scooletz avatar Scooletz commented on August 23, 2024

That's correct 👍 I'm thinking now, is it the right lvl for introducing it?

from aeron.net.

JPWatson avatar JPWatson commented on August 23, 2024

If you Read using the MessageHandler, you could capture buffer & the first index then sum up the lengths of all the individual messages. Then you have access to the whole block.

from aeron.net.

Scooletz avatar Scooletz commented on August 23, 2024

You can't do it because in any point of time (at the end) cleaning memory and moving head can be called. That's why I asked about making this explicit and calling the "raw handler" only one time.

from aeron.net.

JPWatson avatar JPWatson commented on August 23, 2024

the position is only advanced after the whole batch has been processed
https://github.com/AdaptiveConsulting/Aeron.NET/blob/master/src/Adaptive.Agrona/Concurrent/RingBuffer/ManyToOneRingBuffer.cs#L152

from aeron.net.

Scooletz avatar Scooletz commented on August 23, 2024

Thx for clarification. Closing this :)

from aeron.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.