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

提个简单的建议 #6

Open
singgel opened this issue Nov 13, 2020 · 2 comments
Open

提个简单的建议 #6

singgel opened this issue Nov 13, 2020 · 2 comments

Comments

@singgel
Copy link

singgel commented Nov 13, 2020

Description
SDK的封装可以参考小米的push-SDK

Expected behavior
1.希望SDK提供异步操作的方法
2.希望对消息的返回体封装丰富一些,后面会提供demo(毕竟这个实际影响业务编写)
3.希望增加metric接口方便线上监控

Current behavior
1.目前SDK里面集成fastjson这种有安全漏洞的序列化依赖
2.目前SDK对消息的返回体真是处理的太粗糙了

Screenshots
定义了一个SendResponse返回体,只有80000000才会封装
1.对于非80000000的返回code和message没有封装(特别是message竟然没有了,影响实际业务编写)
2.对于http的exception,直接把状态码给。。。。(这个503频控让业务咋搞,实在不行咱学苹果不限速了)
image

Environment
all Environment

Other
一步步来,看好你

@singgel
Copy link
Author

singgel commented Nov 13, 2020

demo response:
从小米的SDK粘贴过来的

    private static final long serialVersionUID = 8030699726843716781L;
    private final String messageId;
    private final String traceId;
    private final ErrorCode errorCode;
    private final JSONObject data;
    private final String reason;

    private Result(Result.Builder builder) {
        this.messageId = builder.messageId;
        this.data = builder.data;
        this.errorCode = builder.errorCode;
        this.reason = builder.reason;
        this.traceId = builder.traceId;
    }

使用体验上:
可以看下小米的push文档:https://dev.mi.com/console/doc/detail?pId=230

华为从2.0到这个版本进步很多了,加油华为人

@qurenneng
Copy link

这就是遥遥领先吗,还是根本就不在乎。。。。

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

No branches or pull requests

2 participants