HackerTrans
TopNewTrendsCommentsPastAskShowJobs

babbledabbler

no profile record

Submissions

Ask HN: Is this a good table schema for handling third party integrations?

7 points·by babbledabbler·3 jaar geleden·4 comments

comments

babbledabbler
·vorig jaar·discuss
I wonder how hard it would be to use AI to generatively interpolate the images so it could be a video stream.
babbledabbler
·2 jaar geleden·discuss
Woah it even has a w for wa-pi-rio.
babbledabbler
·2 jaar geleden·discuss
Yea I start to load the chat and then was like wait a sec and noped out.
babbledabbler
·3 jaar geleden·discuss
I'm working on an app to address this issue. While putting a cost calculation is a good way to raise awareness, we take a different approach to a solution.

It's called Meet Robbie (https://meetrobbie.com) and we give you an agenda with timers, minutes, and action items and you can use it directly in Zoom.

It's main use case is for recurring meetings where you have a list of business to get through. It encourages common sense things like having an agenda, being mindful of time, and keeping organized minutes.

We just released our so you can try it out. Would love any feedback and thoughts on our approach!
babbledabbler
·3 jaar geleden·discuss
Thanks! This has potential. I'll play around with this when I have some time.
babbledabbler
·3 jaar geleden·discuss
Thank you! That's a good idea. I have fields for user_id and organization_id that I omitted.

What would you rename type to?

Now here's what I'm thinking

id: uuid | name: string (ex 'Google', 'Microsoft') | type: string (ex 'calendar','task-management'')| properties: jsonb
babbledabbler
·3 jaar geleden·discuss
say --rate=500 "Peter Piper picked a peck of pickled peppers. A peck of pickled peppers Peter Piper picked. If Peter Piper picked a peck of pickled peppers, Where’s the peck of pickled peppers Peter Piper picked?"
babbledabbler
·3 jaar geleden·discuss
Yes I started using this in the past year. It dramatically sped up my watch/test cycle on mac.

It seems like something that shouldn't be necessary on Mac with docker so I hope they just make it a standard docker feature.
babbledabbler
·3 jaar geleden·discuss
I don't really find these considerations frustrating just a bit tricky but regardless definitely agree with GDPR and on board with keeping PII secure from the get go.

I'm still having a little trouble grokking when an ID becomes exposed or shared so I guess I'll just have to read up on this as it's certainly important.

In our system I realized user IDs are not shared nor linked to (at least not yet) so in actuality the case where there's a URL with a UUID representing a person does not occur. Content generated does not reference UUIDs for persons either. There are URLs with UUIDs representing other types of resources.

By API key I take it to mean an access key for an external reference. That's a good idea for replacing the PK integer with a PK UUID but keeping an external UUID field. That would satisfy the concern with maintaining integer sequences and migrating data.

Anyway this has been helpful so thank you for sharing your thoughts and I have some things to look go on to stay in the good graces of European regulators.
babbledabbler
·3 jaar geleden·discuss
Mainly portability of data and options for the future. I'm all on one postgres instance right now and don't plan on breaking it up until necessary. If at some point I need to take a table and move it to another type of database I want that migration process to be straightforward. If I have integer keys with sequencing behavior I anticipate having to do that porting. That internal key would then become external to do the lookup and if it's an external key I want it to be UUID for security as well. Integers as IDs are guessable so I want to keep them internal.
babbledabbler
·3 jaar geleden·discuss
I'm really not sure what google is thinking with this one. It's not the biggest money maker but google domains is viable and a really easy to use product.

Wondering what other core web services google may sell off.
babbledabbler
·3 jaar geleden·discuss
I'm not so much concerned with figuring out scaling in terms of volume as I expect to be able to handle millions of rows in a single DB and that would be an implementation detail and fine tuning. I'm more concerned about scaling in terms of complexity and keeping the system easy to reason about when more people, tech are involved.

Lets say I have a <CAR>-[1:N]-<TRIP> in two tables in a relational DB. This works fine at first even for millions of rows as you say.

At some point in the future it makes sense to have these two entities managed by different team/services/db. Let's say TRIP becomes a whole feature laden thing with fares, hotels, itinerary, dates. So I need to take this local relation and move it to different services and different DB.

If I had been using an integer PK/FK this would be a more complicated migration than if I used UUIDs.

My assumption is that we would not want to have a sequenced integer key used in a distributed system.

In other words it seems safer bet if there's a possibility of needing to move to a distributed system to use a UUID for the key from the beginning.
babbledabbler
·3 jaar geleden·discuss
I'm simplifying a bit for brevity and we can do some abstraction to handle it so it's not that the framework is simplistic. I'm just having trouble justifying adding this complexity with two types of IDs.
babbledabbler
·3 jaar geleden·discuss
This was generally the reason I went with numeric ID as PK originally. It makes working with and analyzing the data as well as cross referencing relations easier.

For all my tables I have a base schema that looks something like this.

id: integer sequence PK uuid: uuidV4 created_at: datetime updated_at: datetime

The concern I have is when I have to distribute my system when scaling. Those numeric IDs will have to be replaced with the UUIDs so I figure I might as well do it now.
babbledabbler
·3 jaar geleden·discuss
I think you raise some good questions around IDs and PII and we definitely will be tackling GDPR sooner or later.

I don't quite follow on the European regulation issues raised by using as a UUID in a route and that being the PK of the record.

I know you should not expose PII or any information that can be used to identify a person, however, in our case any route is behind an authed login on an SSL connection which encrypts the path (we don't use query params).

The only place that contains data that ties a UUID to a person is in the database. This would be the case whether we used a PK as an integer or not.

Could you elaborate or share any resources around dual IDs DB design for PII compliance? That would be super helpful.

Regarding framework hacking or workarounds, I have a principle to not go against the grain of a framework. The reason for this is that modifying/hacking adds complexity when building on top of it or onboarding other software engineers. If necessary I'll do it as a last resort.
babbledabbler
·3 jaar geleden·discuss
Probably when there is some downtime or as the opportunity presents.

I would use a date field to do ordering or a sequenced field when needed.
babbledabbler
·3 jaar geleden·discuss
I actually have been using a combination of a numeric integer ID as the PK and a UUID as a lookup field to do routing lookups etc. for this purpose in Postgres backed app I'm working on.

I found this approach to be more trouble than it's worth and plan on switching to a UUID PK key and doing away with the integer sequence.

Here are the complications I ran into:

The libraries I'm using for the ORM and API are designed to work with a primary key for single record get access. For example they want you to do `resource.get(ID)` where ID is the primary key, however, I now have to do `resource.find({ where: { uuid: 'myuuid' }})`. This is for all resources on all pages.

In Postgres, the integer PK sequence has a state that keeps track of what number it's at. In certain circumstances it can get out of sequence and this can trip up migrations.

We already have created_at and updated_at fields and these are probably better for ordering than the sequencing.

Had I to do it again, I would just use UUIDv4 until it runs into issues and either date fields or a sequence where necessary. If anyone has better ideas I would be most grateful as this is something I go back and forth on.
babbledabbler
·3 jaar geleden·discuss
Is there a reason web scrapers aren't used for public sites with content? It seems like this would avoid the pitfalls of APIs and changing terms and prices?
babbledabbler
·3 jaar geleden·discuss
...and still getting clicks 16 years later. Respect.
babbledabbler
·3 jaar geleden·discuss
It seems this is a case of poor decision and communication management rather than a machiavellian plot, however, it's no less harmful or toxic in the outcome.

I'm actually working on an app for organizations to make clear, fair, and transparent decisions systematically so things like this don't happen.