Welcome Guest, Not a member yet? Register   Sign In
uploading an image (BLOB) to mysql
#7

(This post was last modified: 03-20-2021, 03:47 PM by richb201.)

(03-20-2021, 01:51 PM)InsiteFX Wrote: The insert should still be coded the same, Personally I would leave the images where they
are and then just save the image path to the database blobs will eat up you hard disk fast.
>>Personally I would leave the images where they are and then just save the image path to the database blobs will eat up you hard disk fast.

Yeah, me too! That has been working for a while. It used to be recommended not to keep images in the database for speed and cost. In my case, when running a report (which is the main reason to run the program), takes about 10 seconds on my laptop. Why? There is lots of database manipulation going on. To try to speed this up I split this 10 seconds into about 4 seconds of preprocessing  and about 6 seconds of actually creating the charts, tables, etc. I am concerned that during this 6 seconds other users will be affected. For this reason I decided that I need to have a few servers sitting behind a load balancer. That should work to allieviate some of the issue. But that also means that a user who uploaded their images on server A will not be able to see them on server B and if they try to run their report from server B, the images will be missing. 

That is why I moved the database to mysql RDS. The last part left for me to do is to move the uploaded images to a shared location. I have played with the idea of using AWS EFS, but in that case I need to either use AWS Direct Connect or VPC. Direct Connect is very expensive and VPC I am considering, but will take some effort. But keeping the small "thumbnails" in the mysql RDS would be easiest.  Or so I thought. 
I just can't seem to upload the BLOB. 

I am not an expert in php or codeigniter or Docker Smile, obviously, but I am an expert in the taxation of research, which is what my application is for. I needed to say this because i constantly get criticized  for my lack of technical skills and I really appreciate your non judgemental help. All I can say we all can't be EXPERT in everything! 

My design right now is pretty much to make each server independent. Each contains its own wordpress, fusionauth, apache, mysql  in a docker container, but all of the data is kept centrally in RDS. In this way it doesn't matter which server is used since I am separating data and code, a basic IT precept.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
uploading an image (BLOB) to mysql - by richb201 - 03-19-2021, 09:04 AM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-20-2021, 03:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB