Home Forums Add-ons Repeater Field Is using ACF repeater to develop chat system good?


Is using ACF repeater to develop chat system good?

  • Hi,
    I was asked to create a chat system for a car rental website. The website will have huge traffic. So a lot of users going to log in and at the same time adding cars and renting.

    The chat system will be interaction between a car vendor and a client. If things workout between them the client pays and gets car location phone number etc.

    The site is already using ACF, so this got me thinking if its a good idea to make a chat system using repeater?

    Basically starts of with wp_insert_post($post_data); to create a new post then add_row( $field_key, $value, $post_id ); to insert a new row every time one of them replies.

    My question: Is this a good idea considering the site will have huge traffic with many users chatting at the same time? Is it ok if both users insert a row at the same time? Are there any pros cons I should be aware of?


  • Hi @mysticalghoul

    You could def. do this with ACF & WP, but I would think you would be better to use a third party system that specializes in this. Something like Intercom would probably suite you better.

    You could tap into the API if you need to sync with your WP install.


  • I’m with @nathanaelphilip on this one. Rolling your own chat system is probably not the way I’d go. There are already plugins for integrating chat into WP, like this one

    As far as cons for using ACF repeater fields, or ACF at all…

    ACF is a great plugin but it has it’s limitations. Performance of ACF on a high traffic site where you’d need to store thousands of messages in the meta table would likely (eventually) crash the entire thing. You have to remember that ACF uses WP core built in meta table and meta functions for data storage and retrieval and it is the core functionality of WP meta that actually creates the limitations of ACF. ACF is tool for creating admin pages that are easy to use.

    Think about what you would need to do in WP if you didn’t have ACF just using update_post_meta() and get_post_meta(). Not to mention that every chat string would need to have it’s own “Post” with related information about who is allowed to access it. What would hundreds of thousands of posts do to WP?

    There is also the problem you mentioned of two or more people trying to update the same information at exactly the same time. I’d assume that this would be rare, but if you tried to perform to updates to the database at the same time, to be honest, I don’t know what the results would be. You could either loose a message or end up with DB errors that crash one side of the conversation.

    This site does not even use ACF for this forum. It uses BBPress with some modifications done using ACF.

  • @nathanaelphilip @hube2 Thanks guys for a wonderful answer. I spoke to representatives of this website you mentioned: unfortunately they said they cant help out with what I need. Is there any other portal you guys can recommend?
    Also I came across this plugin: it creates another table to handle messages. Is this a better option to have different table?

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Is using ACF repeater to develop chat system good?’ is closed to new replies.