REST API metrics in a non-persistent object?

0
Hi, I want to capture fast changing metrics in my app related to microflows beings called via REST.  I dont necessarily need to persist the data so NPEs should be fine but I cant work out how to retrieve the NPE each time my Microflow service is called. I could associate the NPE with my user or session object but that would still mean that I have to retrieve an object (user or session) from the database each time my MF is called (which could be many many times a second).  What’s the architectural best practice here? How is this usually built?
asked
2 answers
0

Depends a bit on what the actual use case and UI is. Relating the NPE objects to a session object could be on option but a better one might be to use a NPE helper object. If you call the MF from a page for example use this helper as a context dataview, that way when you call the MF from a widget or button you can associate the other NPE objects to and reuse it the next time you call the MF.

answered
0

I don’t know your use case, but if you have many calls with non-persistent data, you need to process so quick as possible.

What about passing the raw data directly to client without any domain mapping? Your front-end need to show it directly. 

answered