copycopter / copycopter-ruby-client

Edit copy in your live web app.
http://copycopter.com
MIT License
177 stars 56 forks source link

[Feature] Post data in batches #41

Closed driv3r closed 4 years ago

driv3r commented 11 years ago

Hi, I don't know if it's only my problem, but probably most of teams can have issues when adding copycopter to existing project which have 2K+ translations. There are basically two problems:

Each of those occurs when you want to send and store a large piece of translations. We could put it either on the client side or server side.

The first option could probably look something like making chunks from data, and posting one after another, we don't need a background job because from what I see the client work in second thread anyway.

The second option would probably involve something similar, so getting the missing translations, saving them as plain text in db, and then in background split them into batches, and save it within smaller transactions. Maybe we could also use batch inserts?

I would opt in to implement it. I already have a working prototype on client side, but probably it would be better to make it within copycopter-server. I will investigate it further on weekend, but it would be nice if someone would give me an general quick overview of connection between client and server. So i.e. if it checks missing keys after downloading them from server, or it just push everything there on startup, also what I should be aware of when making it.

What do you think? Hopefully some maintainer will take a look ;>