Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 03-08-2010, 11:20 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 282
Default Server side of things

Hey All,

Being a 3D game developer, I have almost zero-knowledge in server-side programming and I am trying to write an app that does the below:

1. Take a photo from my iphone, save it to a file.
2. Send the file to some server
3. 3D-lize the image file received, or do other bit-wise transformations with it.
4. Fetch the processed file from the server.

I know many apps does this already and would like to know what technologies are used behind the scenes.

What I have tried so far:

1. Setup an app on Google app engine so that I can use http post methods to upload the file from the iPhone (ASIHTTPRequest used here). Java and Python tried.
2. Files are uploaded fine, but I have no idea what to do next as I heard you the file system on the app engine is read-only

Ain't too sure if I am on the right track. Perhaps I should try other technologies such as PHP? But then, where would I host this? How would I actually do manipulations to my files uploaded.

Thanks,

Spark
sparkso is offline   Reply With Quote
Old 03-08-2010, 11:37 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,558
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

So you're question is: where do I host my server-side code/application?

Anywhere you want. And for that reason, you can do manipulate the files on the server as well.
smithdale87 is offline   Reply With Quote
Old 03-08-2010, 12:06 PM   #3 (permalink)
Daddy Cool
 
MarkC's Avatar
 
Join Date: Mar 2009
Location: Yorkshire, England
Age: 100
Posts: 1,472
Default

Everything you need to upload an image is in this thread (about half way down, post UIImage) Search Results post uiimage : Iphone Noob
MarkC is offline   Reply With Quote
Old 03-09-2010, 01:31 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 282
Default

Quote:
Originally Posted by MarkC View Post
Everything you need to upload an image is in this thread (about half way down, post UIImage) Search Results post uiimage : Iphone Noob
Hey thanks guys
sparkso is offline   Reply With Quote
Old 03-16-2010, 03:12 PM   #5 (permalink)
Registered Member
 
Join Date: Feb 2010
Location: Texas
Posts: 32
Default

Quote:
Originally Posted by sparkso View Post
Hey All,

Being a 3D game developer, I have almost zero-knowledge in server-side programming and I am trying to write an app that does the below:

1. Take a photo from my iphone, save it to a file.
2. Send the file to some server
3. 3D-lize the image file received, or do other bit-wise transformations with it.
4. Fetch the processed file from the server.

I know many apps does this already and would like to know what technologies are used behind the scenes.

What I have tried so far:

1. Setup an app on Google app engine so that I can use http post methods to upload the file from the iPhone (ASIHTTPRequest used here). Java and Python tried.
2. Files are uploaded fine, but I have no idea what to do next as I heard you the file system on the app engine is read-only

Ain't too sure if I am on the right track. Perhaps I should try other technologies such as PHP? But then, where would I host this? How would I actually do manipulations to my files uploaded.

Thanks,

Spark
I would never suggest using PHP. I'm not familiar with the Google app engine but this sounds like something that could be implemented easily in Python on a cheap VPS.

My approach would be to use Apache/mod_python to accept the upload. (honestly I would just try to HTTP POST without going through the formal file upload process since you're not trying to interact with web browser.

For image processing on servers I almost always use ImageMagick it's open source and available for every platform, and is the standard for server side image processing. I always use the command line interface with a pipe to access it from inside a script. (php back in the day, or python now)

something like:
Code:
from os import popen
from mod_python import util, apache

def handler(req):
  fields = util.FieldStorage(req)
  if fields.has_key("file"):
    new_file = file(temp_fname) 
    pipe = popen("convert %s" % (temp_fname) # obviously this would be specific to your application
    req.content_type = "image/png"
    req.write(pipe.read()) # flush imagemagick's stdout stream to our request's output stream
  return apache.OK
This isn't tested code but should be enough to get you started. Before I did mobile, I did web apps so I talk a lot on my blog. (see sig)
__________________
My Dev Blog: http://rapidiphonedev.com
Rapid is offline   Reply With Quote
Old 03-18-2010, 07:22 AM   #6 (permalink)
Registered Member
 
Join Date: Apr 2009
Location: michigan
Posts: 185
Default

Quote:
Originally Posted by Rapid View Post
I would never suggest using PHP. I'm not familiar with the Google app engine but this sounds like something that could be implemented easily in Python on a cheap VPS.

My approach would be to use Apache/mod_python to accept the upload. (honestly I would just try to HTTP POST without going through the formal file upload process since you're not trying to interact with web browser.

For image processing on servers I almost always use ImageMagick it's open source and available for every platform, and is the standard for server side image processing. I always use the command line interface with a pipe to access it from inside a script. (php back in the day, or python now)

something like:
Code:
from os import popen
from mod_python import util, apache

def handler(req):
  fields = util.FieldStorage(req)
  if fields.has_key("file"):
    new_file = file(temp_fname) 
    pipe = popen("convert %s" % (temp_fname) # obviously this would be specific to your application
    req.content_type = "image/png"
    req.write(pipe.read()) # flush imagemagick's stdout stream to our request's output stream
  return apache.OK
This isn't tested code but should be enough to get you started. Before I did mobile, I did web apps so I talk a lot on my blog. (see sig)


If your server can support java servlets (a little more money than cheap hosting) than java is a good way to go. there is a 2d and 3d adavanced imaging library available.

Take a look at this.

http://www.iphonedevsdk.com/forum/ne...reply&p=183448
michelle is offline   Reply With Quote
Reply

Bookmarks

Tags
asihttprequest, php, server

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,765
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:34 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0