architecture

abdullahibra 2020-09-08T13:56:20.002200Z

Hi everyone,

abdullahibra 2020-09-08T14:01:49.006600Z

i'm searching for the best architecture to handling data persisted at sql db in REST fashion, but will be some columns in that db which will hold the result of computation which depend on some factors, so that optional columns will have variable data, so update operation will be much, so the design in my mind is: REST API: /add POST ;; adding data /query GET ;; do some computation and update optional columns then return the results, maybe attached to cache layer to make everything faster

abdullahibra 2020-09-08T14:02:50.007900Z

maybe i can add kafka here, so query request will get the data from db and push to kafka and computation done by a separate components and publish the results

abdullahibra 2020-09-08T14:03:07.008300Z

computation layer will update the columns in the db as well

abdullahibra 2020-09-08T14:03:32.008800Z

did anybody face the same situation, and have a better approach for that ?

synthomat 2020-09-08T14:14:00.010400Z

leave out any external dependencies if not absolutely required; distributed systems can lead to incredible pain down the road

abdullahibra 2020-09-08T14:42:58.010800Z

@synthomat spark, kafka and so on, does that what you meant ?

synthomat 2020-09-08T14:46:48.011900Z

yes, that’s what I was referring to; maybe you’re using it already for something else, then please feel free to ignore my advice 😄