how can I send json data through a post request to an external client from mysql commands?
POST(select * from clientes)
I need to develop an application and python that listens to a pot from mysql, every time a new row is inserted from a database table, that is, when a trigger is performed
Related
I send JSON's to my app via Postman in a list with a type of mapping(CRUD) to send it to my database.
I want my controller to put all this data, from multiple senders, in a list that will send the information to my DB. The problem is that i don't know how to store in the same list the Json and the Mapping, so when my threads do their work to know if that json must be inserted, updated, deleted and so on.
Do you guys have any ideea ?
PS: It is a spring-boot app that need to be able to send 12000 objects ( made from that jsons ) to the db.
I don't see a reason for putting all data in one list and sharing it later, each HTTP request receives own thread.
On decent server you can handle couple thousands of requests/sec which perform simple CRUD operations.
I have built an app with Feathers.js and I'm trying to find the way, how can I save any record to the multiple databases? I would like to save a "message" for example to the mysql and also to the elastic search.
I would like to use elastic search for "full text" search, but I would also like to have all data saved in some relational database.
I've created a service using:
feathers generate service
but I can select only one specific database there.
Any help will be really appreciated.
Fast way to me is to create another feathers app (microservice) for elasticsearch and post the data to elasticsearch too.
If you are using socket in the frontend app you can define 2 sockets (1 for each micro service).
When you post new data to feathers app 1 (mysql) you can :
on response of the data created post the same data to feathers app 2 (elasticsearch)
on error abort and correct
or
add a service('your_post_service').on('created', ... and then post data to feathers app 2 (elasticearch)
Is it possible to get browser information in a PROCEDURE via MySQL code?
Without having to pick up via backend code and pass as parameter. That is, does MySQL have any function that returns browser information?
No, it's not possible.
MySQL runs at server side whereas browser info is sent from client side (in request headers). So, unless it's passed to MySQL stored procedure or function (via a web app or php), there is no way MySQL would get the browser information.
Any browser information is going to come in the HTTP request and will need to be passed on by your backend code to your MySQL server. There is no function in MySQL that can give it to you directly because the MySQL server doesn't have access to that information.
I've a requirement. I have a REST API using spring-mvc in which there is a POST method to insert data into MySQL database. I checked it through postman client and results got inserted into MySQL database. Now I've one more spring project say InsertMongo in which the details are inserted into MONGODB as documents. So, i need to invoke my REST API in that spring project InsertMongo such that i have to insert the details into MySQL table instead of inserting them into MySQL. Let's say I've all the details which are to be inserted . So, how can i send them as body to POST call and how can i invoke my post call here. can anybody tell me how to proceed. I'm not getting any idea. Thanks in advance.
I have written a code to create temporary table on every http request. For the very first request table is created successfully however on the second request it gives me error as Table 'xxx' already exists. when i restarted my local machine server(thin web server) and hit the http request then again temporary table is created without error.
Does this mean that temporary tables are shared between different http request and are destroyed automatically when machine or server is restarted??
Thanks,
As far as I know temporary table exists until connection to the database is closed. In Rais you have a pool of connections to the database and different requests can use different connections.
So if you create temporary table in the first http request, second request can use the same connection and you can receive a SQL error when is trying to create it again, but in second request use another connection temporary table will not exist yet.