I am trying to add grpc health check to my dart backend, but it seems that the grpc implementation in dart does not bring the service for the kubernetes health check, as in other grpc implementations, as is the case of java https://grpc.github.io/grpc-java/javadoc/io/grpc/services/HealthStatusManager.html#getHealthService--.
how can i do this in dart ?
gRPC provides a health.proto, described here.
Some of the language implementations provide implementations for it too. I know Go does grpc_health_v1 and it appears Java does too.
The proto is straightforward and, if the Dart SDK doesn't include an implementation, it should be straightforward for you to create one.
I recommend you retain the proto` package name mapped to Dart's package naming.
Related
I need to connect to different crypto exchanges from java or kotlin, but most of the libraries I have found are for python or other languages, I would like to know how to connect ccxt to java or kotlin, or to know if there is an alternative library for my needs.
I expected to find a guide on how to use ccxt with java or kotlin but I could not find it.
there is actually no active Java project to connect to crypto exchanges. There is https://github.com/knowm/XChange but it's not supported as much as CCXT, which is updated almost on a daily basis with a very responsive community.
The best way is actually to run CCXT in a small application and find a way for your java application to communicate with it (through a middleware). It's a bit overkill but it works.
I am wondering if there is a way to write the docker logging plugin in Java? As per their documentation here https://docs.docker.com/engine/extend/plugins_logging/, we can create custom docker logging plugin. All I can see is that it has to be in language Go.
Wondering if anyone knows that this can be coded in Java or not? If yes, then a little documentation would be helpful
There's a more generic documentation page which clarifies that a plugin is a separate process providing a JSON-over-HTTP server. It looks like the only SDK Docker provides is written in Go, but nothing would stop you from implementing this interface in a different language.
We are in the process of disentangling a classic legacy monolithic EAR-packaged Java EE application. Our (most complex) component wiring pattern is as follows: component A 'requires' interface X, whilst components B and C (... N) each 'provide' interface X. Our requirement is to package and deploy A, B, C and X separately and independently in order to minimize downtime and minimize business impact.
We therefore require the necessary robustness to allow providers (B,C) of interfaces to be removed and added (redeployed), at runtime, without requiring a redeployment of the consumers (A) of the interface, nor a restart of the server. The solution will run on Wildfly 8, but can make use or other technologies as long as they work on Wildfly 8.
We've implemented a POC using JBoss-OSGI and Weld-OSGI which fulfilled all of our requirements, and offered us an excellent migration path as well. However, in Wildfly 8 Alpha 3, JBoss-OSGI was removed from the default distribution. This made us think we should explore alternatives that are more in line with the thinking of the people behind Wildfly.
The question therefore is, on Wildfly 8, what is the alternative to OSGI for inter-module service injection that would meet our requirements?
For the sake of budgets, simplicity, performance overheads and company policies, we've had to eliminate the following:
1. Remote EJB's
2. Web Services
3. JSon/Rest
4. SCA
Please note that this is not a request for a debate on the viability of OSGI nor for an evaluation or comparison of different solutions. I am simply looking for any solution(s) that would meet our criteria and is NOT based on OSGI.
Since you're asking about the thinking of the people behind WildFly, I will refer you to the following mail-list message. It was posted to the Jigsaw development list by David Lloyd, who is (I believe) the designer of JBoss Modules on which WildFly is based. The context was a discussion about the introduction of a service model into Jigsaw: http://mail.openjdk.java.net/pipermail/jigsaw-dev/2012-February/002161.html
What David seems to be saying is either that the idea of services itself flawed – i.e. you don't need them! – or that the requirement is already sufficiently solved by the ServiceLoader API which was introduced in Java 6.
However, ServiceLoader is known not to work on module systems that use classloader isolation, which includes both OSGi and JBoss Modules. This is because ServiceLoader uses classpath scanning, and in a module system there is no "classpath". In OSGi we have specced a way of adapting ServiceLoader (though it's yucky and requires bytecode munging). Perhaps JBoss Modules also has a way of handling this, but I couldn't find anything from a quick scan of their docs.
Anyway as I said in my comment above, I'm puzzled about your motivation. You clearly get benefits from the service model provided by OSGi, and JBoss-OSGi is still available and supported by Red Hat... so why not continue to use it? Especially if there is nothing clearly provided by WildFly out-of-the-box that does what you want.
Apache Felix can be embedded in your application server as 'OSGI host'. Then you can create plugin mechanism for the required system. All of your services can be implemented as 'bundles'. OSGI host in the server can find the bundles in a deployment folder, and installs/starts them. You can then enable your web service,rest and other services without restarting the application server.
Where I work, we had to pick something in order to continue the project when JBoss-OSGi was declared dead. We went with JBoss Modules + EJB approach, since they're actually supported by Red Hat. JBoss Modules is used for static module dependencies, and EJB for runtime injection of services.
We don't use remote EJB but EJB 3.x local EJBs, and that wasn't thrown away in your list, so I guess it's ok to offer this.
I am in trouble finding API for the "local Erlang client" for Riak.
Here is what Riak wiki says:
The local Erlang client is a tightly-integrated part of Riak and the Riak REST interface uses the Erlang client internally. You can find more information about the Erlang-native driver in the edoc API.
The link redirects to the main wiki-page. There is plenty of information on PBC Client though.
How do both clients compare and what are the pros and cons in using one or another?
The API for the native erlang client or edoc is found here
But I would second what Dan says. However, note that the PBC is still very much at the alpha stage of development and as far as I know does not yet have map reduce capabilities.
I would recommend using the PBC client. The performance is comparable to the native erlang client. It is also easier to decouple your application code from Riak. The native erlang client requires the entire Riak code base as a dependency.
From Riak 2.0 and on, it is highly recommended to use PB (Protocol Buffers) APIs over HTTP APIs. They have become a primary APIs, have more functionality and also is faster than HTTP APIs.
Getting Started with Erlang client
GitHub repo for official Riak Erlang client
Is there any possibility to connect webservice using Lua Language in Scite editor? Otherwise Please help me how to connect webservice with Lua Language.
There are Lua modules that support connectivity at various protocol levels. At the lowest level, and probably required by most other solutions, is LuaSocket.
At a much higher level you will find modules like LuaCURL.
Also, the Kepler Project supports the implementation of web applications and services in Lua.
Finally, a lot of general "How do I use Lua to do this" kind of information is available at the Lua User's Wiki.