Closed
Bug 1067384
Opened 10 years ago
Closed 10 years ago
[Rooms] Handle multiple simple push urls at registration time
Categories
(Hello (Loop) :: Server, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alexis+bugs, Unassigned)
References
Details
(Whiteboard: [qa?])
Attachments
(1 file)
https://wiki.mozilla.org/Loop/Architecture/Rooms#Loop_Server_API_Changes states that we should have multiple SP urls at registration time.
Comment 1•10 years ago
|
||
So the proposed API is:
POST /registration HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Host: localhost:5000
{
"callsSimplePushURL": "https://example.org/wg0asg83t_74s",
"roomsSimplePushURL": "https://example.org/vnd7a85ls9gh"
}
Today's API is
POST /registration HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Host: localhost:5000
{
"simplePushURL": "https://example.org/wg0asg83t_74s"
}
I would like to make it looks like:
POST /registration HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Host: localhost:5000
{
"simplePushURL": "https://example.org/wg0asg83t_74s",
"simplePushURLs": {
"calls": "https://example.org/vnd7a85ls9gh",
"rooms": "https://example.org/mvc_9834dser"
}
}
The idea behind that is to keep the current simplePushURL parameter to no break the API and use it as the default one if provided.
But also let the user define different SimplePushURLs per channels and let the ability in the future to add more channels.
So the simplePushURL will be optional and if provided used as the default SimplePushURL for all topics.
If the simplePushURLs is provided, topic inside will be set.
If one topic is missing a 400 error will be raised.
Does this would work for you?
Flags: needinfo?(alexis+bugs)
Flags: needinfo?(adam)
Comment 2•10 years ago
|
||
I mixed channels and topics for the same thing, also I think we should use topics in the future because channel are already used to define something else in loop-server.
Updated•10 years ago
|
Whiteboard: [qa?]
Comment 3•10 years ago
|
||
(In reply to Rémy Hubscher (:natim) from comment #1)
> So the proposed API is:
>
> POST /registration HTTP/1.1
> Accept: application/json
> Content-Type: application/json; charset=utf-8
> Host: localhost:5000
>
> {
> "callsSimplePushURL": "https://example.org/wg0asg83t_74s",
> "roomsSimplePushURL": "https://example.org/vnd7a85ls9gh"
> }
>
> Today's API is
>
> POST /registration HTTP/1.1
> Accept: application/json
> Content-Type: application/json; charset=utf-8
> Host: localhost:5000
>
> {
> "simplePushURL": "https://example.org/wg0asg83t_74s"
> }
>
> I would like to make it looks like:
>
> POST /registration HTTP/1.1
> Accept: application/json
> Content-Type: application/json; charset=utf-8
> Host: localhost:5000
>
> {
> "simplePushURL": "https://example.org/wg0asg83t_74s",
> "simplePushURLs": {
> "calls": "https://example.org/vnd7a85ls9gh",
> "rooms": "https://example.org/mvc_9834dser"
> }
> }
>
> The idea behind that is to keep the current simplePushURL parameter to no
> break the API and use it as the default one if provided.
>
> But also let the user define different SimplePushURLs per channels and let
> the ability in the future to add more channels.
>
> So the simplePushURL will be optional and if provided used as the default
> SimplePushURL for all topics.
> If the simplePushURLs is provided, topic inside will be set.
>
> If one topic is missing a 400 error will be raised.
>
> Does this would work for you?
Sure, that seems reasonable. I'll update the wiki page when I get a moment (which might not be right away; this week will be pretty busy for me).
Just to make sure we have a common understanding of how this works: simplePushURL and simplePushURLs.call should have the same value. Is that what you expect also?
Flags: needinfo?(adam)
Comment 4•10 years ago
|
||
Yes I have updated the wiki page: https://wiki.mozilla.org/Loop/Architecture/Rooms#Loop_Server_API_Changes
So basically if simplePushURL is provided, it will be used as simplePushURLs.calls
Comment 5•10 years ago
|
||
Attachment #8490074 -
Flags: review?(alexis+bugs)
Attachment #8490074 -
Flags: feedback?(tarek)
Updated•10 years ago
|
Flags: needinfo?(alexis+bugs)
Reporter | ||
Comment 6•10 years ago
|
||
Yes, that works for me, I prefer this way of dealing with it.
Updated•10 years ago
|
Attachment #8490074 -
Flags: feedback?(tarek) → feedback+
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•10 years ago
|
||
Comment on attachment 8490074 [details] [review]
Link to Github PR — #207
clearing the r? on myself. This landed already.
Attachment #8490074 -
Flags: review?(alexis+bugs) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•