Re: [ANN] locus: Geolocation and ASN lookup of IP addresses

Guilherme Andrade <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAA5f+NVjCHM-pUGPmT2jjOAaeNkP5PAdP+ie2J=8gWqNrAN6pw@mail.gmail.com>
I understand, and have faced such problems myself - there's an inherent
reliability issue.

But it can be worked around in multiple ways:
- by having your own HTTP(S) mirror (which is possible since 1.0.0)
- by loading the database from the file system (which is possible since
1.3.0, from March 2018)
- and starting now, by fetching the data however you see fit, through
callbacks

As for the issue of picking a HTTP client in particular, I've so far
avoided it by sticking with the stdlib's httpc.

But CA validation is still required for HTTPS (or rather, **strongly**
recommended), and so there's a dependency there (and one that requires
regular updates.)



On Mon, 30 Aug 2021 at 16:31, Max Lapshin <[email protected]> wrote:

> This is a well known problem with such libraries.
>
> Without proper updating data it is not 100% useable as it can be, but
> library that goes itself somewhere into the internet is not very easy
> to integrate.
>
> Especially when we do not have standard http client in erlang (and in
> elixir).
>
> On Mon, Aug 30, 2021 at 6:24 PM Guilherme Andrade <[email protected]> wrote:
> >
> > Hello Max,
> >
> > Yes it does - although now you have a choice, as there's a new API[*]
> for unpacking the database from a binary and using the result as see fit,
> which allows for new use cases.
> >
> > [*]: https://hexdocs.pm/locus/2.0.0/locus_mmdb.html#unpack_database-1
> >
> > On Mon, 30 Aug 2021 at 06:15, Max Lapshin <[email protected]> wrote:
> >>
> >> Does it still tries to download database itself?
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.