dwyl/phoenix-uk-postcode-finder-example

Thoughts on how the store finder could work

Open

#5 opened on 2019年3月6日

GitHub で見る
 (0 comments) (0 reactions) (1 assignee)Elixir (2 forks)auto 404
discusshelp wanted

Repository metrics

Stars
 (8 stars)
PR merge metrics
 (PR metrics pending)

説明

I have been thinking about possible ways of we could implement a "nearest store" feature for this example.

We could use a similar approach to the one we took in Club Soda, where we get postgres to do the logic for us. This approach worked well.

However I was hoping to make use of ets (erlang term storage) tables in this example, something the above does not do. Dictionary With this in mind I was trying to come up with an approach that didn't rely on a database at all.

I would like to store all of our "stores" (outdoor gyms / vegan restaurants / etc) in our ets table and query that table directly to get the nearest stores. In order to run a complex query on an ets table it looks like we need to use a guard clause. The means that we will need to define our own macro that can be used in a guard clause. See #3 for more info on this. This is proving to be quite challenging.

I would like to know what people this is a good approach this solving this. If anyone has any thoughts/idea/suggestions/comments then please respond.

コントリビューターガイド