Nexo

Start Earning Up to 16% Interest Automatically

Learn More

Blockcloud Code Review IoT Protocol

Blockcloud Code Review IoT Protocol by Andre Cronje

Share this article

So in this Blockcloud code review I’ll also give you a quick pointer about the problems the team is looking to solve here, they’re real life problems for the IoT whether you’re an IoT fan or not. Also it makes a nice change from having to discuss sharding, so let’s enjoy the fact that we’re talking about things like low computational unpredictably moving nodes.

There’s a full ICO review for this one too. Jump here.

Start with their buzzwords, this is always a nice lead-in to what they’re up to.

“A blockchain-based advanced TCP/IP architecture connecting every dots of your life”

Not a lot of technical information on the website. Let’s go to the whitepaper.

“Blockcloud: Empowering IoT through a Service-centric Blockchain”

Service-centric Networking (SCN)

Quick primer on connectivity. What happens when you visit www.google.com? Your browser first needs to find out where is www.google.com. For this we have DNS (Domain Name Service), if you ever looked at your connectivity you would see your ip, your gateway, and your DNS server. These are our points of entry where we start.

So we ask the DNS server, do you know www.google.com? It might, or it will say that it doesn’t, but it knows .com, and it gives you the IP of the server(s) managing .com, you then ask .com if it knows www.google.com, and it this case it most likely does, and it gives you an IP. So, now we have an IP. Now we can ask that IP via TCP (Transmission Control Protocol) if it has anything on port 80 (or 443 for HTTPS).

To visualize, think of a business name, you search the business name in Google maps and you get an address. You go to that address and you ask if they are serving lunch (maybe they aren’t) but someone will tell you. This is what we are doing.

Once we have established that we are talking to the right entity and port we can start getting data.

This is Domain-centric Networking

So, first, what kind of problems could this cause? What happens if Google changes their IP but doesn’t inform the DNS server? What if the Google server is mobile and constantly changing between networks? What if the zone Google is being hosted on goes dark?

We have a bunch of networking strategies for the above, they include failover, loadbalancing, reverse proxies and a number of fancy techniques that I don’t even know about.

But what if there was another way to solve this? This way, is what Blockcloud are proposing. Service-centric Networking.

So what’s different, now instead of talking to an DNS server that gives us an IP, we talk to a SNS (I presume) that gives us a realtime location of a service.

Consider you wanted to host something on your mobile device. As your device switches from LTE, 4G, 3G, 2G, and Wifi or moving from cell to cell, you are constantly getting a new IP, you would need to manually update every time your connectivity changed so that the DNS servers can remain informed.

Instead, if you could give that something a service name, then that could abstract away the DNS layer, but this would require that the something is constantly updating the SNS to its current location. This could be easily abused, unless there was something that could allow for transparency, and trust.

And guess what, we have blockchain.

So now, you could have that something on your mobile and it could consistently update as you moved between connectivity. Now instead of your mobile, think about the billions of IoT devices out there, car trackers for example.

Instead of needing to manage a complicated subnet you could expose interaction to each one via a Service Name. (Also allows them to mesh instead of needing centralized servers)

It’s a sexy idea. Let’s see what they have;

4 repos. Cloth we can skip, blockcloud and NamebasedSockets look interesting.

Started recently, 21 commits, 1 branch, 3 contributors. NamebasedSockets in blockcloud match NamebasedSockets repo, so let’s jump into it.

We can skip .o files, let’s start with main

Lot’s of linux kernel imports, makes sense, we are adding a new layer to TCP/IP after-all.

The comments help a lot, I appreciate them.

Main is straight forward enough, can add nodes, can register a namespace, can talk to a namespace. Very low level TCP interaction here.

v4 and v6 address support for registering a service name.

Credit given where it’s due, top shelf.

Great to see this level of detail and commenting with the code. Shows a lot of time has gone into it.

Ok, the C code for the service name registering and communication is great, let’s jump into some of the other bits.

I love that Subject, well done guys, I like a good hack when you are 100% transparent about it, 10/10.

Linux client and server for service names

Straight forward client-server implementation.

Blockcloud Code Review Conclusion:

Service-centric Networking is sexy, I think it has a lot of application and use cases. From a p2p sharing point of view it’s great as well. If I have an article that I would like hosted I could give it a service name, then my article is always accessible via that service name, I don’t even need to host it somewhere specific anymore.

The P2P application for file sharing and streaming is fantastic and this is a step towards a functioning decentralized internet. I’m excited to see where they take it. The code implementation of the Service-centric Networking is solid, so that’s great to see.

Does that translate into good blockchain development? That remains to be seen, these guys definitely know their low level networking, but that doesn’t necessarily translate into good blockchain development.

But even without a blockchain, there is something real here. I’m excited to see what they build.

A full review of the Blockcloud ICO is available here.

Disclaimer: Crypto Briefing code reviews are performed by auditing what is on display in the master branch of the repo’s made available. This was performed as an educational review and any comments in the article are the opinion of the writer. It is normal for code to change rapidly, hence we timestamp our code reviews so that they present a snapshot at a moment in time. Information contained herein should not be used as any comment or advice on the project as a whole.

Blockcloud Code Review Timestamp: June 8th, 2018 at 11:23 GMT

Share this article

Loading...