Archives

Showing posts with label Mesh. Show all posts
Showing posts with label Mesh. Show all posts

Monday, April 27, 2009

Live Mesh Part 2

In my previous entry about Live Mesh I mentioned that you could use it to transfer data to and from the cloud in addition to straightforward file-sync operations.

To develop Mesh enabled applications you need to sign up to the Mesh developer site, but this is straightforward. You do need to remove the Live Mesh client to install the Live Framework Client and connect to https://developer.mesh-ctp.com rather than http://www.mesh.com, but presumably this will be rectified for final release You can download the SDK from here.

In the Live Framework SDK there are samples to demonstrate Mesh functionality. The Live Folders sample creates, edits and deletes files from the Mesh. These files and folders appear exactly the same as the synchronized folders created with Live Mesh. I would expect that long term you could synchronize with these folders, but at the moment the Live Framework Client is sandboxed and does not support the synchronization or remote control features of Live Mesh.

The following code creates a Live Mesh folder and you can see that the resource type is LIVE_MESH_FOLDER:

public static string CreateRootFolder(Mesh mesh, string title)

{

// Check if a folder with the same name exists.

foreach (MeshObject oneObject in mesh.MeshObjects.Entries)

{

if (oneObject.Resource.Title.Equals(title))

{

return "Folder already Exists!!!";

}

}

// Create folder object

MeshObject meshObject = new MeshObject(title);

// It is a mesh folder

meshObject.Resource.Type = MeshConstants.LIVE_MESH_FOLDER;

// Add folder to collection of mesh objects

mesh.MeshObjects.Add(ref meshObject);

// Create feed for files (required)

DataFeed fileDataFeed = new DataFeed(MeshConstants.LIVE_MESH_FILES);

// Set type and handler type (required)

fileDataFeed.Resource.Type = MeshConstants.LIVE_MESH_FILES;

fileDataFeed.Resource.HandlerType = MeshConstants.FILE_HANDLER_TYPE;

// Add new data feeds to collection

meshObject.DataFeeds.Add(ref fileDataFeed);

//this.LoadMeshObjects();

return "Root folder " + title + " created successfully";

}


There is also a Project Manager sample in the SDK. This is a simple application to create projects and milestones. It creates non-standard objects in Mesh. As you can see in the project code below, you can create your own class of object and are not constrained by standard folders and files:


///
/// UUID of the parent MeshObject
///
[DataMember]
public string MOID { get; set; }
///
/// Title of the milestone (during save/update, this matches MeshObject.Resource.Title,
/// but is stored here when the custom object is databound instead of the resource)
///
[DataMember]
public string Title { get; set; }
///
/// Date when project will be started
///
[DataMember]
public DateTime KickOffDate { get; set; }
///
/// Estimated Date for Completion
///
[DataMember]
public DateTime CompletionDate { get; set; }
///
/// Date when project was shipped
///
[DataMember]
public DateTime ShippedDate { get; set; }
///
/// Description of Project
///
[DataMember]
public string Description { get; set; }


When you deploy a Mesh application it appears both on the users Live Mesh website and also as a shortcut on their desktop. In this way, a user can just run the app without any knowledge of Live Mesh. Furthermore, because the data is synchronized between the local machine and the cloud, they can run the application when they are disconnected and it will automatically synchronize when connected although there is no conflict resolution built in.

This does come with some caveats. This is currently CTP and is not fully functional. As previously mentioned the developer environment does not currently integrate with the Live Mesh client. Also every time I tried to run an application from the desktop it said it was waiting for me to sign in with no opportunity for me to do so and regardless of whether I was signed in or not. There is also a risk that this is a solution waiting for a problem. It looks interesting, it’s quick and straightforward to Mesh enable applications, but there needs to be a compelling requirement for this to go beyond the trying out samples stage and into developing real applications.


In the code samples above, these are just snippets of the complete solution, but you can see that Live Mesh has both straightforward user file and folder synchronization, as well as an API to enable you to create a cloud-based solution.
As a final note, I looked into this as a way to synchronize favorites in IE8. You can now do this by signing up to SkyDrive and reinstalling the Live Toolbar.

Read More >>

Monday, April 6, 2009

Live Mesh

I came across a new Windows Live component the other day called Live Mesh
when searching for a way to synchronize my favorites. In IE7 you could synchronize favorites with Live Favorites. It worked pretty well, although by no means perfectly. This functionality was removed from IE8, which annoyed me somewhat. I work from home most of the time, but occasionally go into the office and take a laptop. Virtually all documents I use are checked into SharePoint, so I don’t lose any data when I switch machines, however there are always useful bits and pieces that I pick up on the Web and I usually just add these to favorites. This is where the upgrade to IE8 is giving me problems. Not insurmountable, obviously, but I want everything to work smoothly. A blogger called Laurent Duveau has used Live Mesh to do just this. Looking further into Live Mesh made me realise its other capabilities. It interested me through a connection with the Azure Services Platform, of which it is a part, and through its data synchronization and remote control functionality.
Live Mesh allows you to synchronize folders with the cloud. You set up a device and then simply right click a folder to begin synchronizing data. This sounds a bit like functionality already provided by Live Sync and SkyDrive, however Live Sync requires both computers to be connected at the same time and SkyDrive is just online storage with no more advanced functionality.


So what more does Live Mesh offer? Well, for a start, the whole process is automatic and painless. You add a folder and the folder is synched. You can add another device and keep the data synched across multiple devices. These devices will include Windows Mobile and Apple Macs in the future. The data is both held locally, so that it can be accessed offline, and in the cloud, so that it can be accessed anywhere. This solved my favorites problem, but also made me curious as to the capabilities of Live Mesh.

Other features include remote desktop. Now not only do I have all my data synchronized, I can also connect to my desktop PC from anywhere. So far, these are all features available with the use of a few tools, but there is another trick up the Live Mesh sleeve. There is a Live Framework with various APIs including .NET, Silverlight and JavaScript to use Live Mesh services. This not only allows you to share folders as you normally would with Live Mesh, but also allows any data to be stored and synchronized between devices. I’ll leave the Live Framework for another day, but it appears to offer interesting possibilities.
Of course, this is a beta, but when the minor errors are ironed out this could be a valuable data synchronization tool.

Read More >>