I use the Heroku Temporize add-on to schedule tasks.
The temporize documentation says:
Any post data provided with the request carries state data your
application uses to decide how to process the event. For instance, the
'data' field could contain an account number for a user in your system
or a chunk of data to be processed.
I tried to post text/plain, url-encoded and JSON data but I never receive any data on my endpoint.
Related
Is there a library that masks sensitive fields(encrypts with random characters) in Rest API response. The masked data should be sent back to the UI. And if UI sends the masked data back in consecutive requests, it should be again unmasked and send it to server(so that server can interpret and work correctly).
Note: I don't want to exclude the fields in response. I want to perform operation on the masked data based on user interaction on UI.
Say, If there's a credit card number in API response, this should be shown as xxxxxxyyyyyy in UI... And when UI want to send it back in a post call, it should be unmasked and sent back to server
If you are in a middle-ware that both receives the context and maybe append some data to context to send it to the next interceptor, then which of the two methods i.e. metadata.FromOutgoingContext and metadata.FromIncomingContext shall be called?
If you are writing that middle-ware in the server, then you are receiving that metadata in the incoming request.
You should then use metadata.FromIncomingContext to get the metadata at that point.
The metadata in the "outgoing context" is the one generated by the client when sending an outgoing request to the server.
See here for examples of both:
https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md
I want to know that further details about payloads in an event-driven architecture. I used several online resources and didn't get many details. Please help me to find,
Use of the Full Payload.
Provide Metadata and an API link with a token to access the Actual Payload, than sending the full data.
To answer your question, api link rather than full data let's take a sample:
In Amazon, Order Microservice sends a event OrderCancelled and Customer service listen to that event.
Now there could be two ways of sending the event data:
Send complete order data in the Event
Pros: Listener services do not need to query Order Service for their functioning.
Cons: Lots of data will be passed in the event even though only 10 % is used. Lots of I/O.
Send only order id, cancel reason , customer id , date in the event
Pros: If the data is choosen carefully, much less data is sent in the event.
Cons: If the data is choosen incorrectly, then that means lots of API requests.
I want to send some custom properties in the attachment for interactive messages and retrieve them back in the action response. is there a way to do this?
Yes, that is possible. However, it only works well for small sets of data.
Assuming we are talking about buttons the normal approach would be to use the value field of an action to transfer custom data based on which button the user clicked back to your app. The field is a normal string within a JSON message, which is send by POST request to your app. So it can in principle contain a whole data set, not only a single value. All you need to do is include it in the button attachment that is send to Slack and your app will receive the respective value field back. (depending on what data you want to send you might need to encode it, e.g. you want to encode binary data into base64, so that is can be transferred as JSON string)
I have used it successfully in one of my apps to transfer serialized objects containing information about the user's application context.
There is one caveat though, that caused me to later abandon this approach again. As I found out the field length is limited, so if your string is too long you might end up with truncated data. In my estimation the limit is about 2.000 chars, but I do not have a definitive number.
Instead of transferring all data in the attachment, I now keep the user application context in a server session (PHP) and only transfer IDs through the value field of my buttons.
Conclusion: If you have small sets of data you can transfer them through the value field. If you have larger sets of data I would not recommend it.
I´m writing a software that work to process a set of data that came from use input process it and send an answer to the user.
The flow starts based on a configured API Callthat start a chain of API calls passing the result of each API for the next one until reachs the final output.
The problem is that the chain of calls is configurable by the user in order to process the data before saving it to the database.
Giving you a little example:
I receive data from an API that has the readings from a field sensor, on the arrival of this data I should do the following things:
Save the data on the database
Process the Data
Based on the data and on a configuration that should be made by the user I should get information from a diferent API (the APIs depend on the content of the data)
Send the information that I got from the other API to a third which will send it back to the sensor
Do you know any solution that´s capable of doing this kind of work?
Doesn´t mather the language or the framework, since it´s a brand new software we are free to start from the very first step.
Thank you
I am considering that, You have a form where user entering the Data, you are receiving the data, processing it and returning the answer based on the Data and your set of rules.
If you have a single form, get the data and pass to the API - RESTFul API
Process the data at server end
Response to client based on the set of rules of user entered data.
If you have Multiple form and coming to user one after one then do same.
Hope the process works. if you could clarify the Requirement more specifically then I can draw the Process in more depth.