-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No namespace and a strange "type" for Requester and Responder instances #236
Comments
For some reason I hadn't seen this issue! Sorry. Namespaces are mainly intended for the Sockend component, and directly map to socket.io namespaces. However, if you look at the Component.js line 29 you will notice that all components make use of namespaces in discovery and connection. The main reason for why the requester / responder syntax is not like Also, yes, I love this discussion and would love to think of a cote v2. You can also check out kotelett, my attempt to simplify this, plus make connections dynamic, with even less configuration, based on what messages a service could respond to. I intended kotelett to be the next generation of cote. |
Ok for the namespace, you're right, it's used on discovery. For the topic subject, that's purely some API/syntax question because I was surprised of the 'type' field. What append if the 'type' is not filled ? Not tested on my side but probably it's not working ? Joel |
If there's no type in a request object, the responder throws it away, as it's not a legitimate request. |
Please check out kotelett. Your suggestion could be easily implemented there, and it's in fact much simpler to use than cote. |
Well it's not a problem for me, just surprising. On publisher you have:
You have not:
That's why I said it's only an API/syntax convenience/uniformity across cote library but for my own usage it does not matter. |
@joelguittet This threw me off when I first started using cote as well. First time I tried using publisher i couldn't get it to work until i realized it takes |
@otothea yeah exactly, publisher is one way and requester is another way. Troubling. |
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:
I imagine Requester can be :
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:
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.
The text was updated successfully, but these errors were encountered: