To conserve iPhone power, but allow data transfer over TCP-IP what do I do?
I need to receive a constant stream of data all the time. But I don't want to kill the battery in 4 hours by removing the sleep feature.
thx
In one word you cannot do that, you cannot transfer constant stream of data over TCP-IP. One user closes your app, apple restricts resource access to your app. This is apple way of conserving power. You need not worry about power.
I think this old question of mine would help you - iOS Background downloads when the app is not active
You might be able to reduce power a bit by sending or asking for data in the largest chunks possible consistant with smooth operation of your particular application, as larger data bursts may allow the radios to idle for longer periods between the data transfers; and allowing the wifi and cellular radios to turn off greatly reduces power consumption.
Related
I am trying to do something new, something I have never done before. I am looking for advice or point me into right direction how to choose technology. I am trying to build race simulation app that will have thousands of iot devices streaming data into central platform. While I understand that I can use some sort of IOT hub with cloud providers, but what technology do I choose for storing data?
Example is online indoor biking app. There are apps where you can connect your indoor bike online and have simulated race. For my project I am trying to build something similar. Do I use NO SQL db in this scenario? What technology will allow better scale of application like this since it could be millions of devices around the world in "simulated" race. I am not worried about front-end and things like that, but backend, IOT hub, storing data, presenting-real time?
At this point it is important to understand what kind of data your IoT devices will stream, and at what kind of a rate. It will have significant impact on your question.
That it is if it's just location information and some other small data sent lets say once a second, then if you're talking about tens of thousands of devices - this is not a big load of information, and any standard database, like MySQL will be able to deal with it. You will of course need a multi-threaded server(s) capable of handling many requests in parallel.
If your IoT devices will stream HD video, then you're looking at a completely different solution, with a much stronger server, capable of handling allot of streams in parallel, with significant bandwidth requirements from your hosting company, as well as storage space for all the videos. In this case you will store the streams as files (if you'll need them later on), and you won't need any special database either.
In any case, once you'll reach millions of users, you'll be able to scale most modern databases and servers, like MySQL replication capability. For example, take a look how Wikipedia is relying on MySQL: wikipedia - MySQL https://www.mysql.com/why-mysql/case-studies/mysql-cs-wikipedia.html
So I wouldn't be worried regarding the database on this stage, but make sure that the design of my system is in accordance to the the type of data and rate it is streamed.
Hope this gives you a pointer.
I am developing a sensor based mobile application for iOS and Android. The data produced by smart phone sensors will be stored in the cloud. At this point, I am wondering that what I should test about the data transfer and storing. I mean that for example, I should test the scenario as if the connection corrupts while GPS data transfer not finished. I am not looking for the techniques, or testing styles. I am trying to find possible failure points or test scenarios. I hope that I could explain my point.
Below are some of the things worth considering for your app:
Incomplete transfers when connection corrupts (as u mentioned)
Cloud-server size..how much request can it handle at a single instance?
If u are considering cloud solutions, you should also consider the location of your users from where they will be accessing your app. Users and the location of data center will also affect in the response time.
Format of the date to stored. Considering a file size which is fast in i/o will also help optimize the speed of the app.
Asynchronous/Synchronous data transfer
Security measures on the cloud..may be using services like VPC if you are considering AWS
These are some things worth considering.
Thanks :)
For my school project I have to stream screen grabbing from 1 station (i.e. server) to another (i.e. client) in Real Time, both running linux (ubuntu).
I'm using libav-tools (avconv as the encoder on the server side and avplay as the player on the client side)
avconv uses x11grab format to grab from the screen.
My problem is: avconv needs a few seconds to output the encoded video. this wait is too long for RT.
I've tried streaming to localhost to avoid network influence on speed, it still seems that avconv is responsible for the long wait.
Also, streaming a video file seems to be much faster, almost immediately.
The project is implemented in C++ and executes avconv in a fork.
Any suggestions as to shortening the procedure?
This is most likely due to internal buffering. There is often a buffer which is way too big on default. That is because having no delay is not the primary concern of most software, they are more concerned with bad connections and that sort of problems, which is what buffers are for.
See https://libav.org/avconv.html, search for "nobuffer" or "-analyzeduration" or "-rtbufsize" or "-max_delay" or "-fpsprobesize" or "rtmp_buffer" (if you use rtmp) or others and try your luck.
There will always be a noticable delay, especially if you use an encodings like h264 for transfer. But a few seconds it does not need to be in a controlled environment. You should be able to bring it down to fractions of a second.
I am creating a image processing application in Windows 8.
Since am playing with images I wanted to know is there any memory limitation for Windows 8 applications?
Depending on that I can reduce size of image before saving it to memory, how much memory it can take maximum for it's working?
Any information please.
I'm not aware of a hard limit outside of typical process limits, however two things to note:
Your app if consuming a larger amount of resources, may be terminated and unloaded while it is suspended, so it's important to implement a proper resume strategy that doesn't take too much time, or your app will fail because of the wait time.
Your app can run on a lower powered device. When you submit your app to the Windows Store, on the 'Selling Details' page there is a section at the bottom. If your app consumes a large amount of RAM then I recommend setting this.
I'm building a real-time GPS tracking system. The mobile client continuously sends location data to server and updates the location data of tracking objects every 15 seconds.
My biggest problem is that the cost of battery and internet is very high.
Is there any solution thats help optimizing data transfer between client and server ?
You know that you have a good solution when you reach
2-3 bytes per GPS position with 4-5 attributes (time, lat, lon, optionally speed, heading)
Try to avoid security, this destroys all attempts to reduce data size. The ammount of bytes that the security (signatures, headers, keys) uses is far more than that of the GPS Data packet.
Is there any solution thats help optimizing data transfer between
client and server ?
Yes, at least some tipps: Do not use XML, that blows up your data by a fatcor of 100 to 1000. Use a binary protocol. A WSDL Web Service ar not well suited for this task, too.
The less frequent the device need to communicate the better the chances to get more fixes per kbytes.
An uncompressed position: needs 12 bytes: time (4), latitude (4), longitude (4).
Different companies have differnt solution to compress the data. I know one patented solution, and one confident. More I cannot tell you.
Battery
If you disable the screen, you can record 8 hours of one per second positions on an iphone4.