Coder Social home page Coder Social logo

Comments (2)

gwbischof avatar gwbischof commented on June 30, 2024

Multiple runs can refer to resources with the same uid, this means that these runs also share datum, because datum looked up by resource uid. The name uid implies that it is unique.

from event-model.

tacaswell avatar tacaswell commented on June 30, 2024

But if there is not an index enforcing it.... I think there is an index enforcing that the datum_ids in the Datum collection are unique. It is allowed for events from multiple runs to refer to the same datum if they really do share data (the primary driver here is for backgrounds).

This is a bit of an edge case because we want:

  • runs to be able share references to the same data on disk (primarily for background / calibration reasons)
  • ensure that all foreign keys are included in the event stream if you jump it at a Start document (so a consumer never has to know what oracle to go to to resolve them)
  • the Resource and Datum documents to be primarily generated by Ophyd objects (as that is where the knowledge about the file writing lives)

Previously, ophyd objects directly inserted the resource/datum into data broker (which got point 3 and 1). To fix this we changed how those documents got routed, added the collect_asset_docs which fixed point 2 and allowed us to tack the run_start onto the resource documents to make it easier to collect them later without affecting 1 or 3.

There is something nice about having the duplicated Resource documents share a resource uid as that is the key we use to determine if we need another handler and these all should be able to share said handler.

from event-model.

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.