Skip to content
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

Should there be two pushMessage methods or not #73

Closed
kenchris opened this issue Oct 15, 2015 · 9 comments
Closed

Should there be two pushMessage methods or not #73

kenchris opened this issue Oct 15, 2015 · 9 comments
Labels
tag-tracker Group bringing to attention of the TAG, or tracked by the TAG but not needing response.

Comments

@kenchris
Copy link
Contributor

https://github.com/w3ctag/spec-reviews/blob/master/2015/10/nfc-feedback.md

pushMessage can only have two active pushes happening at once--one for tags, the other for peers. Is this a list expected to expand? If this is a fixed set of things, then could the API be simplifid by having separate pushToTag() and pushToPeer() APIs? (Not sure if this would be a good thing.)

@zolkis
Copy link
Contributor

zolkis commented Oct 15, 2015

Yes, IMO this would make things more clear for developers, at the expense of a longer spec.
See also see this comment in #68.

@jyasskin
Copy link
Member

@dontcallmedom suggested in the F2F that we drop the separation between tags and peers. Specifically, NFCPushOptions would lose the target field, and "If there are any existing instance of this algorithm running for the current NFC adapter whose target is equal to options.target" would lose the "whose target is equal to options.target" (and maybe some more cleanup).

@zolkis
Copy link
Contributor

zolkis commented Oct 27, 2015

Yes, that is possible as well. After a short check it seems feasible, but we need to dig deeper to find out what functionality/use cases we may lose. We also need input from developers for that (@mrj ?).

We can deal with this after figuring out the multiple adapter handling (behind the scenes), and getting rid of explicit adapter objects (#67).

@zolkis
Copy link
Contributor

zolkis commented Oct 27, 2015

It is clear that we will lose the ability to tell "push to peers but not to tags", which may be important in some cases, but it's not clear how important.

Losing "push to tags but not to peers" may also be important, though at the moment I can't see strong reasons for that.

@kenchris
Copy link
Contributor Author

What about the use case where you want to push different date depending on it being a peer or a tag, which would be common as peer-to-peer could be for app-to-app communication instead of just storing data

@zolkis
Copy link
Contributor

zolkis commented Oct 28, 2015

Because all dev experience with (native) NFC handles peer and tag communication separately, merging them is a bold step. I think we need to experiment with this. IIRC at least @mrj had a use case with peer-only, so I would keep the separation a bit longer, and keep this issue open.

@zolkis
Copy link
Contributor

zolkis commented Nov 3, 2015

To summarize, we want to:

  1. Simplify the way push() is called, and not care if the push message refers to tag or peer: whichever is tapped first, the push happens there.
  2. Still maintain possibility to say that the push message is meant only for tags, or peers.

One solution is to reintroduce "any" as NFCPushTarget value, and make it default.
@jyasskin you have had some issues with the value "any" (or the related steps) in the past, but I don't recall what it was. I will try to use it again and let's see if I can formulate the steps well.

@zolkis
Copy link
Contributor

zolkis commented Nov 3, 2015

The above also means we stay with one push() method for now.

zolkis added a commit to zolkis/web-nfc that referenced this issue Nov 4, 2015
…3c#84. Handle push related TAG review comments: simplified and aligned push message, optional push options with sensible defaults, improved push and cancelPush steps, option for suspending watches during push(), editorials.
@zolkis
Copy link
Contributor

zolkis commented Nov 6, 2015

Fixed by #88. We stay with one push() method for now.

@zolkis zolkis closed this as completed Nov 6, 2015
@plehegar plehegar added the tag-tracker Group bringing to attention of the TAG, or tracked by the TAG but not needing response. label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag-tracker Group bringing to attention of the TAG, or tracked by the TAG but not needing response.
Projects
None yet
Development

No branches or pull requests

4 participants