1

I am making iOS poll App, each device is able to make one vote per month.

When vote is made on iOS app, following is send to BaaS (UDID, vote, local_timestemp)
Then BaaS need to check that this UDID has not voted this month already:

  • if it has voted, than return "NO" to iOS device
  • if it has not voted in this month:
    • then return local_timestemp to iOS device
    • save (UDID, vote, local_timestemp) to DB

There is also view controller for showing current votes from all devices.
This will be polled every N seconds/minutes, so that new votes are updated.
This should return number of votes for each option, like is there are two options than return {1: 500, 2: 340}, this mean option one have 500 votes and option two have 340 votes.

I am also have question regarding how to get current votes from all devices ?
Is it better to compute number of votes for each option every time when they are requested.
Or should I use counter when new vote is updated, here I see problem of synchronization.
Or justy to update counter every N second/minutes ?

I am looking for BaaS that provide service for these features.
I have not preference for any BaaS provider.
But BaaS need to provide ability to run custom bushes logic, for this poll app to work.

WebOrCode
  • 6,852
  • 9
  • 43
  • 70

2 Answers2

1

Parse.com is one of the best to help you in your case. You can also run Cloud Code, and Jobs each N minutes. Their documentation is pretty much straightforward and simple. And it's for free! https://parse.com/docs/ios_guide#top/iOS

Dani
  • 1,228
  • 1
  • 16
  • 26
0

Unfortunately, Parse has shut down. Why don't you try out Hasura instead. It should prove to fit your needs. Check out compare to see how Hasura compares with other providers and also, explore to check out everything that is possible with Hasura (you will end up with a blog web app as well as a todo web app deployed live in under 15 mins).

Hasura has a lot of advantages over other providers as it lets you own your own data and infrastructure, you can also write your custom code in the language of your own choosing.

Jackspicer
  • 1,787
  • 2
  • 13
  • 21