29
Views
6
Comments
Expose in an API data obtained from a application without saving  it in an entity
Question
Application Type
Mobile

How to expose in an API data obtained from a mobile application without saving it in an entity, using memory cache, I attach a diagram for greater understanding 


The reason is to not be saving data in the entity since the data is obtained every 30 seconds and this could affect the performance of the application


Diagram cache.png
Champion

Hi Miguel,

If data get refresh at every 30 seconds and you need to push this data to app2 every time then what is the need to cache here. Whenever new data available you can just call the api to push the data on app2.

But if App2 not need data every 30 seconds then you can simply save the data in local database or client variables and every time new data comes update the previous one. Your api can consume data from here. 

regards

The purpose is to send the information from APP1 to APP2 continuously, but I think I will be able to achieve this with a socket, what do you think?


Hi Miguel,

could you give some more information about App2? What is that? An OutSystems Web or Mobile app. In addition it would be good to know the purpose of this data flow. Is it to sync a state between two apps or a permanent sync of incoming data?

Stefan

The purpose is to send the information from APP1 to APP2 continuously, but I think I will be able to achieve this with a socket, what do you think?

Hi Miguel,

hard to tell without having the full picture. But you could use a websocket based pub/sub system for client to client sync in case you do need the full history of data. You may find my Azure Web Pub/Sub integration helpful for that https://www.outsystems.com/forge/component-overview/13258/azure-web-pubsub

If you need a full history of data - meaning the consuming data needs to get all data that is sent, even when app2 goes down for a period time then i would suggest that you create a serverless API (Lambda / API Gateway) where app1 sends data to. the lambda would forward messages to amazon SQS and app2 would get those messages in batches,

Stefan

Hello everyone, I was researching a little more and it will not be possible to implement it in this way, because the background of an API is to work with Server actions and to expose a data I need to call an entity no matter what, so I was researching other technologies and possibly it will help me by performing an implementation with a socket so that APP 1 COMMUNICATES WITH APP2 and one will be sending information and the other one is going to be receiving that information, if I manage to implement this I will let you know and thank you for your support really

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.