We have an embedded Linux system, around 1,6 GByte RAM, much more flash.
We want to transfer a BLOB, with a size of around 600 MBytes (or even more) to the device.
Second use case would be the reverse direction away from device.
We want to control it via NETCONF, best via an "action".
Now we are thinking about at least 3 variants:
V1) It looks like it is in general possible to send the big BLOB in one NETCONF request.
I tried it (till now only) with a string field. At around 10 MBytes I get this error message:
"Resource limit exceeded: Text node too long, try XML_PARSE_HUGE, line 11, column 10003776 (, line 11)"
Even with that I am not sure if this is the right way, because when the app receives the request,
I assume I get it in one big chunk, which is then multiple 100 Mbytes in size.
And furthermore, before the conversion, libxml and conversion from base64 back to binary takes places,
which takes even more memory (and time to convert).
Is there some way to get smaller chunk e.g. the 600 MBytes BLOB split into smaller parts?
Problem is RAM usage. When it is finally in file system in flash, handling is no problem.
V2) Transferring the 600 MBytes in smaller chunks, each with its own and separate NETCONF action request.
But this is then of course a proprietary way...?
V3) Transfer just a URL (and "action") and use e.g. https (with something like curl/libcurl) to transfer BLOB from external device to embedded device.
But this needs a webserver on the other side and of course security handling must be done, which makes things more difficult,
than using the existing netopeer2-server.
I assume V1 is not the way to go, beside such splitting is supported.
What is the common way to do such a thing?
Or is there a different variant we shall consider?
We have an embedded Linux system, around 1,6 GByte RAM, much more flash.
We want to transfer a BLOB, with a size of around 600 MBytes (or even more) to the device.
Second use case would be the reverse direction away from device.
We want to control it via NETCONF, best via an "action".
Now we are thinking about at least 3 variants:
V1) It looks like it is in general possible to send the big BLOB in one NETCONF request.
I tried it (till now only) with a string field. At around 10 MBytes I get this error message:
"Resource limit exceeded: Text node too long, try XML_PARSE_HUGE, line 11, column 10003776 (, line 11)"
Even with that I am not sure if this is the right way, because when the app receives the request,
I assume I get it in one big chunk, which is then multiple 100 Mbytes in size.
And furthermore, before the conversion, libxml and conversion from base64 back to binary takes places,
which takes even more memory (and time to convert).
Is there some way to get smaller chunk e.g. the 600 MBytes BLOB split into smaller parts?
Problem is RAM usage. When it is finally in file system in flash, handling is no problem.
V2) Transferring the 600 MBytes in smaller chunks, each with its own and separate NETCONF action request.
But this is then of course a proprietary way...?
V3) Transfer just a URL (and "action") and use e.g. https (with something like curl/libcurl) to transfer BLOB from external device to embedded device.
But this needs a webserver on the other side and of course security handling must be done, which makes things more difficult,
than using the existing netopeer2-server.
I assume V1 is not the way to go, beside such splitting is supported.
What is the common way to do such a thing?
Or is there a different variant we shall consider?