1 / 38

Developing Java Applications with Windows Azure

Developing Java Applications with Windows Azure. Steve Marx Technical Strategist Microsoft Corporation. Are you fluent in Java?. Are you fluent in Windows Azure?. Instant Poll Results. Instant Poll Results. Instant Poll Results. Instant Poll Results. Windows Azure Refresher.

dore
Download Presentation

Developing Java Applications with Windows Azure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Developing Java Applications with Windows Azure Steve Marx Technical Strategist Microsoft Corporation

  2. Are you fluent in Java?

  3. Are you fluent in Windows Azure?

  4. Instant Poll Results

  5. Instant Poll Results

  6. Instant Poll Results

  7. Instant Poll Results

  8. Windows Azure Refresher • Scalable computation in the cloud • Durable cloud storage • Write code, test, debug locally • Automated management in the cloud • Utility business model

  9. What We’ll Build Worker Role Worker Role JRE Web Role Web Role Tomcat LB Storage http://hellojava.cloudapp.net

  10. How It Works • Platform features: • Native code execution (run the JVM) • Local storage (Tomcat logs, etc.) • Worker roles with endpoints (listen on port 80) • Initialization (copy and launch Tomcat) • Java-specific artifacts: • Java storage client library • Apache Tomcat solution accelerator • (Eclipse tooling)

  11. Mental Model • Windows • Non-admin user • USB drive with “runme.bat” • Can your app run that way?

  12. Windows Azure Storage • Windows Azure Storage • Blobs, tables, queues, drives • Highly scalable • REST interface • Java storage library (windowsazure4j.org) • Built by Soyatec

  13. Using the Windows Azure SDK for Java • Download library and dependencies • Create a storage account • Read and write blob “count.txt”

  14. Java Storage Client Library demo

  15. Running Tomcat in Windows Azure • Use the solution accelerator; it’s easier • Built by our partner Infosys • To do it yourself: • Copy Tomcat to local storage • Configure correct listening port • Start Tomcat service • Monitor and report health

  16. Using the Tomcat Solution Accelerator • Download accelerator, Tomcat, and JRE • buildme.cmd – copy bits and build • runme.cmd – run locally • packme.cmd – package for the cloud

  17. Tomcat Solution Accelerator demo

  18. What Happens When Everyone Clicks? • Multiple instances accessing blob • Problem: • Solution: • Optimistic concurrency • Asynchronous so you can “catch up”

  19. Asynchronous Web/Worker Architecture • Loosely-coupled system with queues • Benefits: • Scalability • Availability • Fault tolerance • Best practice design JRE Web Role Web Role Tomcat LB Storage

  20. Worker Role Programming Model • Basically DLL with main() • In .NET • OnStart() – initialization • Run() – main • OnStop() – graceful shutdown • Expected to run forever

  21. Java Worker demo

  22. Anatomy of a Java Worker Role Worker Role Process.Start() Worker .class Run() Worker .dll JRE .NET

  23. Creating a Java Worker Role • Include JRE in worker role • Launch java.exe with our class

  24. Java Worker Role demo

  25. A Better Java Worker • Reading configuration settings • Discovering endpoints • Handling changes • Monitoring • Diagnostics

  26. Monitoring and LoggingFrom Java demo

  27. That’s a Big Package • Our package now contains: • Tomcat • Two copies of the JRE • Our application • Deploy the package from blob storage • Consider moving things out • Deploy only application bits • Copy dependencies (Tomcat, JRE) from blobs

  28. What We Built Worker Role Worker Role JRE Web Role Web Role Tomcat LB Storage http://hellojava.cloudapp.net

  29. Windows Azure Platform AppFabric • HTTP Client Support (RESTful API) • Access Control Service • Token requests and token validate • Management API (scope and rule management) • Protocol and token interoperability • OAuth Web Resource Authorization Protocol (WRAP) • Simple Web Token (SWT) definition • Service Bus Message Buffers • Message consumers can use HTTP polling • Enables mobile, web and non-.NET platforms • Secure with WRAP/SWT using Access Control • Java SDK - http://www.jdotnetservices.com

  30. SQL Azure Database • SQL Azure Database • Full relational Database as a Service • Direct connectivity to SQL Azure • Connect with JDBC/ODBC using the latest driver • Eclipse tooling support • Interoperability using REST • Easily wrap SQL Azure with ADO.NET Data Services • Java Client Toolkit for ADO.NET Data Services • Committed to OSS support and app compatibility

  31. Key Takeaways • Powerful platform primitives • You don’t need us • Worker role with endpoint is a flexible model • Partners to make life easier • Soyatec – Eclipse tools and Java storage library • Infosys – Tomcat solution accelerator

  32. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  33. Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….

  34. Resources • Downloads:http://windowsazure.com/interoperability • Me:http://blog.smarx.com (get the source!)http://twitter.com/smarx • PHP, MySQL, and memcached talk:Right here, next (4:30)

More Related