Use REST for the client/Server communication - it's lightweight and well
defined.
There's plenty of resources available on the internet with examples.
Return JSON data from the server to the client - again it's a well defined
method for returning structured data.

Start simple - forget threading and performance - just get it working first.
Use something simple server side to write your app in - PHP/Rails - whatever
you feel comfortable writing.

When it comes to thinking about performance:
  1) Start with the server - are you using the right type of webserver
(Apache, ngnix, etc) is the config right (gzip headers, cache lifetime, etc)
and do you have simple accelerators installed (APC).
  2) Measure & profile your app on the server - where is it spending most of
it's time, can you optimise the code, cache locally expensive operations
(using something like memcached).  Start with the areas that will have the
biggest impact on performance based on your profiling.


Then start thinking about how you app will scale over time as the traffic
increases.
Will you be scaling up (adding more resources to the server) or out (adding
more servers) - or a combination of the two.


On 20 March 2010 12:45, raqz <[email protected]> wrote:

> hey thanks Yahel...
>
> Could you please suggest me a good/efficient way to communicate with
> the server.
> I could think of two options
> 1) Use http post methods to send data to a php script at the server
> which would later call the google api's written in another java
> program (jar)\or use php to use google api's (if its possible) to find
> nearby restaurants and send the list back to client.
> 2) Use simple java socket programming. The server has a jar file that
> supports multi threading and it does the job of finding restaurants
> and sending the list.
>
> What do you have to say about it.
>
> Thanks,
> Raqeeb
>
> On Mar 20, 4:56 am, Yahel <[email protected]> wrote:
> > Hi raqz,
> >
> > It sounds like the perfect job for a web service. The gps coordinate
> > are sent to the server which computes the complete list of restaurant
> > nearby.
> >
> > Pros :
> > - You can make your app available on any platform(iphone, facebook
> > app) without a need to change the server side code.
> > - You don't use any resources on the phone either CPU or memory(no
> > databases), good for users.
> > - No need for synching overhead and no chance of out of synch data
> >
> > Cons :
> > - Can't work when the mobile is offline
> > - You are not using the resources of the individual phones. If your
> > app is successful, the load on your server could get quite high
> >
> > Obviously, the first con, isn't really a con, that would be a very
> > good problem to have if you know you are going to monetize your app :D
> >
> > Maybe you can use some caching techniques to relieve some of the load
> > on the server.
> > For example if someone sends gps coordinate in San Francisco, download
> > a zip file of all the restaurants there.
> > And then use that local database for a few days or so before
> > resynching.
> > That removes one of the pros in my list, but since it also remove the
> > first con, that doesn't count :D
> >
> > Yahel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe from this group, send email to android-developers+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to