Pubnub Channel Group History

I looked at the pubnub group structure template, http://scalabl3.imtqy.com/pubnub-design-patterns/2015/08/11/Advanced-Channel-Groups-Friend-Lists-Status-Feed-And-Presence.html

But still stuck with some doubts about the implementation of group chat

Consider that I have groups GP1, GP2

GP1 - A, B, C (members) GP2 - A, D, E (members)

  • Here I need to subscribe to 2 groups, if 2 I need to add A in both? or 1 group with ABCDE by filtering
  • How to get the whole history of a group with a single api call (Assuming GP1 has more than 100 friends)

thanks

+4
source share
2 answers

, , , , , .

: http://scalabl3.imtqy.com/pubnub-design-patterns/2015/03/05/Inbound-Channel-Pattern.html

, Inbound , , 5-7 . , . 50 , . . , , , API. 1-1 , Inbound .

, cg-user- [uid] -status-feed ( - , , , , cg-user- [uid] -chats), + .

- , Inbound, 1-1 , , .

, :

GP1 GP2 - , , , , JSON , :

Message to GP1 from User A
{ 
   group_chat: "GP1",
   from: "A",
   to: "A,B,C",
   timestamp: 1443112089,
   message: "hey guys, good morning"
}

Message to GP2 from User E
{ 
   group_chat: "GP2",
   from: "E",
   to: "A,D,E",
   timestamp: 1443112192,
   message: "I'm going afk for a bit, time for the gym"
}

3 , [GP1: A, B, C, GP2: A, D, E]. , , , GP1 GP2.

, ...

+9

PubNub

, , , . , , , PubNub Channel Groups , , , .

:

  • cg_user123
  • cg_user456
  • ..

, (, , ). , cg_user123 sports_talk, money_talk pubnub_is_awesome_talk. cg_user456 money_talk your_momma_jokes. , , .

Facebook Twitter ( ). , , . ( ), - , . , .

(), . , , , , , . , / . , technology pubnub_is_awesome, ruby_fanboys long_live_cobol ( ), , . , . , , - .

, , , .

+3

Source: https://habr.com/ru/post/1608300/


All Articles