Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
haochenpan committed Dec 18, 2023
1 parent 0afe159 commit b1fc5da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To install the SDK without client libraries, simply run:
```bash
pip install diaspora-event-sdk
```
Note: This method omits the necessary dependencies for KafkaProducer and KafkaConsumer classes.
Note: This does not install the necessary dependency for `KafkaProducer` and `KafkaConsumer` classes.

## Use Diaspora Event Fabric SDK

Expand Down
6 changes: 3 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Diaspora Event Fabric SDK: QuickStart
## Basics and Setup

Diaspora Event Fabric offers topic-level access control. Typically, only one user can access a topic. Use `register_topic` API to request access:
Diaspora Event Fabric offers topic-level access control. Typically, only one user can access a topic. Use `register_topic` API to request access (Replace `...` below with your topic name):

```python
from diaspora_event_sdk import Client as GlobusClient
c = GlobusClient()
topic = "topic-" + c.subject_openid[-12:]
topic = ... # e.g., "topic-" + c.subject_openid[-12:]

print(c.register_topic(topic))
print(c.list_topics())
```
Expect `success` or `no-op` for the first print, and a list including your topic for the second. For group projects, contact Haochen or Ryan to access pre-registered topics.
Expect `success` or `no-op` for the first print, and a list including your topic for the second. For group projects, contact Haochen or Ryan to access topics that have been registered by others before.

Aside from topic authorization, authentication requires a username (user's OpenID) and password (AWS secret key in `$HOME/.diaspora/storage.db`). If the secret key is missing (e.g., new login), `KafkaProducer` or `KafkaConsumer` instance would internally call `create_key()` to generate and store one. However, the key takes 30 seconds to 2 minutes to activate due to AWS processing.

Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Diaspora Event Fabric SDK: Troubleshooting

## Authorization and Authentication Issues
To confirm you have access to a topic and ensure proper authentication with Kafka, use the script below. Remember to replace `...` with your specific topic name:
To confirm you have access to a topic and ensure proper authentication with Kafka, use the script below. Replace `...` below with your topic name:

```python
from diaspora_event_sdk import Client as GlobusClient
Expand Down

0 comments on commit b1fc5da

Please sign in to comment.