|
| 1 | +--- |
| 2 | +cip: 123 |
| 3 | +title: Batch pubsub updates |
| 4 | +author: Joel Thorstensson <joel@3box.io> |
| 5 | +discussions-to: <URL of the Github issue for this CIP (if this is a PR)> |
| 6 | +status: Draft |
| 7 | +category: Standards |
| 8 | +type: Core |
| 9 | +created: 2023-02-01 |
| 10 | +--- |
| 11 | + |
| 12 | +## Simple Summary |
| 13 | +<!--Provide a simplified and layman-accessible explanation of the CIP.--> |
| 14 | +Batch multiple stream updates into a single pubsub message. |
| 15 | + |
| 16 | + |
| 17 | +## Abstract |
| 18 | +<!--A short (~200 word) description of the technical issue being addressed.--> |
| 19 | +Abstract goes here. |
| 20 | + |
| 21 | + |
| 22 | +## Motivation |
| 23 | +<!--Motivation is critical for CIPs that want to change the Ceramic protocol. It should clearly explain why the existing protocol specification is inadequate to address the problem that the CIP solves. CIP submissions without sufficient motivation may be rejected outright.--> |
| 24 | +Motivation goes here. |
| 25 | + |
| 26 | + |
| 27 | +## Specification |
| 28 | +<!--The technical specification should describe the syntax and semantics of any new feature.--> |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +### Pubsub message type |
| 34 | + |
| 35 | +Introduce a new pubsub message type called `UPDATE_BATCH`, which has the following format: |
| 36 | + |
| 37 | +```js |
| 38 | +{ |
| 39 | + typ: 3, |
| 40 | + sep: <separator-value>, |
| 41 | + batch: <batch-CID> |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | +#### Batch format |
| 46 | + |
| 47 | +```ipldsch |
| 48 | +type streamid Bytes |
| 49 | +type tip Link |
| 50 | +
|
| 51 | +type Batch struct { |
| 52 | + tips: { streamid : [tip] } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +## Rationale |
| 60 | +<!--The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.--> |
| 61 | +Rationale goes here. |
| 62 | + |
| 63 | + |
| 64 | +## Backwards Compatibility |
| 65 | +<!--All CIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The CIP must explain how the author proposes to deal with these incompatibilities. CIP submissions without a sufficient backwards compatibility section may be rejected outright.--> |
| 66 | +Backwards compatibility goes here. |
| 67 | + |
| 68 | + |
| 69 | +## Implementation |
| 70 | +<!--The implementations must be completed before any CIP is given status "Final", but it need not be completed before the CIP is accepted.--> |
| 71 | +Implementation goes here. |
| 72 | + |
| 73 | + |
| 74 | +## Security Considerations |
| 75 | +<!--All CIPs must contain a section that discusses the security implications/considerations relevant to the proposed change. Include information that might be important for security discussions, surfaces risks and can be used throughout the life cycle of the proposal. E.g. include security-relevant design decisions, concerns, important discussions, implementation-specific guidance and pitfalls, an outline of threats and risks and how they are being addressed. CIP submissions missing the "Security Considerations" section will be rejected. An CIP cannot proceed to status "Final" without a Security Considerations discussion deemed sufficient by the reviewers.--> |
| 76 | +Security considerations go here. |
| 77 | + |
| 78 | + |
| 79 | +## Copyright |
| 80 | +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
0 commit comments