Any reason why latency in updating timelineitem to my glass device? - google-mirror-api

i see latency issue - when i send a timelineitem from my glassware app, it takes a long time to appear on glass device.
I see the item in developer playground (https://developers.google.com/glass/playground)
Is it isolated issue on my WiFi (unlikely)? or some optimization done at Mirror server which queues timelineitems and sending in a specific interval to glass device?
Thanks

After doing some more investigation (In my case, i have setup private network inside enterprise network), i found out that some of the ports are blocked by firewall settings for incoming traffic from outside network, so glass device was not getting notifications from the Mirror Server.
It is possible either Channel API or XMPP is used in receiving notification messages from Mirror server to Glass. Those ports might have blocked by my firewall settings. I ran wireshark, still it is not clear which protocol or port is used in receiving notifications.
Also it is possible that glass device could get (HTTP GET) newly available cards from the mirror server by polling on specific time interval or other cases(changing WIFI network, etc).
I called Glass help, i could not get any feedback.
I would really appreciate if someone (from Google) could shed some light (port and protocol details) on how Glass gets notification from mirror server when new timeline card is available.
This is a known issue:
https://code.google.com/p/google-glass-api/issues/detail?id=185

Issue has been fixed by updating to XE10.

Related

How to build serverless p2p chat application in React?

I would make a chat app where server communication is allowed only for signaling.
I checked this video: https://www.youtube.com/watch?v=WmR9IMUD_CY
This video goes about "real time" communication, for me some delay is ok. I would make chat application which only send text, but not video content. The question raised for me:
How to generate ice candidates to get list ip addresses / ports? How to make request to stun server?
If we have the ip and port list shared through the signaling server on both side, then how one client call the other client and send or receive text? Can I use axios for sending, and set one of the ip - port pair from the list as url? How to receive message?
Maybe I do not even need webrtc as the data transmission does not need to be realtime, some delay is ok?
Would you show a basic demo?
Maybe that is what you are looking for Google Code Lab Friendly Chat
but if you want to learn more about WebRTc I really recommend this article so you will can see if is that what you want.

aws_sdk: how can I identify if my device is connected to the aws server

I have a device (esp32s2) which is IoT enabled and communicating with AWS server.
The device is connecting to the internet via router. I want to check from the device, if the router is connected to the internet or not. If not connected, I need to disconnect mqtt broker instantly.
I know there is aws_iot_yield happening, but it is taking too much of time to change the client state (~5-10 mins) after disconnection. So, is there is any other way in which I can come to know if the device is connected to the mqtt broker or not using AWS sdk?
I want to avoid using pinging to some address/server as it will increase the usage of resources.
Thanks in advance!
Since the connectivity to the AWS server trough internet depends on the network elements, the only reliable way to know if you are connected to internet is to send a package to a know address and receive the response. Simplest way to do this is to use ICMP (ping) protocol. Usually the most reliable destination to ping is the Google DNS server 8.8.8.8 or 8.8.4.4 which is a cluster service and it's always replying on the ping.
You can control the pause between two pings and how many pings you will send in one session in order to preserve the resources.
Alternative approach is to use a router that can send messages to a monitoring device that the link state was changed (by example SNMP trap). But this is not fully reliable method since the router can not detect all scenarios where the connectivity to your AWS server is lost.

Is Zabbix capable of forwarding messages to another Monitoring Platform like Icinga2 (Manager of Manager MOM Configuration)

I have worked with HP Openview/OMi in the past and I am new to the Nagios/Zabbix/Icinga2 frameworks. I was wondering if Zabbix is capable of forwarding messages to another monitoring system such as Icinga2 in the same manner as a manager of manager (MOM) or competency center configuration.
Zabbix gathers data and fires up triggers of various levels according to the defined expressions (ie: ping loss too high, cpu usage too high, service X unreachable).
You can configure Zabbix to react to triggers with actions: you can send a mail to a team, send notifications through telegram or sms, call a webhook or call a specific script to do actually anything you need.

What is the best way to determine the connection state of an AWS IoT device?

How can I determine if a particular AWS IoT device is currently online? I could send an MQTT message and make the device answer it. But is there some implicit way on seeing if a device is online/connected?
You can also use Fleet Indexing with enabled Connectivity Indexing
https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html and do search for your deviceId. In results you can check connectivity. Also you can search for all connected devices by using search with query connectivity.connected:true
Ok, there is a dedicated internal MQTT topic for it. Subscribe to $aws/events/presence/# to get presence events for all your devices.

Does Windows Phone delay or batch HTTP requests? Seeing 600ms request delay to a server on the same LAN

I am developing a Windows Phone app that communicates with a server on home LAN over wifi, and I ran into a show stopper: an average round trip time for a tiny HTTP request inside LAN is 600-800ms.
This only happens with a standalone phone. If the phone is connected to PC running Zune the phone starts talking through Zune and the response time drops from 600ms to 20ms (!).
I wrote a small repro program that sends HTTP request every 100ms and ran Wireshark trace.
The trace shows that the server responds right away. It is the phone that delays requests and sends three to five requests at a time as a batch roughly once a second.
More info:
My program is using HttpWebRequest not WebClient.
I tried to spawn threads for each request, no luck.
This happens on WP7 release and on Mango.
The same thing whether I run off my work or home Wifi.
A low level implementation using socket API in Mango exhibits same behavior.
I have seen other posts on App Hub with the same issue. Please help clarify why this is happening.
Perhaps another experiment will help. Put your phone on charge and use the WiFi to send your messages. I suspect this batching is a result of a battery saving feature.
If I understand correctly, cellular networks link layer protocols are bursty so they can virtualise and run more connections than there are transponders. I suspect this is the root of your symptoms.

Resources