Flex multi-client live updates - mysql

At work we use amfphp as server and mysql as databse. What we need is that when a user updates a record the other users logged in the application can receive that update and see the update data, is that possible? Are there any libraries capable of doing this? I think that the most important part is to identify from the server the logged in users... thank you in advance.

To make this happen you will need to use a server that supports push functionality; meaning the server can send data to the client.
LiveCycle supports this, as does GraniteDS and WebOrb. I don't think that PHP does.

Related

Trigger node.js when changes made in apache mysql

I'm building a simple commenting system using node and i need to configure this in a PHP project running in Apache server. So, i need to trigger node.js when some changes made in MySQL database table present in the Apache server. So, i need to know whether it is possible to do this in a Apache server? If so, then how to do that? Any idea or suggestions on this are greatly welcome. Please help...
I guess there are few options you could take, but I don't think you can get some sort of triggered action from within MySQL or Apache. IMHO, you these are the approaches you can take:
you can expose a HTTP API from node and every time you need to notify the node app, you could simply insert the data into MySQL using PHP and then issue a simple GET request to trigger node.
You could use some sort of queuing system (rabbitmq, redis, etc.) to manage the messages to and from the two application, hence orchestrating the flow of the data between the two apps (and later the db).
you could poll the database from node and check for new rows to be available. This is fairly inefficient and quite tricky, but it sounds more close to what you want.

How do i capture mysql triggers and stored procedures in my vb.net application?

Hey i need some help here, i am developing a vb.net desktop application using visual Studio 2010 and mysql v5.5 whose database will be located in a main server hence the applications will have to communicate with the the database to get/post information.
My problem however is that, i want my applications to have a real time update of the database content such that if user1 updates the database, it immediately reflects that in user2's application. I have read articles that recommend use of triggers and Stored Procedures in mysql syntax to do this but i have no idea how this will work.
I have a table called 'Store' , when a user enters an item in table store, i'd like the application to know it and update the Item and its contents in a listbox or datagrid.
How do i capture these events in my vb.net code?
I hope i am clear enough, if not please ask. All your suggestions will be highly appreciated!
I think the easiest way to solve the problem would be to periodically get the records from the server and update the local list appropriately. On your client application you could store the last time the list was updated, and send that as a parameter when you do the get and get all the items that were created after that time (that way you only get new items).
Another possible solution would be to have a client register with the server application (so the server keeps track of all the clients) and when you create a new record you send that new record to all the clients, which would be listening for that event.
It's sort of hard to say what the 'best' approach is in your situation. How is your code designed (what's the architecture)? Are connections between the client and server applications persistent? Is there a server application that your client application talks to or is each client directly talking to the database?

can I get notification in Yii view when database is updating?

I want to receive a notification while Mysql database is updating and this notification should stop when the update finish (by adding "NEW"). I want to know the simplest way to do this .
Any idea please ?
Thanks
Yii, being a mere PHP framework running on the server, can not do such a thing. This is essential to client-server architecture. The server can not take the initiative to update the client.
The client (i.e. the user computer) can take the initiative. It can send a request to the server. Then, and only then, can the server respond to client.
You will need Javascript running on the client. The Javascript polls the server (via ajax) to see if the database is being updated. If javascript polls and finds that the server responds with: "database complete", then Javascript can add the 'NEW' logo.

get browser session in mysql

How can i get browser session in mysql. Any idea thanks in advance.
You can't get the session information via MySQL as it is only a database and not handling any HTTP stuff.
Fetch the information you need via PHP and then store it from there in MySQL.
http://php.net/manual/en/function.session-id.php
The location of your browser session depends on the framework you use and also on the fact whether you use the db to store your session. Which framework do you use?

Can we add MySQL Indexes without the server and client?

I was given access to a cluster today along with a front-end. The person who gave me access tells me I cannot start anything on the front-end and that I should submit everything as a job. Now I have no idea what that means but I'm thinking that I am not supposed to start MySQL on the front-end. If that is the case, how can I even use the database?
Is there a way I can add indexes without using the client-server? Or is it even possible to use a database in a cluster setup where I can only submit jobs?
I am guessing the person means that the client is actually executed as a "job". you might want to find out how they program the cluster.