From d53bd3630928be4f1c214778964f2195d7cddc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Cidre?= Date: Fri, 6 Apr 2018 08:56:41 +0200 Subject: [PATCH 1/2] [#IDEA-146] : Status GO SDK --- README.md | 5 +- ideas/146-status-go-sdk/README.md | 111 ++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 ideas/146-status-go-sdk/README.md diff --git a/README.md b/README.md index cbec358..3a43c9b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ Ideas looking for people An idea can be in the following states: draft, in progress, completed, or aborted. Additionally, it can be in limbo which is when it isn't clear what -<<<<<<< HEAD state it is in. An idea that has been in limbo for more than a week or so gets aborted. @@ -44,6 +43,7 @@ aborted. | [34-react-native-qt](ideas/34-react-native-qt.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | | [140-sob-improve-onboarding](ideas/140-sob-improve-onboarding/) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | | [122-sob-metrics](ideas/122-sob-metrics.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | +| [146-status-go-sdk](ideas/146-status-go-sdk/) | :seedling: Draft | :x: no | :x: no | :x: no | :x: no | | [154-support-web3.js-library](ideas/154-support-web3.js-library.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | ## Draft :seedling: and limbo :question: @@ -56,6 +56,7 @@ aborted. | [99-confidence](ideas/99-confidence.md) | :seedling: Draft | :x: no | :x: no | :x: no | :x: no | | [95-les-service-model](ideas/095-les-service-model/) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :x: no | | [86-push-notif-v2](ideas/86-push-notif-v2.md) | :seedling: Draft | :x: no | :x: no | :x: no | :x: no | +| [146-status-go-sdk](ideas/146-status-go-sdk/) | :seedling: Draft | :x: no | :x: no | :x: no | :x: no | | [76-smooth-ui](ideas/smooth-ui.md) | :question: Limbo | :white_check_mark: Yes | :x: No | :x: No | :white_check_mark: Yes :question: | | [71-low-traffic](ideas/71-low-traffic.md) | :question: Limbo | :white_check_mark: Yes | :x: No | :x: No | :white_check_mark: Yes :question: | | [101-extensions](ideas/101-extensions) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | - | @@ -80,7 +81,7 @@ progress again. This ensures the registry is kept up to date. | Contributor | Ideas | |---------------|--------| | @anna | 58, 80, 87, 127 | -| @adriacidre | 63 | +| @adriacidre | 63, 146 | | @andmironov | 68, 80, 134 | | @adambabik | 58, 63, 68, 92 | | @alwx | 134 | diff --git a/ideas/146-status-go-sdk/README.md b/ideas/146-status-go-sdk/README.md new file mode 100644 index 0000000..77096e3 --- /dev/null +++ b/ideas/146-status-go-sdk/README.md @@ -0,0 +1,111 @@ +## Preamble + + Idea: + Title: Status GO-SDK + Status: Draft + Created: 2018-04-03 + + +## Summary + +Provide an easy to use GO-SDK library to allow community developers easily interact with status messaging. + + +## Swarm Participants +- Lead Contributor: @adriacidre +- Contributor: +- Contributor: +- Testing & Evaluation: + + +## Product Overview + +### Product Description + +One of the main goals of status is to grow its community, however is not easy to work on status-go project as a community developer. +Is not easy to set up an environment + +- Identify where to start +- Interact with status messaging system. +- Test your changes + +The idea behind this swarm is to simplify this by allowing community developers to interact with status, based uniquely on status-go library. + +### Requirements & Dependencies + +- *Easy to use SDK* : Using a sdk should be as easy as using any other messaging system, allowing you to subscribe or publish to specific chats. +- *The less dependencies the better* : ATM and in order to interact with status messaging system we need to interact with code on status-go and status-react repos. This should be simplified to allow devs work only on top of status-go +- *Quick dev environment setup* : Following the previous point, if we’re only based on status-go, dev environment should be trivial. Should be easy to build apps and distribute them as binaries for different platforms. + + +### Minimum Viable Product + +MVP should allow a developer to accomplish some minimal actions: + +- Connect : creates a new connection +- Close : closes active connection +- Auth : login as a specific user +- Subscribe : subscribe to a channel +- Unsubscribe : unsubscribe from a channel +- Publish : send a message. + +_All methods should work for 1to1, groups and public chats._ + +With this methods building a simple `autoresponder bot` should be as simple as: + +**TO BE DEFINED** +```go + +// Connect to the default status url and defer closing the connection +st, _ := status.Connect(st.DefaultAddr) // -> localhost:51515 +defer st.Close() + +// Authenticate as an specific user +st, _ = status.Auth([]byte(“S3cretT0ken”)) + +// Subscribes to any message on chat chatID +sub, _ := st.Subscribe("chatID", func(m *st.Msg) { + // Replies the received message + m.Reply([]byte("I can help!”)) + sub.Unsubscribe() +}) + +// Simple message publisher +st.Publish(“buddy_token", []byte("Hello World")) + +``` + +SDK should be provided with different, easy to follow and well documented examples _(TBD)_: + +- Autoresponder bot (nice for testing) +- Google assistant integration +- Slack proxy (use status from slack) +- Reminders (set and get reminders) + +Description: + +### Useful links & Dependencies + +- https://github.com/mandrigin/status-go-bots — http://offsite.chat and #humans-need-not-apply bots. +- Pre-existing issue - https://github.com/status-im/ideas/issues/131 + +### Blockers +New Status App communication protocol - https://github.com/status-im/ideas/issues/87 + +## Dates +Goal Date: TBD + +Description: TBD + +Testing Days required: TBD + +## Success Metrics +TBD + + +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 53bc7899e5dcb6c6365a2fd923b2166e660c0d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Cidre?= Date: Wed, 11 Apr 2018 13:59:57 +0200 Subject: [PATCH 2/2] Update README.md --- ideas/146-status-go-sdk/README.md | 9 ++++-- ideas/146-status-go-sdk/progress.md | 43 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 ideas/146-status-go-sdk/progress.md diff --git a/ideas/146-status-go-sdk/README.md b/ideas/146-status-go-sdk/README.md index 77096e3..529420e 100644 --- a/ideas/146-status-go-sdk/README.md +++ b/ideas/146-status-go-sdk/README.md @@ -1,6 +1,6 @@ ## Preamble - Idea: + Idea: 146-status-go-sdk Title: Status GO-SDK Status: Draft Created: 2018-04-03 @@ -100,9 +100,12 @@ Description: TBD Testing Days required: TBD ## Success Metrics -TBD - diff --git a/ideas/146-status-go-sdk/progress.md b/ideas/146-status-go-sdk/progress.md new file mode 100644 index 0000000..8a2cf04 --- /dev/null +++ b/ideas/146-status-go-sdk/progress.md @@ -0,0 +1,43 @@ +## SDK Iterations + + +### Protocol messages + +[New protocol spec](https://docs.google.com/document/d/1Qh2h07T_qepzEJ7IytmxwIdQAOsGHrvhXwZxuZtbwgc/edit#) clearly defines all message types with examples. It's based on [transit-format](https://github.com/cognitect/transit-format), so it makes sense to evaluate its [go implementation](https://github.com/russolsen/transit) + +Use cases: + +### General +#### [ ] Message + +##### Parameters: + - content: the content of the message (a map or a string for now) + - content-type: the content-type of the message + - message-type: the type of the message + - to-clock-value : the clock of the sender for message ordering + - timestamp: the timestamp of message + +*Where does the destination/s of the message is defined?* + + +#### Private groups + +##### [ ] NewGroupKey + +- [ ] GroupAdminUpdate +- [ ] GroupLeave + +#### Contact management +- [ ] NewContactKey +- [ ] ContactRequest +- [ ] ContactRequestConfirmed +- [ ] ContactUpdate + +#### Not needed for first iteration +- [ ] Seen + + +##### Message + + +### Define final SDK UI based on different messages