Git Product home page Git Product logo

cloud_resource_manager's People

Contributors

raymondtay avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cloud_resource_manager's Issues

Premature end of file exception when parsing XML in concurrent tasks

The current implementation works like this:

The incoming provisioning request could range from provisioning the smallest of servers i.e. 1 web, 1 app, 1 db to hundreds of machines in each "tier". The current implementation attempts to conduct the provisioning concurrently by having the Restlet offload to a potentially large thread pool within the Restlet and have it fire literally hundreds to thousands of requests to the MOAB and each request results in a returned XML which has to be parsed.

The current observation is that whenever that happens, the Restlet gets the Premature end of file exception and results in partial provisioning. Since the current mechanism doesn't cater the "Retry" mechanism, we can only for now do it in a sequential fashion.

Provide RESTful interfaces to store/query/provision a VPC design

The front-end has a virtual private cloud designer i.e. vpc that allows the users to design a vpc, store / update and eventually provision it. The backend engine needs to provide the following interfaces

  • HTTP PUT to store the design
  • HTTP GET to return the design in XML
  • HTTP POST to provision the design
  • HTTP GET to return the status of the running design (this is currently provided)

Storing a XML w/o conversion to java.lang.String invites an Serialization error

When the attempt is made to update the design configuration, the application wrongfully attempted to store the document as a Java XML object and that'll be fine if there was some sort of serialization but unfortunately there wasn't.

The stack trace

WARNING: Exception or error caught in resource
java.lang.IllegalArgumentException: can't serialize class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
at org.bson.BSONEncoder._putObjectField(BSONEncoder.java:234)
at org.bson.BSONEncoder.putObject(BSONEncoder.java:140)
at org.bson.BSONEncoder.putObject(BSONEncoder.java:86)
at com.mongodb.OutMessage.putObject(OutMessage.java:190)
at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:341)
at com.mongodb.DBCollection.update(DBCollection.java:150)
at com.mongodb.DBCollection.update(DBCollection.java:162)
at DesignServerResource.storeDesign(DesignServerResource.java:67)

Callable<V> results in truncated output

Background

The Diagnostic.java is a Restlet that's designed to handle HTTP GET RESTful queries. The idea is to provide a client RESTful where the user can submit a query request to check the status of the virtual private cloud. The design is to take the request and mine the configuration data off the local database (MongoDB) and fire asynchronous commands to the MOAB server. As the VPC can be rather large, the current design is to send off 3 groups of asynchronous requests marked by their tier (e.g. web, app, db). Next, the Restlet will gather all these async requests and finally return the XML document.

What it should be

The implementation defines a thread-local buffer to store the result of each async MOAB request/response operation. As long as the buffer's size is good, you should see at least a well-formed XML document. e.g.
<xml>
<request>
<status>ok</status>
...
</request>
</xml>

What is observed

The buffer's size is good e.g. 2048-bytes but when a dozen threads are in operation, the output is truncated in a rather unpredictable fashion.

Workaround

The buffer has been resized to 256-bytes instead. However, it needs to be investigated as to why its occurring.

Feature: Allow user to destroy VM/PM

Provide a API that allows the user to submit a destroy request. Expected parameters including tenant's id & VM/PM's id. Also, need to take this VM/PM out from the database.

Add attributes to facilitate the VMware remote console to a single ESX host

The front end of the GCloud needs to be able to allow the user to activate the remote console whence he/she can control the startup/shutdown of the virtual machine. It has been determined to use VMWare's remote console feature and currently we have only one ESX host (afaik) so its the job of the backend engine to augment the virtual private cloud's configuration file to include 2 additional tags
i.e.
<vncport>
<vncpassword>

Automated installation for MongoDB

As the resource manager needs a local database to maintain its state, its obviously useful to have an automated procedure to install its dependencies i.e. MongoDB.

Augment the VPC configuration file with a <status> tag

The request came from Rully.

Turns out that he would like the VPC configuration file be augmented with a new tag <status> in each <machine> so that his front-end (wicket code) doesn't have to write a new parser to parse the returned XML and augment it himself.

The approach would be to implant the new statuses into the original VPC configuration file and pass it back

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.