Message library

Scenario: Some user sending messages to a group of people .

I was thinking of creating one ROW for this particular conversation in one class. WHERE in this ROW contains information such as "sender name", "recipient" and add. I have a column (PFRelation) that connects this particular row to another class, where all messages from the user to the recipient will be saved (vice versa).

Thus, this action will occur every time the user starts a new conversation.

The advantage of this perspective:

Confidentiality, because only the stored code is saved only from the user and group of recipients.

The downside of this perspective:

We all know that parsing only provides 30 seconds / sec, which means that 1 min = 1800 queries. Therefore, every time I create a new class for tracking convoys. Am I using a lot of queries?

I am looking for suggestions and thoughts for the perfect path before I implement this library of instant messengers.

+4
source share
1 answer

, - , , Parse . , . , , . Facebook Haystack.

Haystack - , Facebook, , , , .

, , . , , . , Parse.


() Message , , . Message a Group. A Group 2 User ( ) .

RecentMessage - , , . RecentMessage Group, User. User Group RecentMessage, beforeSave/afterSave . , Message, afterSave RecentMessage, Group.

, , , . RecentMessage, Group, , ( ) . , RecentMessage Message, , , .

  • ( , )
  • ( , )
  • ()
  • ( )
  • ( )

RecentMessage

  • ( )
  • ( )
  • lastMessage (, Message)
  • lastUser ( User, Message)

  • members ( )
  • ,

/

. Parse Engineering , : I, II, III, IV, V.

III, ACL, . Group ACL, User. RecentMessage ACL / User. Message ACL Group, , Group . ACL afterSave, .


Parse , , 30 req/s. , , . , , . , - , :)

+1

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


All Articles