dashersw / dashersw/cote

No namespace and a strange "type" for Requester and Responder instances

Open
#236 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.4k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

Hello @dashersw

Following development of the c-cote library, I notice that the Requester and Responder do not use namespace and topic at all, instead a "type" field is required to have a kind of topic.

Is it something that is really wanted ? or working on the API still needed ? What append if "type" is an applicative information the user want to send ?

Actually the API of the publisher looks like:

```
randomPublisher.publish('topic', json);
```

I imagine Requester can be :

```
randomRequest.send('topic', json, function(res) {
//handle res
});
```

With usage of the topic and namespace of course.

I have created a small doc on messages format at https://github.com/joelguittet/c-cote/wiki/Format-of-Cote-messages. In my dreams the format of messages between Requester and Responder looks like between Publisher and Subscriber:

```
+-----------+-------------+-------------+-------+-------------+----------------+
| Fulltopic | AMP field 1 | AMP field 2 | ..... | AMP field N | `pid:id` field |
+-----------+-------------+-------------+-------+-------------+----------------+
```

With fulltopic : `message::::`

Note I suggest on this schema to permit sending any type of AMP fields (blob - useful for sending audio, json, string and bigint), and several fields of course, because it's permitted by axon. The "pid:id" is added by axon itself.

This can be the beginning of a discussion on the subject if you want. Your namespace idea is really not bad and will be a nice to have on Req/Rep in my opinion.

Joel

EDIT: just seen this issue too: https://github.com/dashersw/cote/issues/165. Not sure about this concept of "subset" instead of namespace.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.