Here you can advise to do about the same way they do social. network:
- For each user, the server will be able to come up with an update feed itself (I will describe options below)
- The client receives a list of id-shnikov pictures, and the id must contain the path (or paths) storage.
- When you open a client, a request to the server occurs in the form of "give me 100 latest news, starting with the first one", the client receives a list of id shnik.
- The client shows the Grid with a bunch of pictures, each of which has the text "download" (or you can use text instead of a picture, it does not matter)
- The client launches all the pictures in order of news (that is, the newest ones before) in M streams (in order to get 10% of downloaded pictures instead of having 10% of the load on each picture). M should be selected by tests, it all depends on the size of the data and speeds. All downloads are in the background thread, after the end it is sent to the UI in the appropriate field.
- From the user's point of view, the pictures gradually begin to appear, one by one.
How to make a server: 1. If you have a database, and all identifiers are stored there (but not pictures), then you have to simply select ... order by priority, where priority can be calculated, for example, as "novelty" + "tags, which the user likes + proximity to the user. 2. If all users receive the same list of updates, then you can simply store txt / xml / json on the server and sometimes update it. It should be recorded these same id in chronological order. And the server simply gives the necessary lines.
How to create an id: 1. Let us have N content servers. Each picture is stored on M of them and has its own guid (brute force protection). 2. Then id is our guid and server list. That is, to upload a picture, the client should refer to the url of the form https: // {server} / images / {guid} .jpg 3. Ideally, if the server did not respond, then you should try another one. And of course, also ideally, to make requests to different servers in order to balance the load.
How to upload images: 1. Create a separate application / web page. 2. The user selects pictures, presses download. 3. For each picture: the user goes to the database, is determined with a list of servers, copies to each image via a network ball, writes a transaction to the database.
This is the simplest implementation, which, of course, can be expanded. Here, the client keeps everything in memory, the server doesn’t really care about authorizations, etc. However, as I understand it, this is what you need.
About more detailed implementation: what exactly are you interested in? How to make pictures with squares? Or how to request them from the server?