When protoc generating go file, I get a FullMethod - do you know if it is possible to annotate this on generation time or in proto3?
The protoc Golang file generation support both proto2 and proto3. But currently the Golang plugin of protoc does not support gRPC method annotation.
Related
We have a requirement where we need to send .avro file as an input request to our API's. Really stuck at this point. If any detail example provided would be more appreciated.
Just use Java interop: https://github.com/intuit/karate#calling-java
You need to write a helper (start with a static method) to convert JSON to Avro and vice versa. I know teams using this for gRPC. Read this thread for tips: https://github.com/intuit/karate/issues/412
Also there is even a "karate-grpc" project: https://github.com/pecker-io/karate-grpc
Also see:
https://twitter.com/KarateDSL/status/1128170638223364097
https://twitter.com/KarateDSL/status/1417023536082812935
Using Openssl 1.0.1t using C, I see in the tls1.h file there are definitions for a signature algorithm extension (TLSEXXT_TYPE_signature_algorithm) and for specifying signatures/hashes to be supported (TLSEXT_signature_rsa TLSEXT_hash_sha256).
My question is what call do I need to make in order to implement these things and force a signature algorithm extension showing I support rsa/sha256 in the client hello message?
Tinkerpop 2 used to support user-defined step through Gremlin.defineStep(..)
How can I achieve the same using Tinkerpop 3 ?
Is there any Gremlin API to create a custom step and combine a set of traversal steps ?
Any suggestion will be highly appreciated.
Thanks
Kaniska
Patterns for DSL development are not completely established for TinkerPop 3.x, so expect some changes in advice as time progresses. There is surrounding information on this on the gremlin-users mailing list.
If you are using Gremlin Server (or can incorporate Groovy into your project) I don't see a reason to not just do some groovy metaprogramming to get this to work. Using the standard Gremlin Server zip distribution edit the generate-modern.groovy file to include this line at the start:
GraphTraversal.metaClass.knows = { delegate.out('knows') }
then start the server with:
bin/gremlin-server.sh conf/gremlin-server-rest-modern.yaml
Then a simple curl:
$ curl "http://localhost:8182?gremlin=g.V(1).knows().values('name')"
{"requestId":"66c2c929-9cc2-491d-acb0-ae4d7eef6b00","status":{"message":"","code":200,"attributes":{}},"result":{"data":["vadas","josh"],"meta":{}}}
If you have a complex DSL you might not want all that logic trapped in a groovy script. Easy enough - just build a standard groovy project, construct a jar, include some form of static initializer to call your metaprogramming code and place it on Gremlin Server's path. then your init script just needs to call that static initializer and your DSL is loaded.
I have an R package that I would like to host through Amazon Web Services that will be accessible via an API. The script should take a couple of input values and return the R output in json format. Also, the API should be able to handle multiple requests simultaneously.
So for example, call http://sampleapi.com/?location=USA?state=Florida. That would then run the R package and return the output data to the calling application.
Has anyone done this before or know of resources you can point me to that would explain how to do so? Thanks!
Thanks for all the suggestions. I decided to use Ruby for the API with the rinruby and rails-api gems and will host that through AWS Elastic Beanstalk. See this question for how I am setting it up - Ruby API - Accept parameters and execute script
I am new to esb WSO2 and I need to call a .jar with WSO2 parameters. I think I need to create a endpoint and call the jar file. Is it right?
Thanks for all.
I have done this using the Script Mediator (Groovy language). So from within the Groovy script I called my custom method by passing it the payload as JSON and saved the return value of that method as the payload. I used JSON for the payload, but feel free to leave it to default XML. You can also pass parameters, not just the payload, to your custom method.
<script language="groovy">
println "---------- start java call -----------"
mc.setPayloadJSON(new my.own.package.MyClass().myMethod(mc.getPayloadJSON()))
println "----------- end java call ----------"
</script>
Added my custom jar, JSON and Groovy jars under {ESB_ROOT}/repository/components/lib and bounced the WSO2 ESB.
There are probably other ways to achieve what you need.