You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protobuf based frameworks like gRPC and Twirp (made by Twitch) are very popular because of the efficiencies gained in front->backend handshake clarity, straightforward for teams of devs to understand and manage, and size of payload over the wire (extra appealing to mobile).
Ultimately the solution I'd like is to send protobuf (binary) from the NS HTTP Framework module and be able to receive a protobuf (binary) response.
My hope is the market trend towards protobuf based technologies will give further motivation to supporting sending and receiving these (small) binary payloads.
Describe alternatives you've considered
Writing protobuf to then filesystem then sending via nativescript-background-http in the background. Not only is this super messy, it is very error prone (and hard to recover from). Not good for the mission critical path of your app interfacing with backend.
Questions for starting discussion
I know there are a few outstanding issues (see below) around supporting binary, my hope is this issue can bring them together with a solid use case (Protobuf).
Support to accept gzip (binary) incoming payloads was added here. Can this methodology be used to accept application/protobuf?
protobuf.js is rock solid and works in node and browser. What are the specific technical road blocks preventing it from being used in NS? In searching and looking at code I can't tell what they are (I'm green to native dev).
Our company is currently about to release a production app that uses a modified version of the Nativescript http library that allows binary upload (we did use it from Angular HttpClient).
From what I can see our modified version should solve all those issues linked. If there is still a high demand on having binary upload support (read: ArrayBuffer support) I'm willing to create a PR.
I'd personally love a PR - and I think it would really help the NS community as a whole. I'm happy to help test and contribute fixes/patches as needed.
I've created the PR #7707 which implements binary upload support.
I also took a quick look at protobuf.js and the PR should support it (I've only taken a quick look at it's HTTP code so I can't comment about any other requirements it might have).
Activity
charsleysa commentedon Aug 15, 2019
Hi @rynop
Our company is currently about to release a production app that uses a modified version of the Nativescript http library that allows binary upload (we did use it from Angular HttpClient).
From what I can see our modified version should solve all those issues linked. If there is still a high demand on having binary upload support (read: ArrayBuffer support) I'm willing to create a PR.
rynop commentedon Aug 15, 2019
Hi @charsleysa
I'd personally love a PR - and I think it would really help the NS community as a whole. I'm happy to help test and contribute fixes/patches as needed.
Thanks for your time in advance!
charsleysa commentedon Aug 21, 2019
Hi @rynop
I've created the PR #7707 which implements binary upload support.
I also took a quick look at protobuf.js and the PR should support it (I've only taken a quick look at it's HTTP code so I can't comment about any other requirements it might have).