The new event platform client library features will be folded into the existing EventLogging extension in phases. This is Phase 1.
For starter code, see: https://github.com/linehan/el-epc-patch-phases.
Suggest changes to the API and requirements and update this description accordingly.
Phase 1
Suggested API
* `produce( string streamName, object eventData )`
* `configure( object streamConfig )`
Requirements
* Client can be configured with stream configuration objects
* Client sends events via HTTP POST
* Callers do not specify `meta.dt`, `meta.id`, or `meta.stream`
* `meta.dt` must be set at the time `produce()` is first called (i.e., client-side)
* If `produce()` is called with data containing `meta.dt`, that value cannot be overwritten
* An empty eventData object can be passed to `produce()`
* After initial loading, stream configuration cannot be updated during runtime
* The provided stream configuration is not adjusted by the client during loading (e.g. defaults)
Open questions
* Does MediaWiki needs a reliable way to generate ISO 8601 timestamps for `meta.dt`?
* How do instruments provide the `$schema` field?
* Do we allow stream configuration to specify a per-stream destination URL?
* Do we support multiple calls to `configure()` during initial loading?
* If so, how do we resolve collisions?