Giter Club home page Giter Club logo

Comments (3)

lukaszb avatar lukaszb commented on August 10, 2024 1

Yeah, it does make sense. However, until now we've been using avro schemas against micro services and our aggregates were easily distinguished by name within single project. I understand that you want to somehow tell djangoevents to use avro schemas that are i.e. put into subdirectories of main schema dir or distributed within Python packages, right?

Looks like this can be quite easily accomplished with some custom schema loading mechanism. I.e. we could change djangoevents.schema.event_to_schema_path method to use some aggregate's/event's method that returns absolute path to the schema (and fallback to current behaviour).

So at the event you could do something like:

class Person(BaseAggregate):
    schema_dir = '/my-avro-schemas-dir'

    class Updated(DomainEvent):
        pass

Then you could probably prepare some base aggregate classes for each module.

This should be enough for most use cases I believe. Does it sound good or do you think of another solution? Would you like to prepare a PR for this?

from djangoevents.

lukaszb avatar lukaszb commented on August 10, 2024

@fmeurou can you elaborate on your use case? What do you mean by "creating modules"? Do you maybe have some working code or will to prepare a pull request for the feature?

from djangoevents.

fmeurou avatar fmeurou commented on August 10, 2024

from djangoevents.

Related Issues (10)

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.