Application Scope Question..

Hi,

Lets say I have 2 application scopes - Drivers and Riders. I want my drivers to be able to see data from my riders. I would do this via the core.users.get(data_params, listener) method. Is this possible? Can 2 application scopes share data (and user data) this way? Or should my driver and rider users be on the same application scope?

Thanks!

Ps… Loving the new Coronium! Great work!

Hi,

First off, thanks for the kind words regarding Coronium, but more importantly, sharing your use case. This helps shape the functionality.

Accessing users on the client side is very locked down. Without knowing the username/password of your rider(s) there really is no way to access those users through the client methods, regardless of your application scope setting.

That being said, the next release contains a bunch of new user module functionality, including custom user types, OAuth linking, and more. So your timing is good since I’m working on that now.

I’d like to understand you use case a little more so I can make sure you have the functionality you need. So, with that I’m going to make some assumptions about your application, and you can correct me where I’m wrong.

I assume your drivers have some location data stored, and you would like to find users that are within that same location, who also have location data? Or, perhaps you want your drivers to have access to all the riders available, regardless of location.

Can you expand a bit on your use case? I might also be able to offer a few suggestions, as Mongo has a great geo search option that you could use along side your users.

-dev

Hi,

Thanks for the great response.

You are bang on.

  1. A driver signs up (using a different scope) and the app instantly gets their location. The app creates a new driver object which stores their location. This is updated every 3 seconds.

  2. A rider opens the app, and instantly fetches the driver data objects  and then shows where the drivers are.

Every 3 seconds the app is updating driver and user lats and longitudes.

Any suggestions/feedback?

Thanks again.

Btw… I think you guys are now heading in the right direction. Corona and Coronium are fantastic for general apps, not just games. You guys have a massive non-game/app market that you have previously ignored, where Apps can be built quicker and easier than using any other language (including react native). 

Focus on this market and you guys will explode. 

Thanks again

sounds like Uber…

May or may not be  :wink:

Hi,

@david668 - Stay tuned for the 2.4.0 release, lots of stuff that should provide helpful for your use case.

-dev

Hi,

With the new 2.4.0 release, you have two options using the new server-side Users module.

  1. Use the same scope for both apps and use the new group key when creating your users (‘drivers’ and ‘riders’ for instance). You can then use the server-side users.getGroup method. It’s only available on server-side for security purposes.

  2. Use two different scopes and use users.getWithQuery method, and supply the scope you want to search against. This is a server-side method as well.

In either case, you’ll need to create a server-side API call.

Hope that helps.

-dev

Great that helps! Will be there Geolocation features as well? What is the ETA for this update?

Sorry just saw you released the new version. Looks great - doesn’t look like there is any geolocation methods yet for Mongo?

Hi,

Geo-Spatial Queries are already part of Mongo: https://docs.mongodb.com/manual/reference/operator/query-geospatial/ and some examples here: https://docs.mongodb.com/manual/reference/operator/query/nearSphere/

You would use them with the find method: http://docs.coroniumcore.com/server/modules/mongo/#find

I’ll see if I can write up a little example as soon as I have a minute.

-dev

Hi,

First off, thanks for the kind words regarding Coronium, but more importantly, sharing your use case. This helps shape the functionality.

Accessing users on the client side is very locked down. Without knowing the username/password of your rider(s) there really is no way to access those users through the client methods, regardless of your application scope setting.

That being said, the next release contains a bunch of new user module functionality, including custom user types, OAuth linking, and more. So your timing is good since I’m working on that now.

I’d like to understand you use case a little more so I can make sure you have the functionality you need. So, with that I’m going to make some assumptions about your application, and you can correct me where I’m wrong.

I assume your drivers have some location data stored, and you would like to find users that are within that same location, who also have location data? Or, perhaps you want your drivers to have access to all the riders available, regardless of location.

Can you expand a bit on your use case? I might also be able to offer a few suggestions, as Mongo has a great geo search option that you could use along side your users.

-dev

Hi,

Thanks for the great response.

You are bang on.

  1. A driver signs up (using a different scope) and the app instantly gets their location. The app creates a new driver object which stores their location. This is updated every 3 seconds.

  2. A rider opens the app, and instantly fetches the driver data objects  and then shows where the drivers are.

Every 3 seconds the app is updating driver and user lats and longitudes.

Any suggestions/feedback?

Thanks again.

Btw… I think you guys are now heading in the right direction. Corona and Coronium are fantastic for general apps, not just games. You guys have a massive non-game/app market that you have previously ignored, where Apps can be built quicker and easier than using any other language (including react native). 

Focus on this market and you guys will explode. 

Thanks again

sounds like Uber…

May or may not be  :wink:

Hi,

@david668 - Stay tuned for the 2.4.0 release, lots of stuff that should provide helpful for your use case.

-dev

Hi,

With the new 2.4.0 release, you have two options using the new server-side Users module.

  1. Use the same scope for both apps and use the new group key when creating your users (‘drivers’ and ‘riders’ for instance). You can then use the server-side users.getGroup method. It’s only available on server-side for security purposes.

  2. Use two different scopes and use users.getWithQuery method, and supply the scope you want to search against. This is a server-side method as well.

In either case, you’ll need to create a server-side API call.

Hope that helps.

-dev

Great that helps! Will be there Geolocation features as well? What is the ETA for this update?

Sorry just saw you released the new version. Looks great - doesn’t look like there is any geolocation methods yet for Mongo?