You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by "Ralph Bergmann | the4thFloor.eu" <ra...@the4thfloor.eu> on 2015/02/18 14:11:26 UTC

How to connect a mobile app (Android/iOS) with a Spark backend?

Hi,


I have dependency problems to use spark-core inside of a HttpServlet
(see other mail from me).

Maybe I'm wrong?!

What I want to do: I develop a mobile app (Android and iOS) and want to
connect them with Spark on backend side.

To do this I want to use Tomcat. The app uses https to ask Tomcat for
the needed data and Tomcat asks Spark.

Is this the right way? Or is there a better way to connect my mobile
apps with the Spark backend?

I hope that I'm not the first one who want to do this.



Ralph


Re: How to connect a mobile app (Android/iOS) with a Spark backend?

Posted by Sean Owen <so...@cloudera.com>.
This does not sound like a Spark problem -- doesn't even necessarily
sound like a distributed problem. Are you of a scale where building
simple logic in a web tier that queries a NoSQL / SQL database doesn't
work?

If you are at such a scale, then it sounds like you're describing a
very high volume of small, very low latency queries. Spark is not
designed for that. However it could do some crunching in the
background and feed a serving layer technology like a NoSQL store with
recent results, for example.

On Wed, Feb 18, 2015 at 3:23 PM, Ralph Bergmann | the4thFloor.eu
<ra...@the4thfloor.eu> wrote:
> Hi,
>
>
> Am 18.02.15 um 15:58 schrieb Sean Owen:
>> That said, it depends a lot on what you are trying to do. What are you
>> trying to do? You just say you're "connecting" to spark.
>
> There are 2 tasks I want to solve with Spark.
>
> 1) The user opens the mobile app. The app sends a pink to the backend.
> When this happens the backend has to collect some data from other server
> via http and has to do some stuff with this data.
>
> 2) The mobile app can download this data from 1. In this case the
> backend has to find/create the right data (depending on user location,
> rating, etc.)
>
>
> Ralph
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: How to connect a mobile app (Android/iOS) with a Spark backend?

Posted by "Ralph Bergmann | the4thFloor.eu" <ra...@the4thfloor.eu>.
Hi,


Am 18.02.15 um 15:58 schrieb Sean Owen:
> That said, it depends a lot on what you are trying to do. What are you
> trying to do? You just say you're "connecting" to spark.

There are 2 tasks I want to solve with Spark.

1) The user opens the mobile app. The app sends a pink to the backend.
When this happens the backend has to collect some data from other server
via http and has to do some stuff with this data.

2) The mobile app can download this data from 1. In this case the
backend has to find/create the right data (depending on user location,
rating, etc.)


Ralph


Re: How to connect a mobile app (Android/iOS) with a Spark backend?

Posted by Sean Owen <so...@cloudera.com>.
Although you can do lots of things, I don't think Spark is something
you should think of as a synchronous, real-time query API. So, somehow
trying to use it directly from a REST API is probably not the best
architecture.

That said, it depends a lot on what you are trying to do. What are you
trying to do? You just say you're "connecting" to spark.

On Wed, Feb 18, 2015 at 1:11 PM, Ralph Bergmann | the4thFloor.eu
<ra...@the4thfloor.eu> wrote:
> Hi,
>
>
> I have dependency problems to use spark-core inside of a HttpServlet
> (see other mail from me).
>
> Maybe I'm wrong?!
>
> What I want to do: I develop a mobile app (Android and iOS) and want to
> connect them with Spark on backend side.
>
> To do this I want to use Tomcat. The app uses https to ask Tomcat for
> the needed data and Tomcat asks Spark.
>
> Is this the right way? Or is there a better way to connect my mobile
> apps with the Spark backend?
>
> I hope that I'm not the first one who want to do this.
>
>
>
> Ralph
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: How to connect a mobile app (Android/iOS) with a Spark backend?

Posted by Arush Kharbanda <ar...@sigmoidanalytics.com>.
I am running Spark Jobs behind tomcat. We didn't face any issues.But for us
the user base is very small.

The possible blockers could be
1. If there are many users of the system. Then jobs might have to w8, you
might want to think about the kind of scheduling you want to do.
2.Again if the no of users is a bit high, Tomcat doesn't scale really
well.(Not sure how much of a blocker it is).

Thanks
Arush

On Wed, Feb 18, 2015 at 6:41 PM, Ralph Bergmann | the4thFloor.eu <
ralph@the4thfloor.eu> wrote:

> Hi,
>
>
> I have dependency problems to use spark-core inside of a HttpServlet
> (see other mail from me).
>
> Maybe I'm wrong?!
>
> What I want to do: I develop a mobile app (Android and iOS) and want to
> connect them with Spark on backend side.
>
> To do this I want to use Tomcat. The app uses https to ask Tomcat for
> the needed data and Tomcat asks Spark.
>
> Is this the right way? Or is there a better way to connect my mobile
> apps with the Spark backend?
>
> I hope that I'm not the first one who want to do this.
>
>
>
> Ralph
>
>


-- 

[image: Sigmoid Analytics] <http://htmlsig.com/www.sigmoidanalytics.com>

*Arush Kharbanda* || Technical Teamlead

arush@sigmoidanalytics.com || www.sigmoidanalytics.com