My polymer file is running on server "A" whose work is to bring and send data to that private server "A". All data of this private server I can fetch through polymer so I am sending data to firebase. My problem is I want to notify polymer, If there is any update in firebase so that I can send data back to private server.
Related
I'm trying to set up a Firebase A/B test with a conversion event logged from my server, in combination with events fired from my mobile application.
From the diagram below (retrieved here), I would expect that if I properly pass along my App Instance Id and Event Data to my server, and then pass that data along when logging to GA4, the event should be properly attributable to a Firebase A/B test, but that has yet to work.
I have confirmed that A/B tests with events fired from the mobile app directly work as expected, and confirmed that App Instance Id is being passed to my server before being forwarded to GA4 (which is where Firebase is getting my mobile app data).
The reason I am attempting to do this from my server is this event can be logged from either my Apple Watch app, or the iOS app, and has a heavy amount of processing that occurs on the server before being "complete" - I am therefore looking to log that conversion at the end of that server processing, but this processing is hidden from my mobile clients (I just send a 200 back shortly after receiving the payload and spawn child processes to handle the rest of the work on the server).
Is this simply a limitation of the Firebase A/B testing framework?
Thanks!
I want to be able to send some JSON data from one instance of my iOS app via text message to another device. Then, I want the receiving device to be able to open this data and have the instance of my app on their device consume the JSON that was sent.
So far, I'm seeing that deep-linking using the built-in app delegate function only allows me to pass in a URL, and not static data. I know I can send the data using an MFMessageComposeViewController, but am a bit lost at what to do on the receiving device end to consume this data.
I am new to Objective c and Parse but if I have an app and I need to get objects when they are created. Like iMessage where it is not checking every few seconds it just gets notified that a new message has been sent to it. In the same way can I have a list of objects reload from parse when a new object is created?
Unfortunately, there is no way that you can do realtime with Parse server. There are two solutions. In my messaging app, I send a push notification to the counterpart. When the notification is delivered, I will call the local Notification Center to update data or the UI.
The second solution would be Firebase. This year after Google I.O. They launched a new version of firebase. Even though the data is organized in a JSON tree, but it now supports almost everything you can imagine. Realtime, file storage, push notification, user authorization...
Please let me know if you have any more questions or details about Parse or Firebase. Good luck.
Imagine a chat app (iOS + Swift), when I send a message, I first save it with state "Sending".
Now I want to change the state to "Sent" only after it arrived at the server.
How can I achieve this?
setValue:withCompletionBlock: won't work, because if I close the app while offline, the block won't be called when I open the app again.
you can let the message model with a parameter named state and save it to local before sending to the server , when you open the app you can check messages with server
I'm developing a messaging system in Delphi. I'm using idTcpServer in my Server Application and idTcpClient in my client application. the client application pings the server every 10 seconds to see if the connection is active and tell the server to set the status of the user to Online. and also the user may send messages to his contacts. all these requests are followed by a response from server which i get by socket.readln command right after i send the request. for example for pinging the server:
TcpClient.socket.writeln('i am online');
if TcpClient.socket.readln = 'ok' then
begin
{commands}
end;
I also check for new messages using Long Polling. I send 'check for new messages ' + timestamp from tcpClient and then on the server, I check the database for new messages newer than the timestamp i recieved in a While loop so when there is a new message the loop breaks and notification is sent to the client.
But this system doesn't work for me. Sometimes I get the responses intended to be for checking for new messages when the client application is pinging the server.
I have developed the same system in php without a problem. but here there must be a problem.
I think it is not asynchronous. what should I do?
Regarding the check for new messages request, the server should not be looping waiting for new messages to arrive. Either there are new messages available at the time of the request or there are not. Get the request, do the query, report the result, and move on. The client can send a new check for new messages request periodically. Alternatively, have the client tell the server one time that it wants new messages, and then the server can actively push new messages to the client in real-time as they arrive on the server, instead of polling for them (similar to IMAP's IDLE command).
I would suggest you redesign your communication protocol to run asynchronously. Most modern IM services are asynchronous. When the client sends a request, do not expect a reply right away. Just let the client move on to other things. Have it run a separate timer/thread that reads all inbound data. When a reply does arrive, the client can act on it. If needed, include an identifier in the request that gets echoed in the reply so the client can keep track of the requests it sends. This also allows the server to use asynchronous processing on its end, so if a request takes a long time to run, the server can push it off to another thread/process and continue processing other requests in the meantime. Send the final reply when it is ready.