Giter Site home page Giter Site logo

Comments (2)

sagikazarmark avatar sagikazarmark commented on May 18, 2024

This proved to be a tougher nut to crack than expected, but after some experimentation and bouncing off some walls, here is what I came up with:

  • The name "prefix" seems too implementation specific. I'd recommend going back to the "namespace" terminology as it's easier to explain without delving too much into the implementation.
  • I did some research and it seems there is nothing against sending a query string in a POST request (ie. the HTTP spec does not specifically deny it and people seem to accept it as a viable solution). Why is a query string better? Easier to represent in the OpenAPI spec.

With those in mind:

  • OpenMeter would create a "default" (empty) namespace on launch (In case of Kafka and KSQLDB this means the current behavior)
  • Sending a POST /api/namespaces request will create a namespace (TODO: come up with a validation rule for the name) (In case of Kafka and KSQLDB, it means new events and detected_events topic/table)
  • Sending a POST /api/ingest request (without namespace) will land the event in the "default" (empty) namespace (ie. no topic name prefix)
  • Sending a POST /api/ingest?namespace=asd request will land the event in the "asd" namespace (ie. topic name will be om_asd_events)

It took me some time to figure out a way to even think about the prefix concept in a consistent way and I realized that it's not a good term we can easily explain or reason about, so I decided to change it.

Let me know what you think.

from openmeter.

sagikazarmark avatar sagikazarmark commented on May 18, 2024

This is done

from openmeter.

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.