Talking Beacons, IoT, P2P and Couchbase Mobile
Yesterday I went to Fosdem to talk about Couchbase, IoT, beacons, P2P and the cool things you can do along those lines.
A beacon is an object that can emit a signal usually using Bluetooth LE. This object is not very greedy in terms of power. It can last 2 to 3 years depending on the models.
A beacon in itself is pretty much useless. It just broadcast its identity. You obvisouly need an app to read that identity and decide what to do with it. It involves notifying a user that she is near that beacon, and maybe display a message or URL.
Repurpose your Beacon
Let’s take an example. You are walking around in a supermarket. There is a special alley for time limited promotions. As you are getting closer of this alley, the supermarket app wakes up and pickup the beacon signal. It now send you a notification saying ‘Product X is on sales in alley a, limited offer, go get it!’.
It does that because your app picked up the beacon identifier and ask a webservice what it should do with it. If you don’t have an internet connection at that time, it won’t do anything. But the app developers are smart, they used Couchbase Mobile to make sure you had the data available offline. So you do get the appropriate message.
A week after that the product on sale is not the same, so the notification sent while you approach the beacon has to be different. So the supermarket people could swap the beacon with another one. Or they could modify the beacon document stored in Couchbase to reflect the new product on sale. This way you get the updated version in your app.
So Couchbase Mobile is great for repurposing beacons.
Offline Sync and Beacon
Here’s another example. You are organising a big festival, let’s say a music festival. Let’s say a metal music festival because that’s the kind I usually go to. You expect a lot of people to show up. And it’s the first year you do it in this particular place so you don’t really now if you made the right logisitic choices.
Because you are a wise metal head, you decide to install beacon pretty much everywhere to see where people go. You want to know where they wait the longest time. This data will help you fix it and make sure the next edition is even more awesome.
So you encourage the attendees to install your festival app, and hopefuly each time they come near a beacon, you will know because the app will send a request to a server in the cloud.
But what happen if you have no network? This things happen, a lot, especially in festival where everybody wants to tweet the awesomness of being there, and instagram like crazy. So what you need is a solution that works offline. And of course this is where Couchbase Mobile comes in.
Having a local database you can store offline documents representing the user comming across a beacon. And this will be synced back to the server once the user as network.
These were two particular examples of how Couchbase Mobile and Beacons are complimentary. We would love to hear your ideas on the subjects so please don’t be shy and tell us what you think in the comments below.
Automatic P2P Synchronization
Let your devices talk to each others. This is a talk I gave previously, you can checkout a recording on youtube. I also wrote a blog post explaining everything.
It’s all about making sure two Couchbase Lite instances can sync automatically. Without you having to do anything. Which is pretty neat. But for this to work, it requires a router that allows multicast and UDP broadcasting, which unfortunately was not the case so I could not do a demo this time. But if you want to test it, there’s an Android and a Java app sample availeble on Github.
Go to FOSDEM
I am glad I went to FOSDEM, it’s always a great conference to go to. Kudos to their dedicated team of volunteers. They did an amazing job. They have a WIFI network that just works seemlessly. In conferences this size, it’s rare enough to be mentioned.
I would probably have thrown beacons here and there to help me find my way across the venue though :D
My next trip will be to Stockholm for JFokus, join us at our booth if you are around!