基于Carrier实现去中心化的服务地址映射

一、概述

目前,浏览网站比较通用的方式是通过域名或者ip的形式,而相对于由数字组成的ip地址,不如域名的记忆和使用更为方便。然而网站的域名,需要在域名商那里进行注册和购买,并且每年需要花费使用费。如果频繁更换域名,又会导致老用户找不到网站访问入口,需要不断的提醒用户,对用户来说也是一种困扰。

在传统域名中,由于中心化处理域名转换,很可能被关闭或者被屏蔽掉。而去中心的Hash地址无法被关闭,可以永远被访问,并且免费,完全自我主权控制自己的地址。

为此,本开发团队尝试基于Carrier实现去中心化的服务地址映射,该功能类似于DNS中域名到IP地址的映射,实现Carrier地址到服务器访问入口的映射。DNS是使用中心服务器的方式记录映射表,我们这里使用Carrier广播和响应/应答的方式获取服务入口,安全、方便、且不被屏蔽。

二、项目目标

在服务器端运行一个Carrier实例,通过运行参数或者配置文件设置当前服务的访问入口,可以是IP和Port,也可以是URL,或者是其它形式。

客户端通过服务器公布的Carrier地址,加其为好友,服务器端收到请求以后自动同意,并将当前服务入口以消息的方式推送给客户端。

客户端将服务入口返回给应用,完成Carrier地址到服务入口的转换。

三、实现步骤:

1、先熟悉Elastos 技术接口,设计软件基础架构,需要1周时间

2、Carrier API对接,实现基本功能,完成客户端可添加服务端的好友,并获取服务地址,需要1.5周时间

3、实现UI界面,显示服务端二维码,客户端通过扫秒该二维码进行连接并通信,需要0.5周

4、集成测试,需要0.5周

四、可行性分析

主要从以下三方面考虑:

1、经济可行性

作为一名开发者,当基于某些基础框架构建应用时,首先需要考虑的是开发成本和易用问题,Carrier是去中心化P2P通讯协议,天然具有开发去中心化通讯应用的优势,可以轻松、低成本地使用Carrier进行开发。该应用只需在已有的服务端进行部署,不需要额外租赁其他服务器,节约成本。该功能上线后,服务器端可省略掉域名服务,节约域名使用费用。

2、技术可行性

客户端集成carrier,通过扫描服务端carrier地址生成的二维码,进行连接;连接或服务端通过carrier发送服务端的地址,功能逻辑清晰,易于实现。

3、社会可行性

该功能不触犯任何法律、法规及道德层面的问题,不提供非法的附加功能等。

五、 团队介绍

整个开发团队目前由3人组成, 具有丰富的移动互联网开发经验:

  • 领队 拉酷 高级软件工程师,12年软件开发经验,主要领域:电视相关应用及电视盒子研发
  • Ttppren 资深软件架构师,14年软件开发经验,全栈高级工程师 主要领域:AI 图像识别、音视频解码等
  • Andy 资深软件架构师,15年软件开发经验 ,全栈高级工程师
7 Likes

Decentralized service address mapping based on Carrier.

I. Overview

At present the more common way to browse the website is through the form of domain name or ip, and compared to the number of ip address’s, than the domain name memory and use is more convenient. However, the domain name of the website needs to be registered and purchased by the domain name vendor, and the annual fee is required. If there’s a frequent change of domain name, this will cause the old users to not find the site access portal and will need to constantly remind users, this will also cause the users problems.

In traditional domain names, it is likely to be shut down or blocked due to the centralization of domain name conversion. And to the center of the Hash address can not be closed, can be accessed forever, and free, completely self-sovereign control of their own address.

To do this, the development team will attempt to decentralize service address mapping based on Carrier Carrier, a feature similar to the mapping of domain names to IP addresses in DNS, and to the mapping of addresses to server access portals. DNS is a way to record mapping tables using a central server, and we here use Carrier broadcast and response/answer to obtain service portals that are secure, convenient, and unmasked.

1, First familiarise with the Elastos technology interface, design software infrastructure, it takes 1 week

2, Carrier API docking, to achieve basic functions, complete the client can add friends on the service side, and get the service address, it takes 1.5 weeks

3, The implementation of the UI interface, display the service side two-dimensional code, the client by sweeping the second of the two-dimensional code to connect and communicate, it takes 0.5 weeks

4, integration testing, it takes 0.5 weeks

Feasibility analysis

The following three main considerations:

1, Economic feasibility

As a developer, when building applications based on certain basic frameworks, the first thing to consider is development costs and ease of use, Carrier is a decentralized P2P communication protocol, naturally has the advantage of developing decentralized communication applications, can easily and cost-effectively use Carrier for development. The app only needs to be deployed on the existing service side, eliminating the need to lease additional servers, saving costs. After this feature goes live, the server side can omit the domain name service, saving the cost of domain name use.

2, Technical feasibility

Client integration, by scanning the service-side carrier address generated by the two-dimensional code, connecting, the connection or service side through carrier to send the address on the service side, the functional logic is clear, easy to implement.

3, Social feasibility

This feature does not violate any legal, regulatory, or ethical issues, does not provide illegal additional features, etc.

Five, team introduction

The entire development team is currently composed of 3 people with extensive experience in mobile Internet development:

Leader La cool senior software engineer, 12 years of software development experience, main areas: TV-related applications and TV box research and development

Ttppren Senior Software Architect, 14 years of software development experience, full stack senior engineer main areas: AI image recognition, audio and video decoding, etc.

Andy Senior Software Architect, 15 years of software development experience, full stack senior engineer

7 Likes

thank you for translate!

1 Like

Very well, it’s very useful for the existing internet website. They can use this service to hide themselves. And they don’t need change any code.

1 Like

Very cool. Is this similar to unstoppable domains by Zilliqa? I like that concept, would be great to see such a service here too

1 Like

Hi guys, the 2nd Round of voting has started, please vote your favorite projects.

You will be to able recieve a red packet after you have voted, if you only recieve a very small amount of ELA, please don’t worry.
As the wallet with the smallest amount of ELA in a red packet will receive another bonus red packet, containing10ELA at the end of the voting.

Voting URL:
https://voteforme.elaphant.net/didVoteV2.html?hashStr=0e7e986d4d3d5569214f00139870d04fd79e9c2226b27e8ab02beb83a70d78b0

At the same time, you can add VoteForMe mini program to your elephant wallet via this URL
https://launch.elaphant.app/?appName=AddMiniApp&autoRedirect=True&appTitle=AddMiniApp&redirectURL=https://voteforme.elaphant.net/voteforme.capsule

The 2nd round voting result:

Congratulation you are the winner of the FundmyDapp competition , we will support your project with1500 ELA paid in three installments . But first please give us some information about you and your team.

  1. ELA address, for receiving the ELA.
  2. Your team members, name, Email, Github, role.
  3. The SNS account of your team members all. Includes Telegram, Twitter/Facebook/Wechat or others, if you have, we will only accept existing accounts, not new accounts.

Please supply this infomation as soon as possible.

After done this, please use your ALL SNS accounts to share a news about FundMyDApp for proving it is yours.

Thank you to all who supported this project. Here are the requested information:

1. ELA Address: ERujzA52WNETGtg61iMtnJiJ5bk8xiBUwa

2. Team

Name:Laku

Email: [lcf06@163.com]

GitHub: [https://github.com/luocf ]

Role: Mobile App Developer, Server Side Programmer

3. SNS

WeChat:yuki103022
Twitter:@laku57893158

1 Like

@songsjun
Development plan and technical realization

I found that the group chat microservice architecture developed by Elaphant team is very good, the architecture is clear and easy to understand, and the interface is simple and easy to use. At that time, I will cooperate with Elaphant team to use the microservice architecture to develop decentralized service mapping, and I believe that the development efficiency will be greatly improved.

First of all, get familiar with the group chat microservice architecture. First, let’s talk about the server running. It will take about 1 to 2 weeks.
Then, we use 1 to 2 weeks to develop a simple mobile application for communication with the server. Others can use the communication interface of the microservice architecture skillfully by referring to the application of the mobile terminal.
Finally, use one week to test and adjust, and fix the bug in the last week。

1 Like

Thank you.
Looking forward your works

We have sent the first 500 ELA to you, please update your work weekly.
The next two reward payments will be December 22 on the third weekend and December 29 on the fifth weekend.

https://blockchain.elastos.org/tx/571bc1cd6c35814fa7f46893e2e456682cace893be2cc10f14c68acd2fa82947

My GitHub address is https://github.com/luocf/hashaddressmapping.git

Our team started development last week.

At present, Android client is based on Elastos.SDK.Contact and server is based on PeerNodeSdk. The PeerNodeSdk is easy to use and has a clear interface. Later, the client will change to PeerNodeSdk.

Continue to optimize client and improve server code next week

1 Like


HashAddressMapping
Client functions are shown in the attached picture

Did you mean you already implement to access Baidu.com via a carrier address?

Yes, the function has been completed.

Based on peernodesdk, the development efficiency is very fast.

Later, the optimized code is submitted to GitHub

You should make a video for your works, so everybody will easily understand you.
We have sent the 2nd 500 ELA for you, thanks for your work.
https://blockchain.elastos.org/tx/13bbf29a671d05120ef9a751c77275578860af5ad45683ff8ded96ca3b406c3a

OK, I’ll make a video for everyone as soon as possible

The Hash address mapping based on PeerNodeSDK client-side and server-side program running videos are as follows:

Link: https://pan.baidu.com/s/18pnk5hgz5kjvbydn5gxya
extraction code: qati
and the video on youku link as follows:
https://v.youku.com/v_show/id_XNDQ4NTQwOTY0OA==.html?spm=a2h3j.8428770.3416059.1
https://v.youku.com/v_show/id_XNDQ4NTQwODk2OA==.html?spm=a2h3j.8428770.3416059.1

The main steps are as follows:

  1. git clone https://github.com/elaphantapp/PeerNodeSDK
    2.cd PeerNodeSDK
    3.cd plugins
    4.git clone https://github.com/luocf/hashaddressmapping.git
    5…/script/build.sh
    6.run server,such as ./build/Linux/x86_64/PeerNodeSDK/Launcher/Launcher -name /home/workspace/PeerNodeSDK/build/sysroot/Linux/x86_64/lib/PeerNodePlugins/libHashAddressMappingService.so -path ~/workspace/testData/45/ -key 02bc11aa5c35acda6f6f219b94742dd9a93c1d11c579f98f7e3da05ad910a48306
    7.generate qrcode by carrier address
    8.run client & scan qrcode
    9.input the hash address in server setting, then it will load the target url
1 Like

Perfect man, it’s very great

We have sent the 3rd 500 ELA for you, thanks for your work.
https://blockchain.elastos.org/tx/cfdbf749291e9df5bebd3136f692332e8389fc8d7adf5b9fbf83bd020d58f7db