Is granting read access to a client app a good practice? Intefrations should be done through APIs, jms and the like, right? My opinion is it should be a no no to do the integration on the database layer bypassing the app even if both apps are internal service which are completely different products. opinions are much appreciated.

  • 3
    Depends on the use case honestly. When they literally want to pull your complete database for reasons occasionally, there is not a point in creating an API for that.

    But you will always run into the issue where you cannot apply migrations which alter the table structures as your client wrote direct SQL queries which will break quite easily then. That is abstracted by the api layer, if implemented properly. 9999/1000 times it is not a good idea to give someone read access to your database, as yes, that's what your API is for and hopefully exposes only the required data. But, there is always that one edge case where it might be a good idea to do it.

    Does your client specify why they want read access?
  • 2
    yes, without you get no accountability (logs) when something goes wrong and it could cost your company a lot of money to fix a fuck up.
    And besides working on a codebase that doesn't consume api's is no fun if something has to change. Without apis you're inflexible and probably not able to deploy your apps on distributed cloud servers. And it's basically begging to get hacked.

    so yo may want to look in to the latest and greatest what api technology has to offer: GraphQl www.graphql.com www.prisma.io
  • 1
    @EngineerCoding actually both are internal services for 2 separate products. I could understand if these are (micro)services on the same application.
  • 1
    The problem is when one of 2 apps doesn't have any APIs. And client still want an integration.
  • 0
    @NoToJavaScript legacy app? Probably that would be the exception temporarily but there should a plan to move that our from the old tech.
  • 3
    @japzio I think you underestimate the number of business running on 1990ish tech.
    I know a big manufacturing company who still uses BAAN v5
  • 3
    @NoToJavaScript agree with you. Most banking systems too mostly are legacy tech
  • 2
    @japzio naaan, they are more 70ish with COBOL haha
  • 1
    @japzio no microservice should delegate it's right/ownership of his data scope !! It's a simple and easy way to couple the two services at the data level and fucking forever your hoped consistency.
    So a big NO NO!!

    Now inside a MapReduce system simple pulling from App/Service/Microservice to reverse inside a data warehouse or lake, why not.
Add Comment