1. Nikita started GridGain Pearls list last week and I think it's a great idea. Here are some more GridGain pearls to add to the list. Once we have a full list, we will post it on the Wiki. Feel free to comment with your own.



    How to inject user resources into your grid tasks or jobs?
    public class MyTask extends GridTaskAdapter {
    ...
    @GridUserResouce
    MyResourceClass resource;
    ...
    }

    How to inject Spring beans into yoru tasks or jobs?
    public class MyJob extends GridJobAdapter {
    ...
    @GridSpringResource(resourceName="myBean")
    MyBeanClass myBean;
    ...
    }

    How to get grid node topology version?
    long ver = GridFactory.getGrid().getTopologyHash();

    How to listen to node topology changes?
    GridFactory.getGrid().addDiscoveryListener(new GridDiscoveryListener() {
    public void onDiscovery(GridDiscoveryEventType evt, GridNode node) {
    ...
    }
    });

    How to execute grid task asynchronouosly?
    GridFactory.getGrid().execute(MyTask.class, someArg, new GridTaskListener() {
    public void onFinished(GridTaskFuture future) {
    ...
    }
    }

    How to query grid events from all grid nodes?
    Grid grid = GridFactory.getGrid();
    grid.query(new MyGridEventFilter(), grid.getAllNodes(), 2000 /*timeout*/);

    How to print CPU utilization (or any other metric) for all nodes?
    for (GridNode node : GridFactory.getGrid().getAllNodes()) {
    System.out.println("Node-ID=" + node.getId() +
    ", Cpu-Utilization=" + node.getMetrics().getCurrentCpuLoad());
    }
    0

    Add a comment

  2. Nikita will be speaking at Triangle JUG (Raleigh, NC) on May 18th and Charlotte JUG on May 19th. As always, this is going to be a fun presentation with plenty of live coding and exchange of ideas.

    If you are nearby - please come see your fellow Java, grid and cloud developers and learn about GridGain.

    May 18th - Triangle JUG: http://trijug.org/
    May 19th - Charlotte JUG: http://www.charlottejug.org/
    0

    Add a comment

  3. I constantly run into conversations where people use the word Grid and Cloud interchangeably without actually understanding what each one really means. When I actually ask what do they mean by Grid or Cloud - the usual answer is that they are the same. Well, they are not.

    Cloud Computing is on-demand provisioning of virtual resources and services around those resources. For example, if a cloud provider wants to provide a data storage (like S3), then the same provider also needs to provide APIs to access and manipulate this data storage. If a cloud provider allows for allocation of virtual instances, then the same provider must provide APIs to create images and deploy them on those instances.

    Grid Computing, on the other hand, has to do with providing ability to join multiple computers together for the purpose of solving computational problems. It deals with such issues as auto-node discovery, dynamic deployment and redeployment of a problem, topology and collision resolutions, load balancing and monitoring, etc... A grid should allow you to take a problem, determine the optimal node topology for it, dynamically deploy the problem onto the chosen topology, provide means to divide the problem into multiple parts for parallel execution, distribute the problem within topology, gather results, and return them to user. In the middle of all that, a grid should automatically scale computations as load changes by transparently utilizing additional nodes while remaining fault tolerant.

    There is an obvious connection between grids and clouds. If clouds let you easily deploy your application on 20 nodes, then grids should easily connect those applications into a cluster. This makes it absolutely vital to allow users seamlessly grid-enable their applications on the clouds. At GridGain we are working on making the process of gridifying cloud applications as transparent as possible. For example, with GridGain 3.0, user applications will transparently auto-discover each other on a cloud, without any additional effort or configuration. On top of that GridGian will allow combining different clouds into one joined topology - this way you can have a few computers from your local datacenter work together with virtual instances started on a cloud.

    So, to summarise, in majority of the cases (with some exceptions) cloud computing has to do with providing virtual hardware resources together with APIs that allow access to those resources. Grid computing is at a higher level - it is the middleware that allows you to join multiple physical or virtual resources together to solve computational problems in parallel fashion.
    0

    Add a comment

About me
About me
- Antoine de Saint-Exupery -
- Antoine de Saint-Exupery -
"A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away."
Blog Archive
Blogs I frequent
Loading
Dynamic Views theme. Powered by Blogger.