scala - Best approach to ingest Streaming Data in Lagom Microservice -


i creating streaming analytics application in each analytics/functionality implement microservice analytics can able use in different project later.

i using lagom creating microservice. new in lagom that's why came across doubts.

i don't understand best approach post stream of data (coming multiple sensors) microservice , microservice publish data kafka topic.

  1. does lagom feature of stream message in service description servicecall[ source[string, notused], source[string, notused]] right approach post streams of data (big data) hundreds of wifi sensors? have tenancy deal huge amount of data streams receiving near real time (=5 sec)?

  2. secondaly, while publish data kafka topics why have implement persistent entity (recommended lagom)? because kafka guarantees at-least-once delivery of message

my application not crud application, support process streaming data.

  1. lagom's streaming calls use websockets. it's built on play's websocket support, can scale millions of connected clients. wouldn't call hundreds of wifi sensors huge amount of data, lagom should handle it, , lagom can scaled horizontally, if processing you're doing heavy, can spread processing across many nodes.

  2. publishing incoming websocket stream kafka not supported in lagom. while kafka guarantee @ least once once message published kafka, there no such guarantees when getting message kafka in first instance. example, if side effect, such update database, publish message, there's no guarantee if application crashes between when database updated, , when message published kafka, that message published kafka (in fact won't be, message lost). why lagom encourages database event streams published kafka, since publishing event log in way guarantee database operation needs sent kafka happen @ least once. however, if you're not doing side effects, sounds you're not, might not relevant you. recommend in case use akka-streams-kafka (what lagom's kafka support built on) directly.

i've raised issue referencing use case here.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -