Comments (6)
that's all I need to know, will give it a shot. Switching on URL is fine as that is what we do atm with the protoc js output.
from ngx-grpc.
Hi @owenhaynes
mostly it should be supported, what's missing is a binding between message and its URL. The primary problem in implementing this in web is the fact that one needs to have all possible messages preloaded, which will hit the performance of the web application. I have some thoughts on that, e.g. having some map with native browser imports (like angular router lazily loads the child route modules), however this also has limitations.
So, what should already be possible: if you know what are the incoming messages then you can have a switch on the URL and
- deserialize the messages from the Uint8Array with
MyMessage.deserializeBinary
- serialize with
msgInstance. serializeBinary()
and pack it back with a proper URL
Mostly, if this functions (I did not try but it should), then one can say any is by 90% supported.
from ngx-grpc.
Super, please let me know if everything works as expected
from ngx-grpc.
Have the Any type compiling still need to test the service we use.
Could be helpful if GrpcMessage had the deserialize method so that could create better templated code around Any.
Would be also useful if the well known types was static within ngrx-grpc so that fake placeholder don't have to be used to generate them e.g StringValue
from ngx-grpc.
Could be helpful if GrpcMessage had the deserialize method so that could create better templated code around Any.
Could you give an example (pseudo-code) what you mean?
Would be also useful if the well known types was static within ngrx-grpc so that fake placeholder don't have to be used to generate them e.g StringValue
This was already proposed, the question is whether you can win something from that. Yes, slightly more files get generated, but nothing would really get changed if they move to a separate library... I mean, regardless of where they would come from, the final application will include the same code
from ngx-grpc.
Ignore the first part, came up with a better solution to my problem.
For the types thing yes I think there is a win
-
you had a library foo it had messages using google.StringValue and then had a package called bar which also used google.StringValue in messages and you had some mapping code these would be different types as they are in different namespaces as you would have if I am correct
foo/google/wrapppers.pb#StringValue
bar/google/wrapppers.pb#StringValue
sure typescript would complain at this. -
To have definitions ready for google.Any support with well known types you would have to some how get them generated. E.g a place holder message or manually generate them.
-
Helpers to work with these types. <-- this one is more a nice to have, but you know better code for google.Timestamp
from ngx-grpc.
Related Issues (20)
- update @improbable-eng/grpc-web dependency HOT 3
- Combine web worker and ImprobableEngGrpcWebClientModule? HOT 2
- How to reduce timeout or deadline? HOT 1
- do I need to handle connection close in server side HOT 4
- No licence specified at npm for @ngx-grpc/grpc-web-client HOT 1
- int64 is a string HOT 8
- Why are all properties generated in interfaces optional? HOT 3
- When I write in the settings file pbconf generate false. HOT 4
- How to decode grpc-web-text HOT 2
- Angular 16 issue HOT 1
- ngx-grpc client service throwing error HOT 1
- Running the plugin as a standalone executable throws Error: Cannot find module 'tslib' HOT 7
- [Question] GrpcHandler undefined HOT 1
- Question regarding google.api.http HOT 1
- Client Side Load Balancing
- Question: How can I use two GRPC service instances? HOT 5
- Any type usage help HOT 2
- Error: InjectionToken GRPC_CLIENT_FACTORY in tests after standalone migration
- Support stripping Enum prefixes
- Improper regex usage in the proto-gen getRelativeTypeName method HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-grpc.