Architecture - Best Practices - To retrieve data from database

When i should go for direct database connection to get the data from database vs REST API to get data from database.

What are the pros & cons of each approach. Detailed help is highly appreciated.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The only reason I would consider a service (which is going to require a completely different skill set with a separate team to create / maintain the thing) would be for data security, integrity, and transactional stablility, i.e. ACID compliance.

    That would render the REST service moot, because REST can't handle ACID compliant transactions.

    So I would never replace Appian's built in DB connection for a REST API. If the need arose I would, however, very strongly recommend replacing Appian's built in DB connection for a SOAP API.  If you're doing a bank transaction, anything with money, or things that need exceedingly strict control on the database transactions, such as all-or-nothing mandated, you would probably do well to use SOAP service instead of Appian.  In my opinion, there's no condition where I'd rather use REST than Appian.

  • Thanks David for detailed reply. But about ACID properties internally REST API should take care, it's not between Appian & REST. Let's say if we are saying deposit money then that instruction to rest API should handle internally in any language. As currently happening using Angular or React, both uses REST.
Reply Children
No Data