-
Notifications
You must be signed in to change notification settings - Fork 185
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::<namespace>::<topic>
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: #165. Not sure about this concept of "subset" instead of namespace.