Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodejs SDK #258

Closed
seeflood opened this issue Oct 16, 2021 · 8 comments
Closed

Add nodejs SDK #258

seeflood opened this issue Oct 16, 2021 · 8 comments
Assignees

Comments

@seeflood
Copy link
Member

What would you like to be added:
Add nodejs SDK for Layotto

Reference:
go-sdk: https://github.com/mosn/layotto/tree/main/sdk/go-sdk
java-sdk: https://github.com/mosn/layotto/tree/main/sdk/java-sdk
(java-sdk in main branch is very simple,there are several PRs waiting for review)
Also,u can take Dapr's nodejs sdk as reference.

Why is this needed:
Help nodejs programmers use Layotto

@seeflood
Copy link
Member Author

This issue will be assigned to @fengmk2

@fengmk2
Copy link
Contributor

fengmk2 commented Oct 16, 2021

This issue will be assigned to @fengmk2

:)

@fengmk2
Copy link
Contributor

fengmk2 commented Oct 16, 2021

use nanoexpress for the http server https://github.com/nanoexpress/nanoexpress

@fengmk2
Copy link
Contributor

fengmk2 commented Oct 16, 2021

use nanoexpress for the http server https://github.com/nanoexpress/nanoexpress

nanoexpress it deps cpp module, not the pure nodejs module. I will use fastily instead https://www.fastify.io/

@seeflood
Copy link
Member Author

seeflood commented Oct 17, 2021

@fengmk2 Wait a minute,which type of server will you use fastily to start? A grpc server?
There may be some misunderstandings. Nodejs sdk should be a library for nodejs applications to import and it uses grpc to communicate with Layotto(sidecar),so it only need to start a grpc server.
image

But I just checked the grpc official document and found that there was an official nodejs lib to start a grpc server. Is that official lib not enough?
Sorry if I misunderstand something,since I'm not a nodejs pro.

@fengmk2
Copy link
Contributor

fengmk2 commented Oct 17, 2021

@seeflood 抱歉。。。先看了 dapr 的文档,今天才看 layotto 的文档,才发现 layotto 完全是 grpc 或者 dubbo 的。忽略我的误解,本以为有 http api 可以先快速实现。我会使用 grpc 来做的,好多代码都不需要写了,自动生成。

@seeflood
Copy link
Member Author

@fengmk2 恩恩大佬客气~
目前Layotto 只对外提供了grpc API,准备支持http api,并没有支持直接通过dubbo rpc调Layotto哈。dubbo那个例子 是通过grpc 调Layotto、Layotto转换成通过dubbo调别的dubbo服务~ 感觉文档讲的不够清楚,我完善下

fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 17, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 17, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 17, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 17, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 23, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 24, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 24, 2021
@wenxuwan
Copy link
Member

image
image

Hi @fengmk2 , i use tcp dump to catch the package between sdk and layotto ,from the picture, we can find sdk receive right package from layotto, but nodejs occur an error with Received RST_STREAM with code 1, may be there have some problem with nodejs grpc. Can u help check it ?

fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 28, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Oct 30, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Nov 3, 2021
fengmk2 added a commit to fengmk2/layotto that referenced this issue Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants