Data packet size limitation?
aelhadee opened this issue ยท 4 comments
Hello Justin,
I tried to use the chat app for webcam video transfer by sending images in sequence and noticed that when the image size changes, it throws an error since it's above 8KB.
On the sender side (printing number of bytes transferred):
7737
7656
7981
7732
7674
9197 - NOK
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
Documents/ndnsvs/ndn-python-svs/./src/ndn/svs/svs_base_thread.py", line 58, in run
self.loop.create_task(loop_task())
File "/usr/lib/python3.8/asyncio/base_events.py", line 431, in create_task
task = tasks.Task(coro, loop=self, name=name)
TypeError: a coroutine was expected, got None
and on the receiver side:
SVSync: timeout
I also tried to change the MTU in the state table but didn't fix it, so I am assuming automatic data segmentation is not supported or enabled in this app?
Thanks,
AE
Hi AE,
Yes, automatic data segmentation is not a feature, but will be in type Uncapped. Therefore to be safe, published bytes need to be ~7500 bytes or lower. Signatures, Names, and other things can take some bytes out of the 8800 packet size.
If data segmentation is needed in your case, I can move this feature up in my backlog and have it implemented soon.
Also, it would be helpful to have a clean error telling you that this is the case. I will fix that.
Kind regards,
Justin
Thanks Justin for the clarification. I would definitely suggest implementing the data segmentation in this app as it could evolve to accommodate file sharing, video streaming, etc. and the app itself could be leveraged for more than chatting.
Your welcome, AE. I do agree it would help, and I will move "Uncapped" up on the list of tasks. I also have provided a clear error in the latest release, so hopefully that helps.
In the meantime, you can implement the webcam video transfer still by developing a message format protocol on top of SVS. We are actually doing this for ndn-hydra. Essentially, a node publishes a message stating file info (relatively small) instead of the actual file (relatively large).
The data segmentation in ndn-hydra seems to do the trick. Thanks for the tip.