theblazecoders / smart-car-parking

Smartest Car Parking on the Planet 🌏
https://theblazecoders.github.io/smart-car-parking
12 stars 5 forks source link

Use MongoDB or Firebase in the future #6

Closed harshkhandeparkar closed 5 years ago

harshkhandeparkar commented 5 years ago

For now, JSON is enough but in the future, the data will have to be managed on mongodb or potentially even Firebase.

To make the database vertically as well as horizontally scalable

harshkhandeparkar commented 5 years ago

Need your help here, @sahil-patel6

sahil-patel6 commented 5 years ago

mongo-db would be better if we want to make everything in our own way. IF we choose firebase then we might have to follow their rules. At this point i dont know

harshkhandeparkar commented 5 years ago

Firebase is long term, for deployment. For now, let's use mongodb.

sahil-patel6 commented 5 years ago

Are you planning to increase the number of towers??And btw it should be called floors

On Wed, 3 Apr, 2019, 16:36 Sahil Patel, goal.sahil6@gmail.com wrote:

Then we have to change whole codebase. I mean we are working with database so more changes is required. Should I write from scratch

On Wed, 3 Apr, 2019, 16:34 Harsh Khandeparkar, notifications@github.com wrote:

Firebase is long term, for deployment. For now, let's use mongodb.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479442890, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQYoO8oRvSFb2usw-SeZ-27nTnTGuks5vdIrZgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Each tower has different floors

sahil-patel6 commented 5 years ago

Then we have to change whole codebase. I mean we are working with database so more changes is required. Should I write from scratch

On Wed, 3 Apr, 2019, 16:34 Harsh Khandeparkar, notifications@github.com wrote:

Firebase is long term, for deployment. For now, let's use mongodb.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479442890, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQYoO8oRvSFb2usw-SeZ-27nTnTGuks5vdIrZgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

I am planning on increasing it but want to make it changeable as now it is hardcoded as 6.

harshkhandeparkar commented 5 years ago

Mongo just stores the things as js objects right?

harshkhandeparkar commented 5 years ago

Now also all the tower info is stored as an array of objects

sahil-patel6 commented 5 years ago

Yeah it is similar to JSON format

On Wed, 3 Apr, 2019, 16:44 Harsh Khandeparkar, notifications@github.com wrote:

Mongo just stores the things as js objects right?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479445583, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQZnr90LxlfvKXUwi450aRQzmUOv-ks5vdI0WgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

We can make one admin that can change no of towers and floors or anything

On Wed, 3 Apr, 2019, 16:45 Harsh Khandeparkar, notifications@github.com wrote:

Now also all the tower info is stored as an array of objects

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479445772, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQbvddLMvmjJ5luLS_sZccPEOe-D6ks5vdI1AgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

:+1: go ahead. Since it is similar to json, you won't have to take too much trouble. Just delete the codethat updates the file on the pc. The info itself is stored as a js object.

harshkhandeparkar commented 5 years ago

+1 for the admin as well

sahil-patel6 commented 5 years ago

Ok

On Wed, 3 Apr, 2019, 16:52 Harsh Khandeparkar, notifications@github.com wrote:

+1 for the admin as well

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479447748, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQd9j0YmFVSPZY-IiRTHuEp0gLyoTks5vdI7ngaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

Is Arduino code ready??

On Wed, 3 Apr, 2019, 16:53 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 16:52 Harsh Khandeparkar, notifications@github.com wrote:

+1 for the admin as well

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479447748, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQd9j0YmFVSPZY-IiRTHuEp0gLyoTks5vdI7ngaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Almost ready.

sahil-patel6 commented 5 years ago

Ok

On Wed, 3 Apr, 2019, 16:55 Harsh Khandeparkar, notifications@github.com wrote:

Almost ready.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479448776, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQQvglDjrC-zuV4DfRjafRew4ry8yks5vdI_CgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Currently the frontend only tracks the parking lots. We want to be able to book parking lots. This is why mongo and android apps are important.

sahil-patel6 commented 5 years ago

I still didn't understand what is tower??

On Wed, 3 Apr, 2019, 17:16 Harsh Khandeparkar, notifications@github.com wrote:

Currently the frontend only tracks the parking lots. We want to be able to book parking lots. This is why mongo and android apps are important.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479454943, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQUiGd4QVvwWQ39Ro4QiTXJsfoSDqks5vdJSdgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Consider them as different buildings with 6 or any amount of parking lots. Each tower has rotatingparking lots. Japan has something like this.

sahil-patel6 commented 5 years ago

So if you are thinking of towers as building of parking lots then there should be number of floors and in each floor there should no of parking slots,right??

On Wed, 3 Apr, 2019, 17:24 Harsh Khandeparkar, notifications@github.com wrote:

Consider them as different buildings with 6 or any amount of parking lots. Each tower has rotatingparking lots. Japan has something like this.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479457375, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQTfihRf2vHqUqbNJy5hj3iopBk2wks5vdJaMgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

You will get to know what towers are if you see the project model or ask laukik sir to explain in detail. I don't have time.

harshkhandeparkar commented 5 years ago

Im okay with firebase. You can do the initial implementation. Btw whose account will be used?

sahil-patel6 commented 5 years ago

If we use firebase then there is no need to write backend code so I can start writing Android app and we can create another Gmail account for firebase

On Wed, 3 Apr, 2019, 18:29 Harsh Khandeparkar, notifications@github.com wrote:

Im okay with firebase. You can do the initial implementation. Btw whose account will be used?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479478157, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQVQ-9bNE8BmwvEpBOvwMUkzZfqIvks5vdKWugaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

No we do need backend code.

harshkhandeparkar commented 5 years ago

It is not just the database that we manage.

harshkhandeparkar commented 5 years ago

We will have to somehow push notifications to arduino as well.

sahil-patel6 commented 5 years ago

For??

On Wed, 3 Apr, 2019, 18:33 Harsh Khandeparkar, notifications@github.com wrote:

No we do need backend code.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479479604, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQRA5iHp_6C8CuIxTxnSE4r4_5utSks5vdKaTgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

We also want to accept requests from arduino so we will have to use firebase clud funcs for it.

sahil-patel6 commented 5 years ago

So you want to create backend for Arduino. Is there any module which can use internet and can use API

On Wed, 3 Apr, 2019, 18:33 Harsh Khandeparkar, notifications@github.com wrote:

We will have to somehow push notifications to arduino as well.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479479797, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQa-4Yor3tDDecb8es2_KF92YRghOks5vdKa0gaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

There is no need of cloud functions because we can add security rules in Firestore that it can contact with Arduino

On Wed, 3 Apr, 2019, 18:34 Harsh Khandeparkar, notifications@github.com wrote:

We also want to accept requests from arduino so we will have to use firebase clud funcs for it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479480091, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXrzBIdqCkbz77pg8GG7aE1buBtRks5vdKbjgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Yes we have a module which can connect to the inet and create post/get/any http request.

sahil-patel6 commented 5 years ago

How will you contact firebase using Arduino??

On Wed, 3 Apr, 2019, 18:36 Sahil Patel, goal.sahil6@gmail.com wrote:

There is no need of cloud functions because we can add security rules in Firestore that it can contact with Arduino

On Wed, 3 Apr, 2019, 18:34 Harsh Khandeparkar, notifications@github.com wrote:

We also want to accept requests from arduino so we will have to use firebase clud funcs for it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479480091, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXrzBIdqCkbz77pg8GG7aE1buBtRks5vdKbjgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

We need cloud funcs to accept post reqs from arduino. Arduino cannot use firebase api directly.

sahil-patel6 commented 5 years ago

Which module is it??

On Wed, 3 Apr, 2019, 18:37 Sahil Patel, goal.sahil6@gmail.com wrote:

How will you contact firebase using Arduino??

On Wed, 3 Apr, 2019, 18:36 Sahil Patel, goal.sahil6@gmail.com wrote:

There is no need of cloud functions because we can add security rules in Firestore that it can contact with Arduino

On Wed, 3 Apr, 2019, 18:34 Harsh Khandeparkar, notifications@github.com wrote:

We also want to accept requests from arduino so we will have to use firebase clud funcs for it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479480091, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXrzBIdqCkbz77pg8GG7aE1buBtRks5vdKbjgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

Sorry that I forget that Arduino cannot directly contact with firebase

On Wed, 3 Apr, 2019, 18:37 Harsh Khandeparkar, notifications@github.com wrote:

We need cloud funcs to accept post reqs from arduino. Arduino cannot use firebase api directly.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481171, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQaZygytKli2nqyKfAFL7965Ujpb8ks5vdKeTgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

What is the name of the module that can request data from internet??

On Wed, 3 Apr, 2019, 18:38 Sahil Patel, goal.sahil6@gmail.com wrote:

Sorry that I forget that Arduino cannot directly contact with firebase

On Wed, 3 Apr, 2019, 18:37 Harsh Khandeparkar, notifications@github.com wrote:

We need cloud funcs to accept post reqs from arduino. Arduino cannot use firebase api directly.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481171, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQaZygytKli2nqyKfAFL7965Ujpb8ks5vdKeTgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

sahil-patel6 commented 5 years ago

Ok

On Wed, 3 Apr, 2019, 18:39 Harsh Khandeparkar, notifications@github.com wrote:

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481953, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXXTI5VkogzXKCRG0s-QQXEkrMi4ks5vdKgTgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

I should add authentication right for users??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 18:39 Harsh Khandeparkar, notifications@github.com wrote:

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481953, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXXTI5VkogzXKCRG0s-QQXEkrMi4ks5vdKgTgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

Do we have that module in ATL lab??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

I should add authentication right for users??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 18:39 Harsh Khandeparkar, notifications@github.com wrote:

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481953, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXXTI5VkogzXKCRG0s-QQXEkrMi4ks5vdKgTgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Yes, we have 5 nodemcu and 10 of those modules!

sahil-patel6 commented 5 years ago

Yeah I saw that module in ATL lab but it is now working I think so because I tried once

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Do we have that module in ATL lab??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

I should add authentication right for users??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 18:39 Harsh Khandeparkar, notifications@github.com wrote:

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481953, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXXTI5VkogzXKCRG0s-QQXEkrMi4ks5vdKgTgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

+1 for the auth.

sahil-patel6 commented 5 years ago

I am not sure if it is working or not

On Wed, 3 Apr, 2019, 18:42 Sahil Patel, goal.sahil6@gmail.com wrote:

Yeah I saw that module in ATL lab but it is now working I think so because I tried once

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Do we have that module in ATL lab??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

I should add authentication right for users??

On Wed, 3 Apr, 2019, 18:40 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 18:39 Harsh Khandeparkar, < notifications@github.com> wrote:

It is called ESP8266. Actually we are going to use NODEmcu board instead of an arduino. Google it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479481953, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQXXTI5VkogzXKCRG0s-QQXEkrMi4ks5vdKgTgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

Ok

On Wed, 3 Apr, 2019, 18:42 Harsh Khandeparkar, notifications@github.com wrote:

+1 for the auth.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479483062, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQYF_IbNOpLZm_TozbUgztIbkzUCOks5vdKjIgaJpZM4cYx9a .

sahil-patel6 commented 5 years ago

1) create firebase initialisation 2) create API for Arduino 3) Create Android app

Above are the correct steps right??

On Wed, 3 Apr, 2019, 18:43 Sahil Patel, goal.sahil6@gmail.com wrote:

Ok

On Wed, 3 Apr, 2019, 18:42 Harsh Khandeparkar, notifications@github.com wrote:

+1 for the auth.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479483062, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQYF_IbNOpLZm_TozbUgztIbkzUCOks5vdKjIgaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

So,

  1. Login and user management is different from realtime tracking but on the same app/site. Users can be used for booking in advance.
  2. Arduino will manage the towers and the parking lots.
  3. The password will be entered at the parking lot, will be given to the arduino.
  4. Backend is for keeping everything in sync.
sahil-patel6 commented 5 years ago

Backend will be for Arduino right?? On Wed, 3 Apr, 2019, 18:45 Harsh Khandeparkar, notifications@github.com wrote:

So,

  1. Login and user management is different from realtime tracking but on the same app/site. Users can be used for booking in advance.
  2. Arduino will manage the towers and the parking lots.
  3. The password will be entered at the parking lot, will be given to the arduino.
  4. Backend is for keeping everything in sync.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HarshKhandeparkar/smart-car-parking/issues/6#issuecomment-479483982, or mute the thread https://github.com/notifications/unsubscribe-auth/AROeQTscACSunrQfBxRh_RL_tTQ0MlN_ks5vdKligaJpZM4cYx9a .

harshkhandeparkar commented 5 years ago

Yes.