Should I save to Firestore from Android client or from Firebase Function?












1














I have an android app and I would like to know based on your experience what is better in terms of security and costs. I am not sure if it is better to save to the database from my client or from function. Looks like by communicating to firebase functions from my app and then writing to the database will be more expensive than just writing to the database from the app but Im willing to pay the price if it is more secure. Just want to know what you think about it. Thank you.










share|improve this question







New contributor




Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1














    I have an android app and I would like to know based on your experience what is better in terms of security and costs. I am not sure if it is better to save to the database from my client or from function. Looks like by communicating to firebase functions from my app and then writing to the database will be more expensive than just writing to the database from the app but Im willing to pay the price if it is more secure. Just want to know what you think about it. Thank you.










    share|improve this question







    New contributor




    Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1







      I have an android app and I would like to know based on your experience what is better in terms of security and costs. I am not sure if it is better to save to the database from my client or from function. Looks like by communicating to firebase functions from my app and then writing to the database will be more expensive than just writing to the database from the app but Im willing to pay the price if it is more secure. Just want to know what you think about it. Thank you.










      share|improve this question







      New contributor




      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have an android app and I would like to know based on your experience what is better in terms of security and costs. I am not sure if it is better to save to the database from my client or from function. Looks like by communicating to firebase functions from my app and then writing to the database will be more expensive than just writing to the database from the app but Im willing to pay the price if it is more secure. Just want to know what you think about it. Thank you.







      android firebase google-cloud-firestore google-cloud-functions






      share|improve this question







      New contributor




      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      Alberto PR

      82




      82




      New contributor




      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Alberto PR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          1 Answer
          1






          active

          oldest

          votes


















          2














          In terms of costs, there is no difference in writing data from the client or using cloud functions. No matter what you choose to use, the cost will be the same.



          Regarding security, I recommend you read Cloud Firestore Security Rules. So you can write your own security rules according to your app use-case.






          share|improve this answer





















          • Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
            – Alberto PR
            2 days ago










          • If you write the security rules in a correct way, definitely yes!
            – Alex Mamo
            2 days ago











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Alberto PR is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945014%2fshould-i-save-to-firestore-from-android-client-or-from-firebase-function%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          In terms of costs, there is no difference in writing data from the client or using cloud functions. No matter what you choose to use, the cost will be the same.



          Regarding security, I recommend you read Cloud Firestore Security Rules. So you can write your own security rules according to your app use-case.






          share|improve this answer





















          • Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
            – Alberto PR
            2 days ago










          • If you write the security rules in a correct way, definitely yes!
            – Alex Mamo
            2 days ago
















          2














          In terms of costs, there is no difference in writing data from the client or using cloud functions. No matter what you choose to use, the cost will be the same.



          Regarding security, I recommend you read Cloud Firestore Security Rules. So you can write your own security rules according to your app use-case.






          share|improve this answer





















          • Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
            – Alberto PR
            2 days ago










          • If you write the security rules in a correct way, definitely yes!
            – Alex Mamo
            2 days ago














          2












          2








          2






          In terms of costs, there is no difference in writing data from the client or using cloud functions. No matter what you choose to use, the cost will be the same.



          Regarding security, I recommend you read Cloud Firestore Security Rules. So you can write your own security rules according to your app use-case.






          share|improve this answer












          In terms of costs, there is no difference in writing data from the client or using cloud functions. No matter what you choose to use, the cost will be the same.



          Regarding security, I recommend you read Cloud Firestore Security Rules. So you can write your own security rules according to your app use-case.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Alex Mamo

          39.3k72758




          39.3k72758












          • Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
            – Alberto PR
            2 days ago










          • If you write the security rules in a correct way, definitely yes!
            – Alex Mamo
            2 days ago


















          • Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
            – Alberto PR
            2 days ago










          • If you write the security rules in a correct way, definitely yes!
            – Alex Mamo
            2 days ago
















          Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
          – Alberto PR
          2 days ago




          Yeah, I have read about security rules, so you think it is safe enough by just implementing the security rules?
          – Alberto PR
          2 days ago












          If you write the security rules in a correct way, definitely yes!
          – Alex Mamo
          2 days ago




          If you write the security rules in a correct way, definitely yes!
          – Alex Mamo
          2 days ago










          Alberto PR is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Alberto PR is a new contributor. Be nice, and check out our Code of Conduct.













          Alberto PR is a new contributor. Be nice, and check out our Code of Conduct.












          Alberto PR is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945014%2fshould-i-save-to-firestore-from-android-client-or-from-firebase-function%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mossoró

          Error while reading .h5 file using the rhdf5 package in R

          Pushsharp Apns notification error: 'InvalidToken'