Hi,
What is the maximum data size which can be sent to a notecard via the notehub and inbound queue ?
Thanks,
Serge
Hi,
What is the maximum data size which can be sent to a notecard via the notehub and inbound queue ?
Thanks,
Serge
Hi @ssozonoff,
Achieving consistent success with larger data packet sizes will depend on a few factors:
I always recommend testing your deployment in the appropriate physical environment and location. That being said, I consider 2KB a very “safe” size and have personally gone up to 8KB with no troubles.
Rob
Thanks Rob,
As a follow on to this then, are there any size limitations to the response of a web transaction. i.e could I retrieve a large base64 encoded string as part of a json payload of say 82kb ?
Thanks,
Serge
Are you using outbound web requests as provided in the Notecard API? And the remote service is then returning a relatively large JSON payload back to the Notecard?
If this is the case, I don’t have an immediate answer for you, but I’d like to experiment with it myself soon. If not, just let me know!
Rob
Thats the idea yes. At the moment I am exploring options to figure out if this can be done at all. For a bit of context, I need to update an EPD (ePaper Display) which involves sending a bitmap image of roughly 82kb based on the size of the display I am using. This is not something that would happen on a regular basis however.
Thanks,
Serge
Hi @ssozonoff,
After looking through our web API docs more closely, it appears we have some gaps (which I’ll be resolving in the coming days). However, we have a suggestion for your scenario:
Using multiple web.get requests, you can instruct the remote server to split a file up into digestible “chunks” and send those to the Notecard:
name
argument of each request could contain query parameters like “offset” and “length” that let the remote server know which chunk of the file to send (and how many bytes to send at a time).content
argument of web.get to "application/octet-stream"
to ensure that the server response comes back in the payload
field.This will allow for more efficient downloading of the chunks and then you’d have to reassemble the file on the host.
Thanks,
Rob
Hi Rob,
OK thanks, I will experiment with this in the next couple of weeks. My plan is to give CircuitPython a go on the Swan.
Enjoy your weekend,
Serge