When I did the last blog post about building a cloud backup app in Java with Azure, I kept it very high level, to just introduce the project and get a discussion rolling. Then an interesting thing happened that I’ve never, ever seen before – people on the internet had opinions that were wrong.
Just in the last few weeks I’ve recently opened two GitHub repos. The first one was a short-code URL generator using the Azure Functions service for serverless programming, and the second was a cloud sync backup app using Azure Storage. The key point is that in writing this code in Java I never dropped down to writing HTTP code to connect to the REST endpoint. From my opinion, if that is ever the solution to a web service problem, then the job isn’t yet complete!
If you are building a Java application that needs any kind of cloud functionality – storage, compute, serverless, you should consider Microsoft Azure. If you are doing cool stuff with IoT, artificial intelligence, or machine learning, you should consider Microsoft Azure. At Microsoft we now have huge number of people who are working solely on ensuring that the Java developer experience is first class – through APIs, through services, through documentation, and through developer advocacy. On a daily basis we are discussing how to fill gaps, improve experiences, and make what Java developers see and consume is the best it can be. If you want to play with Azure, there are even free offerings with substantial amounts of credit and free resources available (my personal favourite is the free 1,000,000 Azure Function calls a month – forever!).
So, I’ve been link heavy, but to wrap up, here are some important links to become familiar with as you dive into Java on Azure:
Microsoft really loves Java. I’m amazed by how many teams are putting out Java SDKs, and I am fortunate enough to work with all of them! Today two Java SDKs were released by Microsoft for the Microsoft Graph SDK, and for Application Insights. Here is a quick summary of each of them:
Microsoft Graph SDK for Java Preview
The Microsoft Graph SDK is what developers use to build smart productivity apps, but connecting to mail, calendar, contacts, documents, directory, devices, and more. The Java SDK for the Microsoft Graph now makes it easier than ever to access these services and to write Java-based applications.
I’ve been a long-time paying customer of CrashPlan. I use it to back up my most important files from my home networked-attached storage (NAS) device, such as photos, important documents, etc. That means I have these files duplicated, both on my NAS (two hard drives in mirroring mode), but also up in the cloud, and this gives me great comfort that my important files will never get lost to a ‘digital blackhole’.
I would run CrashPlan on my home server (a Mac Mini I have sitting in a closet), and it would monitor specified directories. Whenever these directories change (files added, modified, or deleted), CrashPlan would make sure that the changes were mirrored up into its cloud. So all I had to do was configure my backup sets (one for photos, one for important docs, etc), and then forget about it. This worked remarkably well for the most part, and I was more than happy paying the ~$100 a year it cost me.
Unfortunately, CrashPlan announced that this service was going away, and they were only focusing on the enterprise market. There are alternative options, but I have been too busy to investigate and pick one. In the mean time, my job has changed and I now work at Microsoft – so I thought perhaps I could spend a few hours exploring the Azure Storage Java SDK to build my own backup client that works in a similar fashion to CrashPlan.
As with all projects, the devil is in the detail, and in fact, the actual code to connect to and use the Azure Storage service is really quite minimal. The bulk of the work I have needed to do is embed a database to record the state of the storage, so that on application shutdown / restart the state is able to be known and we don’t need to either query remotely or (stupidly) re-upload all files again!
Also, as alluded to in the headline, this is a ‘part one’ post – I plan to write more as the app evolves. The source code is available online, and I would love to see others commit to it. At present, the only code that is written is the backup engine. That means there is currently no user interface, or even ability to download partial or full backups. So, here’s a small list of tasks remaining to be done:
There needs to be some mechanism to communicate with the backup engine. I’m wondering if we embed a web server to expose the actions as a REST API, or if we simply have a socket server. Anyway, the backup engine needs some way to be communicated with. There is a bunch of API to still be developed:
Adding / removing / configuring backup sets
Full or partial restoring of a backup set from the cloud to the local file system
The backup engine should run in a background service, so that it is able to always sync updates to the cloud.
There needs to be a client-side user interface built for calling the API provided by the backup engine. This might be JavaFX, or a web frontend.
Lots of hacking still to do! 🙂 I’ll do some posts in the coming days about various aspects of the implementation, but for now, if anyone is interested in helping to build out any of these features, please let me know!
Today I am kicking off an interview series with people who are using or developing Java solutions on Azure. I have a number of people already in the pipeline, so this should be a regular series. If you want to be interviewed, please get in touch with me!
My first interview is with Yoshio Terada, a Java Champion, JUG leader, and Java evangelist working at Microsoft Japan. I’ve known Yoshio for a long time, as we overlapped our careers at Sun Microsystems and Oracle. Yoshio has had a very long affiliation with Java, so it is my pleasure to interview him below, and I hope you enjoy!
Hi Yoshio – can you please introduce yourself to everyone?
Thank you so much for providing me this great opportunity. I have been working as a Java Evangelist at Microsoft Japan since July 2015. I am also one of the board members of the Japanese Java Users Group.
Before I joined Microsoft, I worked as a GlassFish evangelist at Sun Microsystems Japan. After acquisition of Sun by Oracle, I worked as a Java/Java EE evangelist at Oracle Japan for five years. My work at Oracle Japan involved planning, managing, and speaking at many Java related technical conferences and events in Japan, such as JavaOne Tokyo, Java Day Tokyo, and Japanese Java Users Group events. In July 2016, I became a Java Champion.
So you’ve been at Microsoft for a while now – much longer than me as I just joined in December, but we both have a relatively similar career background – I also was at Sun Microsystems and then Oracle, but I was over in the engineering organisation. I’d be interested in hearing your impressions of Java at Microsoft, and perhaps if you have any sense of how Microsoft has changed over time with regard to Java?
In the past, I never thought that I would work at Microsoft, because my background was focused on Unix and Java. However now Microsoft is a cloud platform company, there is a focus not only on .NET, Windows, and Office, but also we are strongly promoting Unix and other programming languages. Already over 30% of the systems on Azure are running Linux, and on these systems many customers are using Java on Azure. For example, Pivotal Cloud Foundry on Azure, Service Fabric on Azure, OpenShift on Azure, and Kubernetes on Azure. There is a lot of selection for Java developers to run their services on Azure now.
What does a normal day look like for you as a Java evangelist at Microsoft based in Japan?
Recently as a Java evangelist, I have joined many HackFests for customers. A HackFest is working on actual business improvements for customers. It means that after the customer has me sign a NDA, I am given access to the customers source code, and I will give advice or modify the source code for the customer to make improvements. Using my experience with Azure, I will advise the customer on architectural options for running their systems on Azure.
For example, one recent customer wanted to migrate their existing on-premises Java web application to containers on Azure, but at that time they didn’t know Kubernetes well. During the hack fest with the customer, I worked closely with them to teach them about how to operate and create the Azure Container Service on Azure. As a result, they could migrate (‘Lift & Shift’) the existing system in only five days. I could help from both a development point of view as well as an architectural point of view. As a result, the customer was very satisfied with the outcome of this HackFest.
This is something that Java customers all over the world can take advantage of. For readers of this interview – if you are using Java and want to work closely with a Java evangelist such as myself to better use Azure, please contact me or ask for your local area’s evangelist to discuss a HackFest. Also, now that I’m joining the global organization inside Microsoft, if a customer requests for me to join their HackFest, I may be able to join regardless of location, throughout North America, Europe, Brazil, and many other locations world wide.
Is Microsoft and Azure relevant to a Java engineer or an organization that is based around Java (or languages on the JVM like Kotlin, Scala, etc)?
Yes, Microsoft is really relevant to Java developers today. There is a lot of focus going into Java SDKs. Also, even though there is no SDK for some services, many services provide RESTful interfaces, enabling any programming language to access these services. For example, If you are using Office 365, then you can control Office 365 by using REST calls.
You’ve probably built some cool demos and tutorials over your time at Microsoft. Do you want to talk about any projects or github repos that readers might want to explore? Not all of my work is online, but I’ve uploaded many demos and samples to my GitHub repository.
One of the most recent demos included many interesting technologies (I published a set of slides, in Japanese, here). At that time, I showed only one demonstration, which used the following technologies.
In a Slack group I could then ask the Bot Framework (which is running in Azure Functions for Java) questions like the following: “Please increase the number of pod for account service”. From here, the Azure function would invoke LUIS and analyse the sentence and determine which intent is most appropriate. As a result, the account service will increase the number of pods on Kubernetes for Azure.
If I say “please decrease the number of pod for customer service”, then the “customer-service” in kubernetes would be decreased. In this way, I am operating Kubernetes on Azure from a chat bot.
On top of this, I showed a Microsoft Translator demo. As opposed to the above, where I typed text, this demo allowed for voice input. For example, if I spoke to Microsoft Translator and said “Please increase the number of pod for account service” or “please decrease the number of pod for customer service”, the software would handle increasing or decreasing the number of pods on Azure Container Services.
All of the above was created using Java, and makes use of a number of Azure services available to Java developers.
Being an evangelist (or cloud developer advocate like I am) is a balancing act between outward interactions with users of the product and inward interactions with teams inside Microsoft. I think all developer advocates have different preferences along this spectrum – I find myself a lot more inward facing, focused on improving developer experience through docs, improved APIs, etc. Where do you find yourself along this spectrum, and how do you prioritize your day to day work?
For me, I like to interact with developers and customers directly. Of course, I often find places where we need to modify the API or improve documentation, so when necessary I am also busy doing that.
Azure has so many services these days, and many of them are really amazing. Are there any in particular that you’re exploring in more detail at the moment, and what is your favourite service overall?
This is a very difficult question, because Microsoft technology and the global technology trend is changing extremely fast, compared with the past. Just now the demonstration I discussed above consists of a number of my favorite and recommended technologies. However not only Kubernetes, but also Pivotal Cloud Foundry and Openshift are both very interesting.
Especially, if the customer owns a huge data center in their company, I recommend them to use Azure Stack. Pivotal Cloud Foundry also runs on Azure Stack. So if they would like to reduce the cost of management, Azure Stack become one of the solutions for them.
Microsoft isn’t historically known for its support of Java – but I think more recently Microsoft has made huge strides in truly believing in open source. When you talk to Java engineers and introduce them to Azure, what are their impressions?
About two and half years ago, I joined Microsoft Japan. At that time already some developers and engineers felt that there had been a change inside Microsoft. However in the last two years, I felt that the impression of Microsoft is changing even more. When I communicate with customers and community members, I get positive feedback from almost of them.
In particular, I get a lot of positive feedback about Microsoft from an AI technology point of view. When I saw Satya Nadella presenting the AI prototype at the Build 2016 conference, I was really impressed, and I shared the video to all of the Java developers around me. This video showed how we engineers can change the world when we imagine the possibility. It was great! It’s also really impressive how all of the Microsoft Cognitive services can also be used from Java applications.
When I give the demonstration of cognitive services to other engineers for the first time, many said to me that they would like to try this.
I thought that this technology can change the world, and also I thought that this kind of technology can change the future of the company.
Thanks so much for your time Yoshio! Do you have any other final words that you want to share with the community?
For the last two and half years I’ve been working at Microsoft, many tools, technologies, and services have become available for Java developers. For developers, Visual Studio Team Services (VSTS) is the entry point to manage and control source code. Depending on the team, you can use the build and deploy pipeline on it. Of course, if you are familiar with other CI/CD tool like Jenkins, you can access to it from VSTS.