Coder Social home page Coder Social logo

Comments (5)

Pfeil avatar Pfeil commented on August 18, 2024

Hi Stuart,

if your plan is to send only the linked data document (the content of ro-crate-metadata.json), you can get this content as a String using this method: String edu.kit.datamanager.ro_crate.Crate.getJsonMetadata(). Does this fit your use case?

In case you have an application which makes use of the Writer classes in ro-crate-java anyway, the WriterStrategy interface may be of interest to handle sending similarly to writing to a folder or zip file.

I hope this helps. If you see something is missing, or I misunderstood your use case, please do not hesitate to ask again. :)

from ro-crate-java.

StuartWheater avatar StuartWheater commented on August 18, 2024

Hi Andreas,
My ultimate goal is to pass an RoCrate between to independent organization, as a AMQP message. The messages representing an invocation of an analysis service, both requests and responds. I don't think just the metadata will be sufficient, but I will check.

I will look at modifying Writer class to create an in-memory Zip or BagIt.

Stuart

from ro-crate-java.

Pfeil avatar Pfeil commented on August 18, 2024

In this case, the ZipWriter class will help you to understand the process of generating a valid zipped crate. The zip library we use does not seem to have any in-memory features at first glance, but you are of course not restricted to this library. As a workaround, it may be useful to write it to a temporary directory before reading it again for transmission.

Is your scenario limited to rather small crates? Sending AMQP messages with crates of multiple gigabytes may be not too practical. In such cases, I could imagine to work around this by storing the crate in a repository and distributing a link (and maybe required credentials or so, depending on the scenario) via the message.

Reading this possibly outdated statement and the references given in it, I would not send messages with more than 100mb, although I have no practical experience with large messages, and it may depend on the message broker you use.

from ro-crate-java.

StuartWheater avatar StuartWheater commented on August 18, 2024

Thank you. Yes the request and responses are expected to be relatively small, as the analysis is being performed at the data. The AMQP size restrictions shouldn't be an issue.

from ro-crate-java.

Pfeil avatar Pfeil commented on August 18, 2024

You're welcome. I see, so this will be no issue on your side. I'll close the issue for now. If you have any other question, feel free to open another issue or reopen this one. Thanks!

from ro-crate-java.

Related Issues (19)

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.