Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have different sources like S3 (json files) and API, and I have to bring all the data to a unique format to store the data in DB.
I tried to parse files and API response on my php back-end but it is too slow.
Is there some best practices or advises how I can do it in a right way?
I'm going to do an Interface with all required methods, and Class' for every source which will implement the Interface.
If I will work with hundreds or thousands files (per hour) Is this approach the best way to do it?
P.S. Currently the project is build on top of Symfony2 framework.
I guess you are forced my traditional RDBMS to convert all sources to specific format.
You may use schema-less systems like MongoDB, Cassandra or even JSON type in MySQL 5.7 to store 3 fields: id, source_type and source_json. This way you create several classes that know how to parse the source_type (ex: S3) and use them accordingly
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 days ago.
Improve this question
I am about to inherit quite an old system that was built with CodeIgniter (not sure which version) and runs FuelCMS on the front-end. I am not overly familiar with FuelCMS, CodeIgniter nor PHP, but my assumption is that there is a SQL database (or series of them) that hold the data, and a number of PHP API methods that handle GET/POST requests to this database.
Ideally, I would want to scrap Fuel CMS, but retain the API methods and SQL database, and write a new front-end to replace Fuel, probably in React or NextJS. An alternative would be to use something like KeystoneJS or Directus.
So my questions to those who understand CodeIgniter are along the lines of:
How straight-forward is it to write something on top of a CodeIgniter system? Either a new API that directly queries the database (in NodeJS) or just a front-end that still uses the existing API.
Are there any off-the-shelf solutions (aside from Fuel) that would perhaps offer either some increases in performance, or additional customisation options? My limited experimentation with Fuel has found it to be quite limited.
Appreciate your help!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am little new to PHP, MySQL and web development. I have seen MySQL Views are "Virtual Tables" and can be used to represent data table virtually. And my problems are,
Are there any performance increment when we use MySQL Views in a PHP 7 MySQL application?
Are there any security increment?
Can we use MySQL Views for JSON REST API requests?
As far as I know. The view is like you save a query to a database. So you can save time to write a complex query.
I think yes. Because you can grant users access to view rather than directly to the table.
To get the data is yes, but a function like edit and delete I don't think so.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have created web application using laravel, now I need to add functionality for users that when there is no internet connection available data must be stored in their local database, and when the system get internet connection than the data should be sync with the live sever. If we have only one client and one sever than I can use master-salve deployment, but here in my case there are more than 1 local clients.
Instead of having two databases you could tweak the front end a little bit to save data in HTML5's localStorage in a neat JSON format so when the user reconnects, you could just push the localStorage items with AJAX and iterate through the array of json objects storing them in empty model objects and save them each.
As for old data, you could store their ID's also in the localStorage so you can just update them which you could easily do with $some_model->update()
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to have users upload on imagine on the app I am developing for a class with Swift and posting it to my MySQL database with PHP but have no idea how to do this. I cannot find any sort of source code online for this and am at a loss for trying this myself.
Does anybody know how to do this?
Though you can technically store images in a MySQL database, it's really bad practice.
Instead, you'll want to store the file in a disk directory. Since this is a broad question with an almost limitless amount of ways you could achieve your goal, here's one suggestion:
Send the file as POST data to your server.
Store the file using PHP.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I would like to set up an online store and a point of sale application for a food coop.
My preference is php/mysql, but I can't find any projects which accomplish both these requirements. I was wondering if it would be possible to use separate store and pos apps and get them using the same product database.
The questions I have about this are:
is it a bad idea?
Should one of the apps be modified to use the same tables as the other or should there be a database replication process which maps the fields together (is this a common thing?)
is it a bad idea?
The greatest danger might be that if someone successfully attacks your online store, then the pos systems might get affected as well. E.g. from a DOS attack. That wouldn't keep me from taking this route, though.
Should one of the apps be modified to use the same tables as the other or should there be a database replication process which maps the fields together (is this a common thing?)
If you can get at least one of the two systems to use the products data in read only mode, then I'd set up a number of views to translate between the different schemata without physically duplicating any data.