dwyl / dwyl/phoenix-uk-postcode-finder-example

Thoughts on how the store finder could work

Open
#5 0 comments 0 reactions 1 assignee Claimed by @RobStallion View on GitHub
discuss help wanted
Dominant language
Elixir
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/club-soda/club-soda-guide/blob/master/lib/cs_guide/resources/venue.ex#L209), 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.