I see that gproc uses ets with
ordered_set. Instead I note that Registry uses bags (unordered).
My application must provide an API to inspect the connected users (say, lots of), and the API must be paged. User can pop in and disconnect (sometimes in nastyways I don’t want to trap exit). I would like to exploit the native elixir Registry to automate “lazy” deregistration.
In gproc, I could assign each incoming user a simple incremental integer, and iterate on the gproc to get the N users following a given integer which would represent my page cursor.
Can I achieve the same with Registry or should I switch to gproc instead? Thanks.