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

Explore Nearby: Separate API for Bot List loading #397

Closed
zavreb opened this issue Feb 16, 2017 · 18 comments
Closed

Explore Nearby: Separate API for Bot List loading #397

zavreb opened this issue Feb 16, 2017 · 18 comments

Comments

@zavreb
Copy link

zavreb commented Feb 16, 2017

Issue: Current Explore Nearby screen displays bots from the 'Bot List' API. Explore Nearby needs to have its own API.

Per @bengtan:

Explore Nearby should be using a separate list of bots to display (with it's own loading). It shouldn't be using the 'Bot List'. 👍 1

AC pending w/discussions w/ @thescurry

AC:

  1. Prioritization of bots to display, should solely be based on distance. All nearby bots must be displayed (with proper visibility settings) within screen view.
  2. Bot loading should currently not be an issue. (Should we cap # of bots displayed per screen view?) cc: @bengtan, @thescurry
  3. Display all friend/follower accounts bots with appropriate visibility setting.
  4. If one address has multiple bots please display first bot created or any criteria of your choosing. (This bit is still being worked out w/design).
@zavreb
Copy link
Author

zavreb commented Feb 22, 2017

@aksonov since AC has just been determined feel free to consider this a part of the next sprint.

@zavreb
Copy link
Author

zavreb commented Mar 2, 2017

@bengtan thoughts?

@thescurry
Copy link

@bengtan (cc: @zavreb) isn't this really a backend ticket?

@bengtan
Copy link
Contributor

bengtan commented Mar 2, 2017

The server side API already exists.

What's missing ... is that there needs to be a discussion on how to limit the bots which appear in 'Explore nearby', and how to sort them by (some definition of) 'importance'.

I said something similar here:

#341 (comment)

but that seems to have been overlooked by everyone.

@thescurry
Copy link

I think I agree with everything except point #4 from @zavreb. The reason being is that we don't have that problem yet, we barely have content... so let's not prematurely optimize for what happens when we have too much content. Also we have some early mocks for too much content on a map... need to review those again. Off to look at #341 now.

@zavreb
Copy link
Author

zavreb commented Mar 2, 2017

Per estimation meeting. For now we are loading all bots. In the future we need to tweak this ticket.

@aksonov
Copy link
Contributor

aksonov commented Mar 15, 2017

@toland, @bernardd, @bengtan Could you help me with API? I'm using syntax taken from https://github.com/hippware/tr-wiki/wiki/Bot-Geosearch and getting exception:

rawOutput: <iq type='get' xmlns='jabber:client' id='49a1b776-e8b3-4154-88d0-ffe64dd813ad:iq' to='testing.dev.tinyrobot.com' from='46886766-fa85-11e6-bb1f-0eedd159a4c5@testing.dev.tinyrobot.com'><bots xmlns='hippware.com/hxep/bot' lat='11' lon='12.5'/></iq>
_dataRecv called<iq from='testing.dev.tinyrobot.com' to='46886766-fa85-11e6-bb1f-0eedd159a4c5@testing.dev.tinyrobot.com/20DAC82C1310E7391489590296314218' id='49a1b776-e8b3-4154-88d0-ffe64dd813ad:iq' type='error' xmlns='jabber:client'><error code='500' type='wait'><internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>{{#{'__exception__' =&gt; true,
    '__struct__' =&gt; 'Elixir.Protocol.UndefinedError',
    description =&gt; &lt;&lt;&gt;&gt;,
    protocol =&gt; 'Elixir.Enumerable',
    value =&gt; nil},
  [{'Elixir.Enumerable','impl_for!',1,[{file,"lib/enum.ex"},{line,1}]},
   {'Elixir.Enumerable',reduce,3,[{file,"lib/enum.ex"},{line,116}]},
   {'Elixir.Enum',map,2,[{file,"lib/enum.ex"},{line,1776}]},
   {'Elixir.Wocky.Index',handle_call,3,
                         [{file,"lib/wocky/index.ex"},{line,46}]},
   {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,615}]},
   {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,647}]},
   {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]},
 {'Elixir.GenServer',call,[wocky_index,{geosearch,&lt;&lt;"11"&gt;&gt;,&lt;&lt;"12.5"&gt;&gt;},5000]}}</text></error></iq>

@bernardd
Copy link

bernardd commented Mar 16, 2017

The exception is occurring because we don't have Algolia indices enabled on testing. Try the same thing on staging or us1 and it should work.
I'll add some code that will return a more informative error for this case.

@aksonov
Copy link
Contributor

aksonov commented Mar 16, 2017

@bernardd It is pity because I can't run unit tests for staging (because of Digits auth). Any chance to make it work on development (so my unit tests work)? Also development of features is much faster with unit tests than with ios emulator.

@aksonov
Copy link
Contributor

aksonov commented Mar 16, 2017

@bernardd Okey, I've run the test on staging with my credentials. However maybe we could make it work on development at the future.

@bernardd
Copy link

Any chance to make it work on development

There's no technical impediment. The main reason we didn't was that we're charged per query, so we didn't want large scale runs of unit tests running up our bills :) I might leave you, @thescurry and @toland to work through that one once you're all on line - or we could discuss it face to face next week :)

@aksonov aksonov mentioned this issue Mar 16, 2017
Merged
@aksonov
Copy link
Contributor

aksonov commented Mar 16, 2017

@toland @bernardd We need to add 'owner' to avoid extra request for each bot to retrieve owner.

cc @bengtan

@thescurry
Copy link

@bernardd @aksonov (cc: @toland ) I'm open to all options on the table here. Happy to continue the discussion here or in SF.

@bengtan
Copy link
Contributor

bengtan commented Mar 17, 2017

I'm open to all options on the table here. Happy to continue the discussion here or in SF.

To be continued here:

Discuss: Algolia search for unit tests
hippware/wocky#574

@zavreb
Copy link
Author

zavreb commented Mar 20, 2017

Can we talk about this? (cc: @thescurry, @bengtan)

@zavreb
Copy link
Author

zavreb commented Mar 21, 2017

Pending server deploy to staging (cc: @bengtan, @thescurry, @mstidham )

@zavreb
Copy link
Author

zavreb commented Mar 21, 2017

Verified on Staging. Pushing ticket to "Verify on Prod"

@mstidham
Copy link

Verified on Prod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants