ajax - How to approach a long time process in PHP? -
i working on php product application, deployed on several client servers (say 500+). client's requirement is, when new feature released in product, need push changes ( files & db ) clients server using ftp/sftp. bit concerned transferring files using ftp 500+ server @ time. not sure how handle kind of situation. have came ideas, like
- when user (product admin) click update, send ajax request, update first 10 servers, , returns remaining count of servers. ajax response, send again next 10, , on.
or
- create cron, runs every 1 mins, check whether update active, , update first 10 active servers. once complete transfer server, changes status server 0.
i want know, there other method these kind of tasks ?
add whole code code repository mechanism git
, push on present files created repository. go 1 server , write cron auto pull repository severs , upload cron every server.
in future if add new feature pull whole repository , add feature. push code again repository pulled cron automatically in server kept cron previously.
Comments
Post a Comment