Im building application like real time dashboard. Using many databases and external APIs.
(The first Idea was AJAX + Laravel Queues, but I found VueJS and It's interesting.)
The idea is to get the data in background with Laravel Queues from all sources and then storage it localy. Next step is getting this data with VueJS.
The problem I have is the storage part. I dont have idea and actually dont know how to store it so VueJS can efficiently get this data from storage and on the other hand Laravel can save the data to it the same.
There will be many users loging in a system so I created the MySQL database for them but dont know, if it's a good solution.
Thanks for advices!
You create routes for Vue.js to make XHR(Ajax) requests to. If you want to save data this would be a post route. If you want to retrieve data this would be a get route.
How you handle the data you are sending or (directly)receiving is of no concern to Vue.js.
This would be a good start:
https://laracasts.com/series/learn-vue-2-step-by-step/episodes/18
Related
I do not have much experience, I have the following problem with an api that receives multiple requests I would like to implement laravel queues to give a better response to those multiple requests, but I do not know how to do it.
thanks
my controller
enter image description here
my jobs
enter image description here
i known this question is very Strange but do what I didn't get an answer anywhere So that's it I asked this question Thought it necessary to ask !! can insert update and delete data in laravel api using React native is it possible ? I have a website In which i used the larval api That's why I question I am asking !
If you able to make request with API like update the user data and if you have implemented that in your API then you can for sure edit data and delete them using API request. I suggest using requests in your React native Application.
Yes can do this easily first make database in MySQL, second is create insert Update query in larval and make it controller in larval and using axios lib in react native to create post and get method.
I'm trying to set up a front end UI for the webApp I've been working on and have a clarification question before proceeding further.
Right now I have multiple sensor units streaming data to the server that is saving it to a database and then set up a crude api, to be expanded on later, to interface with the server and DB.
Now, moving to the front end, I feel like I'm bashing my heading first trying to learn react and now vue. The first feature of the UI I'd like to have is to constantly see the sensor data displayed in a table on the browser.
Should I be calling this data from the server using the API http requests or have it sent using websockets?
After spending a few hours trying to get vue connected to the socket opened on the server I wanted to check if I'm just looking in the wrong direction to begin with?
Thanks!
It would be best to create a websocket connections since your data is continuously changing. You are definitely on the right track.
Just create an vuex action that will commit your data to the store. It does't really matter which websocket tool you use. Most of them work quite the same. There will be most likely a callback function which gets triggered when new data has been sent to the front-end. This is where you would call your vuex action and pass through the data. If you can edit your question with some sample code, I can help you in more detail.
Just to some it up:
1) Open Websocket connection to backend service
2) Create action which would save the data to store via mutations
3) Specify websocket callback function to call action
I am creating web application work with laravel and vueJs and my app work with third party api which one provide live data on related market. I.E.
When user add order with a price, it will match live market price before order is confirmed.
I constantly update the market price feed. A cron job is used to do this, but the response time is more than 1123 ms on laravel.
When using direct Php API call without using framework, the response time only improve slightly, e.g. 995 ms , before compare data in local database.
Please suggest a better way to retrieve this continuous update data. Currently the application is still in development, I i want know the correct type of service need and need suggestion on what kind of server should I use. The application make ~2,678,400 API request monthly.
I'm currently developing a web application and I expect a lot of visitors (potential thousands of concurrent visitors). For this reason I prefer the Lumen Framework over Laravel because of the size and better performance. But I miss some things that are excluded from Lumen since the last version, like sessions, views and session authentication.
So I have a choice: using the heavier Laravel framework, or use Lumen and add some Laravel components I need. My question is: what is better?
I know I can test some things on my own but I'm not that experienced and I'm wondering if anyone has some good pros or cons (or if you have another alternative I'm curious too).
I recommend you use Laravel for your purpose. Lumen 5.2 doesn't have views, sessions and can be a bit frustrating create a big website. And since the new version, not her philosophy. Lumen is now focused on JSON API's.
Only Stateless APIs
Lumen 5.2 represents a shift on slimming Lumen to focus solely on serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework.
If you need access to these features, you should use the full Laravel framework.
https://lumen.laravel.com/docs/5.2/releases#5.2.0
If you need an API, is the perfect place to use Lumen. Share the database with the Laravel app (that will contains all the business logic) and you will have a fast API