Java, AI, Mobile and Cloud


Artificial Intelligence (AI) is getting very important in many cases. In the following post, we explain how Java developers can leverage first class AI tools on client and cloud software.

More and more software projects are using some kind of Artificial Intelligence, and in many cases, the application of AI is not an end-goal, but it has to be integrated in the business flow of existing or new applications. Therefore, an integration between AI tools and enterprise tools is very important. Developers who are using Java in their backend applications can leverage the excellent Deeplearning4j (dl4j) API’s from Skymind to integrate AI using Java API’s only.

In a typical use case, data is somehow obtained, analyzed, and results might be sent back to the original user. The results can also be used to improve the algorithms. Often, the raw data is very specific to a specific user or context, e.g. camera images, speech, words typed by a user. In many cases, this data is obtained via mobile or embedded devices, and is sent to cloud systems running the AI algorithms (e.g. using Skymind’s SKIL server). However, there are serious privacy concerns about this model. End users increasingly worry about their data being sent to servers, but at the same time they want the best analysis.

In this scenario, distributed deep learning using dl4j and Java on mobile can help. Skymind and Gluon have been working together in order to make sure the dl4j Java API’s (and the native implementations) work on mobile Java, and can thus be used for Java apps that run on iOS and Android. By leveraging Gluon Mobile these apps can have a great user experience.
As a consequence, it is possible to do some processing on the mobile device, using a server-maintained model that is distributed to mobile clients. Moreover, when the local copy of the model on the client is improved, data can be sent to the server (or a central entity in the cloud) where the server-maintained model is improved as well. In this case, no raw or privacy-sensitive data is being sent from one system to another. All user specific data stays on the client. In addition, all data communication between client and server can be done using Gluon CloudLink in the middle, which enables end-to-end encryption and flexible configuration. If the raw data is not stored on cloud systems, end users should have less worries about their data being stolen, and developers minimize the impact of potential security breaches, and the penalties due to privacy violations.

Keep in mind that the bulk of the AI workflow and processing is still happening in the cloud. But offloading some privacy-sensitive analysis
to the client has a number of benefits. Not only does this increase privacy, it also leverages the power of today’s GPUs in phones and client devices.

We are working on a series of samples to showcase the potential of this concept. A very first sample, showing how the dl4j API’s and the ND4J
framework can be used on mobile, is available at in our gluon-samples GitHub repo.

In case you have questions, suggestions, or you want to get started using this in your project, feel free to contact us.