Blogs

Gary's Blog

XPO and Distributed Databases

     

In this sneak peak post we’ll take a look at a new feature for XPO, direct from the “Devexpress Labs”. For sometime now the guys in the lab have been trying to solve the problem of how to make distributed databases more ubiquitous, and it looks like they’ve finally cracked it!

As you know the advantage of the distributed database model is that the data is distributed, the clue’s in the name really. This means that each node of the distribution graph has less work to do and it also means that it is more secure and more likely to be “always available” – if one node fails then you can simply get the required data from another node. Of course this advantage also forms the basis for the disadvantage of this system, and that is how to guarantee access to all the data in a “sometimes connected” distributed database system?

Well to solve this problem, the guys in the lab have taken advantage of Stanley Milgram’s work on the Six Degrees of Separation phenomenon. As you know, this work shows that there are only 6 degrees of separation between any two people on the planet. They coupled that with the fact that, in most developed countries in the world, most people have mobile phones. You’ll be aware of the fact that most mobile phones have bluetooth capabilities too.

So how does it work? Well, quite simply, when you send CommitChanges() to a UnitOfWork instance – and you have distributed database support turned on – then the UnitOfWork collects all the objects that require to be persisted and iterates over them, first taking a hash of the object, so that it can be found later on. It then looks around for a mobile bluetooth device. Having found one, it simply sends the object, as a message, to that device. The UnitOfWork ensures that each object is persisted to a different mobile bluetooth device to ensure the maximum distribution in the system.

That is the simple part. Reading information from this distributed database is the clever part. When you wish to read the data back, the UnitOfWork simply finds the first available bluetooth enabled mobile device and issues a request for the object with the given hash. If that device has the object then it is returned, if not then the device issues a request for the object to everyone in the address book. If one of them has it then they return the object, if not then each of them issues a request to everyone in their address book and so on and so forth, in a cascade effect. Milgram’s work guarantees that the maximum number of hops, between devices, is six and when found, the object is returned back along the chain of devices to the UnitOfWork.

I think this is a great use of ubiquitous computing from the guys in the lab, if you want to try it out for yourself then download the update for XPO and have fun.

Until next time, happy XPOing!

Published Apr 01 2010, 11:39 AM by Gary Short (DevExpress)
Filed under:
Technorati tags: XPO
Bookmark and Share

Comments

 

Martin Praxmarer [DX-Squad] said:

Have a nice 1. April Gary ;)

April 1, 2010 7:03 AM
 

Twitter Trackbacks for Sneak Peak - XPO and Distributed Databases - Gary's Blog [devexpress.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Sneak Peak - XPO and Distributed Databases - Gary's Blog         [devexpress.com]        on Topsy.com

April 1, 2010 7:03 AM
 

Boris Bosnjak said:

Brilliantly set up!  You had me until you said "send to mobile phone" :-)

April 1, 2010 9:25 AM
 

Brendon Muck [DX Squad] said:

Will this work on my Palm Pilot?

April 1, 2010 10:13 AM
 

Andre said:

Excellent!

Will XPO use the new SMS OLEDB Provider?

April 1, 2010 10:27 AM
 

Gary Short (DevExpress) said:

@Brendon, why of course!

@Boris, :-)

April 1, 2010 10:32 AM
 

Gary Short (DevExpress) said:

@Andre yes, but only with the April 1 code drop

April 1, 2010 12:08 PM
 

Dennis Webb said:

A new XPO feature, Definitely April Fools Day.

April 1, 2010 6:50 PM
 

Marcello said:

Whow! This is a great feature!

Marcello

April 2, 2010 1:37 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.