Beginners question

Hi guys, I would firstly like to apologise for my lack of in depth technical knowledge but i am a self taught programmer getting to grips with Xcode, Swift & Python at the moment. My IOS APP needs are as follows & I am wondering if CouchBase can fulfil them ?..

I need to set up a scheduled script / program to pull regular JSON data from public API streams (twitter, Facebook etc) and place / sort into database fields.

I then need to perform calculations / formulas on some of those fields to create totals.

I then need to make calls to the data from my APP / users through my Swift code, and also make relevant connections from a user database & the API data.

Could I store my APP image & source files through Couchbase server too ?

I hope this makes sense & someone could advise on possible solution with Couchbase.

Yes, you should be able to do all this.

The key is to do all data modifications through Sync Gateway. So, if you ingest data from Twitter, for example, you’d want to decide how you’re going to store that in documents. Then do your computations update those documents, most likely using either the Swagger client for Python, or by hooking in to the native Java Couchbase Lite implementation on the server side (or making the REST calls yourself).

You can do queries and such with N1QL on Couchbase Server, but you should treat any mobile buckets as read-only.

Regarding keeping the app image and source files on the server, I’m not sure I see the point…? You are going to have a hard time installing the app from there.

Thanks for the reply could I ask you to simplify some steps here. When using the Swagger client or making REST calls myself do I automate the frequency of those data pulls with a piece of JavaScript code that sits in my Couchbase server ? and would this code contain details of the frequency the API pulls would trigger… could you give me an example. Is the process of sorting resulting data into various fields a simple one, and finally where could I find documentation regarding Swift code examples I would need to populate my APP table view cells with linked database fields? Thankyou for your help.

@cinecam Sorry Dan, I didn’t see your reply earlier.

You’ve got a lot of details here. It’s a little hard to follow.

  • Ingestion script

This piece is a separate app running somewhere, right? So it pulls data from Twitter or whatever. I think, at least in the case of Twitter, you can find libraries that will pull the information as straight JSON. Sorting that is easy. You could even write each record as is to the database as a single document.

I had assumed that’s the part you were using Python for. Is that right?

You might want to walk through the whole training guide if possible.

Also, for follow up, you might want to ask a new question under the Mobile category. This is more of a mobile question, and that’s where the mobile engineers look.

Thankyou hod.greeley for your input here. You got that right about the Python use and your information here has really got me started on the right track. I will follow up in the Mobile forums should i need further assistance - thanks !