ConsenSysMesh / web3studio-sidejam

SideJam is a series of projects designed to develop application-level examples, frameworks, components (and requirements driving protocol and R&D teams) that use the W3S narrative approach to prove the need for and ability to use the Mainnet as a way to make business safe without silos.
Apache License 2.0
2 stars 2 forks source link

Simple message bus contract #5

Closed brian-lc closed 5 years ago

brian-lc commented 5 years ago

Overview

As a message bus consumer, so I can write a message that other services can read I want a contract that accepts my message for a topic. Also, so I can read messages on a topic I want a contract that will return messages on a topic.

Reference

Questions

Assumptions

Acceptance

Interface Sketch

Always receives messages, never sends messages.
Interface to contract:
 - function sendMessage(string topic, string payload) returns bool?
 - function messagesSince(string topic, string cursor) returns messageList[]
 - function getMessage(string messageID) returns messageBody
 - function topicMessageCount(string topic) return numMessages