Atitit.web Push Implementation Solution set (2)---Baidu Cloud, Jpush Aurora Push, a push selection comparison. o99

Source: Internet
Author: User

Atitit.web Push Implementation solution set (2)--- Baidu Cloud , Jpush Aurora Push, a push selection comparison . o99

1.1. Is there a limit on the number of pushes or frequency of cloud push? 1

1.2. Push message length 1

1.3. Support for offline messages 2

1.4. Whether the escape character is supported 2

2. Client Identification Mechanism 2

3. Binding client Differentiation Process :: Jpush wins 2

4. Document Style comparison :: Baidu , Jpush win 3

5. Programming SDK Framework comparison : a push , Baidu wins 3

6. Comparison of programming styles 3

6.1. A push 3

6.2. Baidu 4

6.3. Jpush 4

6.4. Summary :: Jpush wins . 5

1.1. Is there a limit on the number of pushes or frequency of cloud push?

There is no limit to the number and frequency of unicast pushes sent by cloud push. Broadcast (excluding multicast) push frequency is limited: up to one push in 1 minutes. For concepts and usage scenarios related to unicast, multicast, and broadcast, refer to the scenario documentation:Http://developer.baidu.com/wiki/index.php?title=docs/cplat/push/scene

Jpush 600/min

A push seems trot on the limit.

1.2. The message length of the push

· Currently, a single message supports a maximum of 4K message Push, compatible text and binary message formats.

If the application has more than 4K Data push demand, then the app can carry the URL Address of the resource in the push message , the client after receiving the message, actively to this more than 4K Data to initiate another request .

Jpush 1k, a push 2k

Author :: old Wow's paw attilax Ayron, email:[email protected]

Reprint please indicate source: Http://blog.csdn.net/attilax

1.3. Support for offline messages

Cloud Push service provides message staging, forwarding, and push, without the need for clients to stay online and repeatedly poll for messages that are not lost

Jpush only 5 offline messages???

A push-trot on.

1.4. Whether to support escape characters

A push does not support escape characters

Jpush, Baidu support

2. Client identification mechanism

· Channel ID: A push channel ID, usually referred to as a terminal, such as a mobile phone on an Android device . The client binding call returns a value that can be obtained in the

Take the alias of ten Jpush blackheads

ClientID the external user identity in the push business layer, which is used to identify the client identity, which is obtained by a third party client and saved to the third party server, is a unique identification number of the push SDK , or CID .

Summary : : ordinary or ClientID better , meaning clear ... But if the client multi-channel ,channelid the more correct

3. Binding client Differentiation process:: Jpush wins

Bdc

A channel ID specifies a terminal, so in this case the developer needs to push the message to a specific channel ID through the server API. Before push, the client application obtains the channel ID through the binding interface's return value, and sends it to the developer through the network, etc., the developer should maintain the channel ID by itself.

Jpush, the client can obtain an EQ ID from the server,,,, client can bind a custom alias (eq ID)

A push

The ID can be obtained through the Broadcastreceiver subclass bundle.getstring ("ClientID")

, the generated ClientID (CID) establishes a mapping binding relationship to a server that is uploaded to a third-party application. A push is similar to a Baidu.

Summary:: Jpush mode is good, flexible, other cannot customize Cid ..... First, the customer generates the CID, and the notice server establishes the channel OK at the beginning of the push. In the middle can avoid the CID push that does not take effect. Easy to Debug.

4. Document style comparison:: Baidu, Jpush wins

Baidu, Jpush better ,,, a little less push .

5. SDK Framework Comparison: A push, Baidu wins

Example code use : :: A better push , a ha walk on the LAN ... jpush half-man days and days of the new don't . Baidu's General ..

Example code direct usage rate :: A push , Baidu's can . Jpush can not be used , to GA self-defined write .

6. Comparison of programming styles

6.1. A push

public static void Main (string[] args) throws Exception {

Igtpush push = new Igtpush (host, Appkey, master);

Push.connect ();

Linktemplate template = Linktemplatedemo ();

Singlemessage message = new Singlemessage ();

Message.setoffline (TRUE);

Offline active time, in milliseconds, optional

Message.setofflineexpiretime (24 * 3600 * 1000);

Message.setdata (template);

List targets = new ArrayList ();

Target Target1 = new Target ();

Target Target2 = new Target ();

Target1.setappid (APPID);

Target1.setclientid (CID);

Ipushresult ret = push.pushmessagetosingle (message, TARGET1);

System.out.println (Ret.getresponse (). toString ());

}

6.2. Baidu

2. Create baiduchannelclient Object Instance

Baiduchannelclient channelclient = new baiduchannelclient (pair);

4. Create a Request class object

mobile phone side of the channelid, the cell phone UserId, first replaced with 1111111111111 , Users need to replace them with their own

Pushunicastmessagerequest request = new Pushunicastmessagerequest ();

Request.setdevicetype (3); Device_type = 1:web 2:pc 3:android

4:ios 5:WP

Request.setchannelid (11111111111L);

Request.setuserid ("1111111111111");

Request.setmessage ("Hello Channel");

5. called Pushmessage Interface

Pushunicastmessageresponse response = Channelclient

. Pushunicastmessage (Request);

6. Certified Push Success

6.3. Jpush

/**

*

@author Attilax The claws of old Wow

@since o7t 0_45_41$

* @param txt

* @param target

* @throws Connorreqerr

* @throws apiconnectionexception

* @throws apirequestexception

*/

public static void Sendpush (String txt,string ... target) throws Apiconnectionexception, Apirequestexception {

Httpproxy proxy = new Httpproxy ("localhost", 3128);

Can Use this HTTPS proxy:https://github.com/exa-networks/exaproxy

Jpushclient jpushclient = new Jpushclient (Mastersecret, AppKey, 3);

For a push, all need does is to build Pushpayload object.

Pushpayload payload = Pushpayload.newbuilder ()

. Setplatform (Platform.android ())

. Setaudience (Audience.alias (target))

. Setnotification (Notification.alert (TXT))

. build ();

try {

Pushresult result = Jpushclient.sendpush (payload);

}

}

6.4. Summary:: Jpush wins.

Baidu and a push are traditional programming style ... and Jpush Walk Ten Use no method chain , builder mode :

Atitit.web Push Implementation Solution set (2)---Baidu Cloud, Jpush Aurora Push, a push selection comparison. o99

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.