Hyperledger Fabric v1.0 provides basic API using Protocol Buffers over gRPC for applications to interact with the blockchain network.
I have seen many examples using CLI commands, but hard to find any GO/JAVA client who are communicating with Blockchain using gRPC. Earlier it was supporting REST APIs but seem like they stopped support for it in newly released V1.0 versionDocumention.
If anyone has any idea about how to write gRPC client for fabric client in GO/Java language, please help.
I just run the example in v1.0 doc OK.
curl -L https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sfhackfest/sfhackfest.tar.gz -o sfhackfest.tar.gz 2> /dev/null; tar -xvf sfhackfest.tar.gz
curl -OOOOOO https://raw.githubusercontent.com/hyperledger/fabric-sdk-node/v1.0-alpha/examples/balance-transfer/{config.json,deploy.js,helper.js,invoke.js,query.js,package.json}
This example using node.js interact with peers.
Thus, I will read these javascripts. Maybe I can find some track of HTTP GET/POST rest API.
Related
We are using Jfrog artifactory selfhosted instance with license for our project and many customers are using for thir package and binary management.
Since this is hosted i our private selfhosted environments over linux platform, regularly we may need to have a maintenance window atleast 2 times in a month to apply patches to our servers and all. So we are considering for high availability for our currently running Jfrog instance which should resolve this downtime during the maintenance. Also we are looking for some better managemental scenarios as below and couldnt find any helpful guidance from the docs.
How the Jfrog server insance service status can be monitored along with auto restart if the service is in failed state after the server reboot.
Is there any way to set and populate a notification messsage to the sustomers regarding the sceduled maintenance.
How can we enable the high availability for JFrog Artifactory and Xray. ?
Here are some of the workaround you can follow to mitigate the situation
To monitor the health of the JFrog services you can use the below rest API
curl -u : -XGET
http://<Art_IP>:8046/router/api/v1/topology/health -H 'Content-Type:
application/json'
If you are looking for a more lightweight check you can use
curl -u: -XGET
http://<Art_IP>:8081/artifactory/api/system/ping
By default, the systemctl scripts check for the availability of the services and restart them when they see a failure. The same applies to the system restart as well.
There is no option for a pop-up message however, you can set a custom message as a banner in the Artifactory. Navigate to Administration -> General settings -> Customer message. Here is the wiki link
When you add another node to the mix, Artifactory/Xray becomes a cluster to balance the load (or as a failover) however it is the responsibility of the load balancer/Reverse proxy to manage the traffic between the cluster nodes according to the availability of the backend node.
I want to write a simple LSP server to provide autocomplete that will work with any number of IDEs and Editors that are LSP tools.
On the topic of startup, the LSP specification does say the following:
The current protocol specification defines that the lifecycle of a
server is managed by the client (e.g. a tool like VS Code or Emacs).
It is up to the client to decide when to start (process-wise) and when
to shutdown a server.
source emphasis my own
However nowhere in the specification can I find how the development tool (client) actually launches the server.
The spec just continues straight into the Initialize Request which requires the client and tool already to be connected.
So 2 questions:
If I develop a languageServer.exe that uses a RESTful API over HTTP to communicate with the LSP tool, is there some standard entrypoint where my server and client can agree on what port to use.
If I develop a new LSP tool how can I get some LSP Server from a VSCode extension and launch and connect to it. Is this standard?
I have completed an automated ansible install and have most of the wrinkles worked out.
All of my services except Nodes are running on a single box on non-secure HTTP though I specified 443 in my inventory I see now that does not imply an HTTPS configuration. So I have non-secure API endpoints listening on 443.
Is there any way around the requirements of operating CLC and Cluster Controller on different hardware as described in the SSL howto: https://docs.eucalyptus.cloud/eucalyptus/5/admin_guide/managing_system/bps/configuring_ssl/
I've read that how-to and can only guess that installing certs on the CLC messes up the Cluster Controller keys but I don't fully grasp it. Am I wasting my time trying to find a workaround or can I keep these services on the same box and still achieve SSL?
When you deploy eucalyptus using the ansible playbook a script will be available:
# /usr/local/bin/eucalyptus-cloud-https-import --help
Usage:
eucalyptus-cloud-https-import [--alias ALIAS] [--key FILE] [--certs FILE]
which can be used to import a key and certificate chain from PEM files.
Alternatively you can follow the manual steps from the documentation that you referenced.
It is fine to use HTTPS with all components on a single host, the documentation is out of date.
Eucalyptus will detect if an HTTP(S) connection is using TLS (SSL) and use the configured certificate when appropriate.
It is recommended to use the ansible playbook certbot / Let's Encrypt integration for the HTTPS certificate when possible.
When manually provisioning certificates, wildcards can be used (*.DOMAIN *.s3.DOMAIN) so that all services and S3 buckets are included. If a wildcard certificate is not possible then the certificate should include the service endpoint names if possible (autoscaling, bootstrap, cloudformation, ec2, elasticloadbalancing, iam, monitoring, properties, route53, s3, sqs, sts, swf)
How can I get VMs from a deployed VNF using tacker API with HTTP req?(not from cmd with tacker vnf-resource-list). i.e: curl?
Tacker had provided a restful API for that purpose:
For your case, you may want to use:
GET /v1.0/vnfs
Use curl to init a GET request, e.g.:
curl -k https://openstack ip/v1.0/vnfs
I haven't actually used it this way in production environment, but it shall clarify the basic idea.
I want to
write my backend code with Java,
use HTTP/2 (NGINX 1.9.5 has been supported HTTP/2),
write a bidirectional stream to send data between client and server at any time.
gRPC seems to be the best choice and I want use NGINX as my reverse proxy and loading balancing, I could not find any documentation to figure out how to use NGINX with gRPC Java, does anyone know?
I saw the gRPC PHP has already supported NGINX: https://github.com/grpc/grpc/tree/master/src/php#use-the-grpc-php-extension-with-nginxphp-fpm
But I also saw there is an issue said it is in the process of submitting a 3rd party module in NGINX for gRPC support, and there is a ticket on NGINX means we can't write HTTP/2 NGINX proxy module for gRPC, and I also saw nginx does not support the full HTTP/2 specs, gRPC does not work through it
I'm confused about that, why do some posts say gRPC PHP works but in other posts it says it can't.
Not on nginx, but I just published a grpc-proxy written in Go. It's lightweight and configurable, and there is a docker image available.
Yeah, nowdays, gRPC/HTTP2 with or without TLS are indeed fully supported on NGINX, as long as you have version 1.13.9 (if you just install the docker image with either alpine or latest tags then it'll be the right version).
As of (at least) late 2020 there is full support for it. Here's a link to their official Documentation:
https://www.nginx.com/blog/nginx-1-13-10-grpc/