How can I send a file from an iPhone to my server? - ios

I've seen lots of questions and answers about this topic, but unfortunately none of them seem to fit my needs closely enough. This question is about both iOS and vb2010.
I have created an app which communicates with my server (at this point, "my server" is actually my Win7 machine that I am using for development. Eventually it will move to an actual server). The back end is a VB program that interfaces between the iPhone app and a SQL Server database. A specific port is open to the computer, and everything there works great. I am able to retrieve data from the database and display it on the iPhone with the app, and also able to save records from the app to the database. It's all so very cool, and I'm really jazzed about it.
The final phase of the project requires uploading a camera image to the server. This is the part where it gets funky for me.
So far I have been able to save the image as a file on the iPhone's disk. Now I need to understand better how to transfer that file to a directory on the server.
I know that there are many techniques that use the "post" method, but as I understand it, that requires a PHP or ASP page to accomplish. FTP generally uses ports 20 and 21. What I would really like is to be able to set up the existing software to receive an upload request from the app, and then place itself in receive mode. This would not require opening another port, and I can tailor the VB code to handle the file however I like.
All I really need to understand is, how can I get the two programs to do the file transfer? And is it reasonable to assume that I can use the same port?

Related

trying to load QC11.5 using Neoload but recorded response not stored by neoload

I am trying to do a loadtest on QC11.5 application using Neoload, While recording request are being captured but response body not been stored.
<<body not stored by Neoload >> Error
please help to resolve this issue
Hum... It sounds like a well-known project ;> Here is a summary for the other readers. Hewlett Packard Quality Center 10 or 11 is not a "full" web application. It is kind of local application, installed through Internet Explorer with .cab and .ocx using a HTTP tunnel. The problem to load test it is that the dialog sent by this fat client is fully encrypted. For NeoLoad, an encrypted conversation (over HTTP or HTTPS) is considered as binary and it is not stored in the design. But it is clearly showed in the "Check VU" step. Here we speak about an "alien" encrypting service on top of standard services like SSL, where NeoLoad performs well.
For the readers, to put it in a nutshell, QC cannot be load tested with a network-based approach, like all the majors and professional load testing tools do. Here it is one of the rare situations where a synchronized functional test could be the solution... with hundreds or thousands of desktops.

Download sqllite database from django web app and use in iOS?

I'm developing a site-specific installation for an office lobby which will display content on 6 iPads. The installation has several megabytes of data which will be managed by a django webapp. I'm considering different strategies for fetching the content data from the web app. So far, I have simply been dumping the data in to xml format and fetching it via a single http request from the iPad to the content server. I then load all of the content in to memory on the iPad.
I'm beginning to have some concern that I may run in to memory issues as the amount of content grows, and that storing the entire database in-memory won't work. The natural next step is to think about a database on the iPads. I'm using sqllite for the content server. Seems to me that it may be feasible to simply download the entire database file itself and query it directly from the iPad.
Proposed Approach
Download the actual sqllite database file nightly from the django content server to each of six iPads used in an office lobby installation.
Things I like about this approach:
It could be really simple. It removes the whole web services layer from the system.
It protects against network problems nicely. If the network is unavailable, the worst problem is that the iPads display stale data, as apposed to there being no content if the system is network-dependent.
Things I don't like about this approach
I'm not sure how to safely download the file. How to I ensure that the file I'm downloading is in a valid state, and I'm not downloading while someone is updating it?
I've never heard of anybody doing this, or even considered doing it. It seems like it's far from tried and true.
My questions
Can anyone think of reasons why this is a bad idea?
How can I safely download a sqllite file with confidence that it's in a valid state?
Why don't you create a Syncing system - perhaps with JSON.
I've done something like this before - I had a central repository server on site that was running my Django web application. The different iPads would sync regularly with the web app's database making sure their local data matched the server data, if not it would update via json.
On the iPad itself, I was using phonegap's SQLITE syntax which worked perfectly for storing the clientside data. But the key was syncing this database via json to the central repositorie's database - rather than physically moving the SQLite db over to the ipad.

iPhone/iPad as a server

I want to create an app where clients connect to a server and communicate with each other via images and texts. I already have a server as backend, but is there any way that an iPhone becomes the server? I know that there is CocoaHTTPServer, but all of the examples are just a server displaying a webpage. Do you know how I can use it to fit my needs ?
There is no way to just take all you stuff that now runs on an apache directly to the iPone
You find a couple of tutorials and solutions in the internet.
Maybe this thread can help you: iOS devices as web server
Concerning CocoaHTTPServer
Maybe have a look at the SimpleFileUploadServer

Sending large amounts of data from windows app to service app

I'm building a system with some remote desktop capabilities. The client is considered every computer which is sharing its desktop, the server is considered a central server with a database which receives the images of all the multiple desktops. On the client side, I would like to build two projects: A windows service application and a VCL forms application. Each client app would presumably be running under a different user account on the computer, so there might be multiple client apps running at once, and they all send their image into this client service, which relays them to the central server.
The service will be responsible for connecting to the server, sending the image, and receiving mouse/keyboard events. The application, which is running in the background, will connect to this service some how and transmit the screenshots into the service. The goal is that one service is running while multiple "clients" are able to connect to it and send their desktop image. This service will be connected to the "central server" which receives all these different screenshots from different "clients". The images will then be either saved and logged or re-directed to any "dashboard" which might be viewing that "client".
The question is through what method should I use to connect the client applications to the client service to send images? They will be running on the same computer. I will need both the abilities to send simple command packets as well as stream a chunk of an image. I was about to use the Indy components (TIdTCPServer etc.) but I'm sure there must be an easier and cleaner way to do it. I'm using the Indy components elsewhere in the projects too.
Here's a diagram of the overall system I'm aiming for - I'm just worried about the parts on the far right and far left - where the apps connect to the service within the same computer. As you can see, since there are many layers, I need to make sure whatever method(s) I use are powerful enough to accommodate for streaming massive amounts of image data.
Communicates among processes, you can use Pipe/Mailslots/Socket, I also think while sending a stream file Shared Memory maybe the most efficient way
I've done this a few times now, in a number of different configurations. The key to making it easy for me was using the RemObjects SDK which took care of the communications part. With a thread that controls its state, I can have a connection to a server or service that is reliable, and can transfer anything from a status byte through to transferring many megabytes of data (it is recommended that you use small chunks for large data so that you have more fine grained control over errors and flow). I now have a set of high reliability templates that I can deploy to make a new variation quite easily, and it can be updated with new function calls without much hassle (first thing I do is negotiate versions between the client and server so they know what they can support). Because it all works at a high level, my code is just making "function calls" and never worrying about what the format on the wire is. Likewise I can switch from their binary format to standard SOAP or other without changing the core logic. Finally, the connections can be local, to the same machine (I use this for end user apps talking to a background service) or to a machine on the LAN or internet. All in the same code.

Android wifi connection

Hie members! ----am Boniface M - - a beginner in android[University student]..
My question is am planning to develop an android app/middleware that will act as a grid service .i.e an app for grid computing.. the application needs to be installed in 1....n devices. in the connection, one device must act as a server for all others. communication between the devices is via the wifi under the permission of the server device.which is determined by a certain algorithm[no problem here].
The problem is should i use a database that will keep track of all the services a device is running which are accessible to other devices or is there any way that i can directly keep all this information and then retrieve them as i request them from another app installed in another device.
and also how i can share files via wifi like blutooth
Thanks....
You're asking many questions in one and I'm actually unsure what you mean overall. Here's a few links that are sure be of some use...
http://developer.android.com/reference/android/os/Build.html This library is good for finding out information about the device you're running on.
http://developer.android.com/reference/android/location/Criteria.html - Criteria might be useful, lets you know what location based services you have running
Other than that, if you're looking to see if particular things are running check out this question: How to check if a service is running on Android?
If you're looking to keep a central hub of what devices have what available etc. you're going to need a middle man for what you want to do I suspect. If it was me, I'd do HTTP requests to a server, to php scripts I have written which would then read/write from a MySQL database to get information about other devices.
If you want to share files via wifi.. you're going to need an FTP server on the phone. There's an app swiFTP which does this to some degree (phone -> PC) but the concept should be the same. Take a look at it. It's a starting point! http://www.tested.com/news/how-to-transfer-files-wirelessly-to-your-android-phone/53/
Again, I'm unsure EXACTLY what you're looking to do but hopefully all of that is of some help. If it's not leave me a comment and I'll try and assist you further.
hope it helps!

Resources