You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create Virtual Machines Async Tracking Related Resources (Java)
12
+
# Getting Started with Compute - Create Virtual Machines Async Tracking Related Resources - in Java #
13
13
14
-
Making use of the reactive pattern in a complex virtual machine creation scenario
15
14
16
-
This sample shows how the reactive pattern (RXJava's Observables) supported by the Azure Libraries for Java in their asynchronous API
17
-
can be used for handling some more complex real world scenarios involving distributed computation in the cloud with relative ease.
18
-
The specific example here shows how Observables enable real time tracking of the creation of many virtual machines in parallel and
19
-
all their related resources. Since Azure does not support transactional creation of virtual machines (no automatic rollback in case
20
-
of failure), this could be useful for example for the purposes of deleting "orphaned" resources, whenever the creation of some other
21
-
resources fails. Or simply showing real-time progress in some UI to the end user.
22
-
23
-
The sample goes through the following steps:
24
-
25
-
1. Define a number of virtual machines and their related required resources (such as virtual networks, etc)
26
-
2. Start the parallel creation of those virtual machines with observer logic keeping track of the created resources and reporting
27
-
them on the console in real time
28
-
3. Clean up the "orphaned" resources, i.e. those that were created successfully but whose associated virtual machine
29
-
failed to be created for some reason.
15
+
Making use of the reactive pattern in a complex virtual machine creation scenario
16
+
17
+
This sample shows how the reactive pattern (RXJava's Observables) supported by the Azure Libraries for Java in their asynchronous API
18
+
can be used for handling some more complex real world scenarios involving distributed computation in the cloud with relative ease.
19
+
The specific example here shows how Observables enable real time tracking of the creation of many virtual machines in parallel and
20
+
all their related resources. Since Azure does not support transactional creation of virtual machines (no automatic rollback in case
21
+
of failure), this could be useful for example for the purposes of deleting "orphaned" resources, whenever the creation of some other
22
+
resources fails. Or simply showing real-time progress in some UI to the end user.
23
+
24
+
The sample goes through the following steps:
25
+
26
+
1. Define a number of virtual machines and their related required resources (such as virtual networks, etc)
27
+
2. Start the parallel creation of those virtual machines with observer logic keeping track of the created resources and reporting
28
+
them on the console in real time
29
+
3. Clean up the "orphaned" resources, i.e. those that were created successfully but whose associated virtual machine
30
+
failed to be created for some reason.
30
31
31
32
32
-
## Running this sample
33
+
## Running this Sample ##
33
34
34
35
To run this sample:
35
36
36
37
Set the environment variable `AZURE_AUTH_LOCATION` with the full path for an auth file. See [how to create an auth file](https://github.com/Azure/azure-libraries-for-java/blob/master/AUTH.md).
cd compute-java-create-vms-async-tracking-related-resources
42
+
43
+
mvn clean compile exec:java
44
+
45
+
## More information ##
45
46
46
47
[http://azure.com/java](http://azure.com/java)
47
48
48
-
If you don't have a Microsoft Azure subscription you can get a FREE trial account [here](http://go.microsoft.com/fwlink/?LinkId=330212).
49
+
If you don't have a Microsoft Azure subscription you can get a FREE trial account [here](http://go.microsoft.com/fwlink/?LinkId=330212)
50
+
51
+
---
49
52
50
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
53
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
0 commit comments