Hacker News new | ask | show | jobs
by dennisy 1691 days ago
I agree, but would you mind providing a concrete example of:

> No matter how you integrate different applications, be it via APIs, messaging, or a database, it's vital to separate your application's internal data model from models which it exposes.

Especially in respect to this product.

4 comments

Are you asking for an example of separating the data models or an example of what happens when you don't.

This is a good example of what separation enables you to do:

https://www.troyhunt.com/your-api-versioning-is-wrong-which-...

(it is presented from the perspective of how to version an API, but the examples of what it looks like are there)

A field you rely on changed form integer to string. Or goes away. Or was unique but a duplicate shows up. Or the database disappears for a few minutes every hour.

S

Over time, the internal data model might need to change to more accurately model the world. For consistency and efficiency, we usually do not want to maintain the combination of the original low-fidelity model and new high-fidelity model within the internal database.

The internal data model might need to be reorganized to improve the efficiency of part of the internal application.

A client might not need a higher fidelity model. The internal reorganization of the data model might not be pertinent to the client's interface. So we normally have some data-mapping in the application to help provide a stable interface for clients.

It's possible to providing these compatibility mappings within the database through views, but this is usually considered to be harder to control, test and scale.

Maybe in a big application, the application-layer mapping and caching eventually get complicated enough to be something like a custom-made database. And so we might end up with an "integration database" but call it something different.

Great thanks.

So we have a DB and a service in front of it. The DB gets a new schema, but the service maps to the previous representation in such a way that clients do not need to know about the new schema. Is that the gist?

Then when it comes to using Fauna, what is it that does not allow such a data flow?

Interesting read, but seems like a tangential topic?