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

the relationship between hostie, grpc and puppet. #1947

Closed
wj-Mcat opened this issue Apr 20, 2020 · 3 comments
Closed

the relationship between hostie, grpc and puppet. #1947

wj-Mcat opened this issue Apr 20, 2020 · 3 comments
Labels

Comments

@wj-Mcat
Copy link
Contributor

wj-Mcat commented Apr 20, 2020

There are many concepts that confuses me when we get deep into wechaty . I will explain my understanding, which I can't sure.

  • First, there are many puppet protocols under chatie server. But python-wechaty/go-wechaty don't need to care about the detail.
  • Second, grpc is used in python-wechaty-puppet module, which handle the connection between the wechaty client and chatie-host server.
  • Third, wechaty-puppet and wechaty-puppet-padplus is different, this is where I get most confused. For example, wechaty-puppet is used in python-wechaty, which use grpc to connect chatie-grpc. wechaty-puppet-padplus implement padplus protocol to handle wechat information operation. wechaty-puppet and wechaty-puppet-padplus are isolated with chatie-grpc.
@dingdayu
Copy link
Member

I have a picture, I wonder if I can help you.

未命名文件

Please @huan verify.

@huan
Copy link
Member

huan commented Apr 20, 2020

@dingdayu Only part of your picture is right. Please see my diagram at wechaty/go-wechaty#22 (comment) to see the right structure.

To answer questions from @wj-Mcat :

  • First, there are many puppet protocols under the chatie server. But python-wechaty/go-wechaty don't need to care about the detail.

Yes, you are absolutely right.

We will never need to care about the puppet protocols in python-wechaty or go-wechaty anymore.

What we need to do is to implement the wechaty-puppet interface and connect all the API to the GRPC service. (chatie-grpc in python, and github.com/wechaty/go-grpc in Go)

  • Second, grpc is used in python-wechaty-puppet module, which handle the connection between the wechaty client and chatie-host server.

Yes, you are right.

And as I mentioned in the previous answer, the grpc module for Python we have already published at chatie-grpc

  • Third, wechaty-puppet and wechaty-puppet-padplus is different, this is where I get most confused. For example, wechaty-puppet is used in python-wechaty, which use grpc to connect chatie-grpc. wechaty-puppet-padplus implement padplus protocol to handle wechat information operation. wechaty-puppet and wechaty-puppet-padplus are isolated with chatie-grpc.

What you have described in your question are mostly not wrong.

wechaty-puppet and wechaty-puppet-padplus is different

You should never care about the wechaty-puppet-padplus in our Python Wechaty.

What you need to design is the wechaty-puppet and the wechaty-puppet-hostie, and we will mostly only deal with those two puppet modules in the future.

wechaty-puppet is used in python-wechaty, which use grpc to connect chatie-grpc.

Not wrong. If we describe it more precisely: the wechaty-puppet-hostie implements the abstraction of wechaty-puppet, and the wechaty-puppet-hostie will use chatie-grpc PyPI module to connect with our GRPC service.

wechaty-puppet-padplus implement padplus protocol to handle wechat information operation.

This is also right.

However, we do not need to care about them because they are unrelated to our Python Wechaty.

Python Wechaty will use wechaty-puppet-hostie, and it will connect to the GRPC service.

Both the wechaty-puppet-padplus and the padplus protocol are behind the GRPC service, which means we can ignore them safely for now.

wechaty-puppet and wechaty-puppet-padplus are isolated with chatie-grpc.

The above sentence is the only wrong one in all your questions.

In TypeScript: wechaty-puppet-padplus is a child class (PuppetPadplus) that inherit the wechaty-puppet abstraction class (Puppet), and it implemented all the requirements from the parent class Puppet in order to satisfied Wechaty.

In Python: wechaty-puppet-hostie(in Python) and wechaty-puppet-padplus(in TypeScript) are isolated with chatie-grpc.


At last, please see my diagram at wechaty/go-wechaty#22 (comment) to see the big picture of the relationship between wechaty-puppet, wechaty-puppet-hostie, and wechaty-puppet-XXX.

Thank you for asking the above questions, I hope my answer can help you to make it clear about the Wechaty Architecture Design.

Please feel free to let me know if you have more questions, Cheers!

Copy link

dosubot bot commented Nov 15, 2023

Hi, @wj-Mcat! I'm Dosu, and I'm helping the wechaty team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you were confused about the relationship between hostie, gRPC, and Puppet in Wechaty. You mentioned that there are multiple puppet protocols under the Chatie server, but the Python and Go versions of Wechaty don't need to worry about the details. You also expressed confusion about the difference between Wechaty Puppet and Wechaty Puppet Padplus, and how they are isolated from Chatie gRPC.

In the comments, dingdayu shared a picture and huan clarified the structure and relationships between the different components. They provided a diagram and detailed explanations, which resolved the issue.

Before we close this issue, could you please confirm if it is still relevant to the latest version of the wechaty repository? If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and contribution to the Wechaty community!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 15, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants