最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

關(guān)于C#版Nebula客戶(hù)端編譯的問(wèn)題

 更新時(shí)間:2021年07月21日 09:56:40   作者:靜若清池  
這篇文章主要介紹了C#版Nebula客戶(hù)端編譯的問(wèn)題,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

一、需求背景

從Nebula的Github上可以發(fā)現(xiàn),Nebula為以下語(yǔ)言提供了客戶(hù)端SDK:

nebula-cpp
nebula-java
nebula-go
nebula-python
nebula-node
nebula-rust

我們公司的業(yè)務(wù)開(kāi)發(fā)語(yǔ)言是C#,但Nebula卻沒(méi)有提供C#版的客戶(hù)端。

由于Nebula支持源碼編譯,索性只好嘗試動(dòng)手編譯一個(gè)。

二、Thrift簡(jiǎn)介

1.Thrift是Facebook在2007年貢獻(xiàn)給Apache基金會(huì)的一個(gè)開(kāi)源項(xiàng)目:https://thrift.apache.org/

Thrift可以支持多種程序語(yǔ)言,例如:C++,C#,Cocoa,Erlang,Haskell,Java,Ocami,Perl,PHP,Python,Ruby,Smalltalk。

Thrift可以作為二進(jìn)制的高性能的通訊中間件,支持?jǐn)?shù)據(jù)(對(duì)象)序列化和多種類(lèi)型的RPC服務(wù)

2.Facebook自己也維護(hù)了一個(gè)Thrift,目前已經(jīng)和Apache的Thrift差別較大,重寫(xiě)了編譯器,重新實(shí)現(xiàn)了一個(gè)全異步的Thrift Server:https://github.com/facebook/fbthrift

Facebook Thrift is not a distribution of Apache Thrift.
This is an evolved internal branch of Thrift that Facebook re-released to open source community in February 2014.
Facebook Thrift was originally released closely tracking Apache Thrift but is now evolving in new directions.
In particular, the compiler was rewritten from scratch and the new implementation features a fully asynchronous Thrift server.

3.Nebula的客戶(hù)端基于Thrift文件進(jìn)行編譯的,但是使用的Thrift編譯器,不是Facebook貢獻(xiàn)給Apache的那個(gè)Thrift,而是Facebook自己維護(hù)的那個(gè)Thrift,有點(diǎn)繞。

4.Nebula提供的Thrift模板為:https://github.com/vesoft-inc/nebula-common/tree/master/src/common/interface

三、編譯前準(zhǔn)備工作

1.操作系統(tǒng)

通過(guò)VMware搭建的本地CenOS 7,虛擬機(jī)與主機(jī)健通過(guò)NAT網(wǎng)絡(luò)連接,內(nèi)存8G,宿主機(jī)有梯子可以FQ

2.安裝依賴(lài)

root# yum update
root# yum install -y make \
                 m4 \
                 git \
                 wget \
                 unzip \
                 xz \
                 readline-devel \
                 ncurses-devel \
                 zlib-devel \
                 gcc \
                 gcc-c++ \
                 cmake \
                 gettext \
                 curl \
                 redhat-lsb-core \
                 bzip2

3.檢查主機(jī)上的GCC和CMake版本是否正確

root# g++ --version
root# cmake --version

發(fā)現(xiàn)版本不正確,并且git clone也不好使,只好手動(dòng)下載2.0.1版本的nebula-common:https://github.com/vesoft-inc/nebula-common/tree/v2.0.1

4.解壓上述的nebula-common-2.0.1.zip解壓,進(jìn)入nebula-common-2.0.1根目錄

5.依次執(zhí)行如下命令

// 安裝CMake。
root# ./third-party/install-cmake.sh cmake-install

// 啟用CMake。
root# source cmake-install/bin/enable-cmake.sh

//opt目錄添加寫(xiě)權(quán)限。
root# sudo mkdir /opt/vesoft && sudo chmod -R a+w /opt/vesoft

// 安裝GCC。安裝到opt目錄需要寫(xiě)權(quán)限,用戶(hù)也可以修改為其他目錄。
root# ./third-party/install-gcc.sh --prefix=/opt

// 啟用GCC。
root# source /opt/vesoft/toolset/gcc/7.5.0/enable

// 安裝第三方依賴(lài)
root# ./third-party/install-third-party.sh

四、編譯

1.進(jìn)入上述的nebula-common-2.0.1根目錄

2.依次執(zhí)行命令

root#cmake
root#make

3.查看基于Thrift模板生成的C#代碼

nebula-common-2.0.1/src/common/interface/gen-csharp/nebula

五、后續(xù)工作

目前只是根據(jù)Thrift模板生成了對(duì)應(yīng)C#接口的定義和解析,還需要參考Nebula提供的Java的客戶(hù)端代碼,翻譯成對(duì)應(yīng)的C#代碼

六、參考文檔

https://docs.nebula-graph.com.cn/2.0.1/4.deployment-and-installation/1.resource-preparations/

到此這篇關(guān)于C#版Nebula客戶(hù)端編譯的文章就介紹到這了,更多相關(guān)C#版Nebula客戶(hù)端編譯內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論

克东县| 特克斯县| 泰宁县| 泾源县| 景东| 凤山市| 宁夏| 乐清市| 凭祥市| 滦平县| 元谋县| 永川市| 海安县| 印江| 富顺县| 宁德市| 博客| 石泉县| 孝感市| 静乐县| 名山县| 泰来县| 宾川县| 泰宁县| 陇南市| 会东县| 同江市| 大新县| 新源县| 东乡县| 威信县| 涞源县| 宝丰县| 营山县| 阜平县| 霍山县| 双牌县| 建德市| 寻乌县| 桃源县| 弥渡县|