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

Change the demo of each API to one #455

Closed
wenxuwan opened this issue Apr 7, 2022 · 10 comments
Closed

Change the demo of each API to one #455

wenxuwan opened this issue Apr 7, 2022 · 10 comments

Comments

@wenxuwan
Copy link
Member

wenxuwan commented Apr 7, 2022

Now there are multiple demos of each API. For example, there are 5 implementations under the demo of sequencer. This does not prove that layotto is portable. It will be better if a demo can invoke multiple components.

image

@seeflood
Copy link
Member

seeflood commented Apr 7, 2022

Good point! We should do some refactor.

We can split this issue into different tasks:

  • Delete redundant demos and keep only one demo,which can be used for all Sequencer API components
  • Delete redundant demos and keep only one demo,which can be used for all Configuration API components
  • Delete redundant demos and keep only one demo,which can be used for all File API components
  • Delete redundant demos and keep only one demo,which can be used for all lock API components
  • Delete redundant demos and keep only one demo,which can be used for all pubsub API components
  • Delete redundant demos and keep only one demo,which can be used for all State API components

chinese:

  • 优化 lock api demo,让所有 lock 组件公用一个 demo
  • 优化 sequencer api demo,让所有 sequencer 组件公用一个 demo
  • 优化 pubsub api demo,让所有 pubsub 组件公用一个 demo

@seeflood seeflood changed the title Change the demo of each interface to one Change the demo of each API to one Apr 7, 2022
@seeflood seeflood added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 7, 2022
@wenxuwan
Copy link
Member Author

I will take Delete redundant demos and keep only one demo,which can be used for all File API components

@seeflood
Copy link
Member

seeflood commented May 19, 2022

Here is more detailed explanation:

For example, there should be only one demo for state API, and this single demo can be used with different kinds of components,such as redis and mysql components.
Before refactor, we have two demo clients for state API:
image
After refactor, there is only one demo client and a readme doc:
image

And you can run this demo with different component names:

go build -o client
./client -s "state_demo"
./client -s "state_demo2"
./client -s "state_demo3"

@GimmeCyy
Copy link
Contributor

Is this command only available on mac? I run it on windows and it generates a file that is all messed up

@seeflood
Copy link
Member

@GimmeCyy which command are you talking about? Do you me go build -o client ?

@GimmeCyy
Copy link
Contributor

./client -s "state_demo"
image

@seeflood
Copy link
Member

@GimmeCyy It's a demo client of Layotto,and to run it successfully, you should start layotto first.
You can follow the guide in https://mosn.io/layotto/#/zh/start/state/start to run it

@Xunzhuo
Copy link
Member

Xunzhuo commented Mar 6, 2023

/good-first-issue cancel
/help-wanted cancel

@github-actions github-actions bot removed the help wanted Extra attention is needed label Mar 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 7, 2023
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants