dwyl / alog

🌲 alog (Append-only Log) is an easy way to start using the Lambda/Kappa architecture in your Elixir/Phoenix Apps while still using PostgreSQL (with Ecto).
GNU General Public License v2.0
15 stars 2 forks source link

Update entry_id to use CID instead of UUID #32

Closed RobStallion closed 5 years ago

RobStallion commented 5 years ago

Relates to https://github.com/dwyl/alog/issues/15, https://github.com/dwyl/cid/issues/1, https://github.com/dwyl/auth/issues/25 & https://github.com/dwyl/cid/issues/11

Replace/update alog so that it creates CIDs based on the content passed to it instead of creating UUIDs.

Will be using this branch to test this for now. This can be updated later once we have a our CID module working as we would like. For now just wanted to get a better understanding of how this functionality will work in alog.

The way alog currently inserted into a database will need to be updated to look something like this...

inserted cid(PK)1 name address prev
1541609554 gVSTedHFGBetxy Bruce Wane 1007 Mountain Drive, Gotham null
1541618643 smnELuCmEaX42 Bruce Wane Rua Goncalo Afonso, Vila Madalena, Sao Paulo, 05436-100, Brazil gVSTedHFGBetxy

See the faqs section of the CID readme for more info on this point.

RobStallion commented 5 years ago

Code that will need to change

insert looks like we would have to remove the insert_entry_id/1 function (this function can probably be removed from the app completely as well no longer be used)

nelsonic commented 5 years ago

@RobStallion thank you for opening this issue. ✨ Please focus on the open pull requests in CID before doing any work on alog. image

We need to re-think how alog works and unless you have a decent amount of experience with both existing CMS and Ecto internals you won't accidentally stumble upon the optimal solution to this problem.

RobStallion commented 5 years ago

Closing this issue in favour of https://github.com/dwyl/phoenix-ecto-append-only-log-example/issues/23 and https://github.com/dwyl/phoenix-ecto-append-only-log-example/issues/22

nelsonic commented 5 years ago

@RobStallion thanks for consolidating the issue into the example first. 👍