Embed and manage Google Forms in NodeJS app - node.js

I have the following use case.
Status quo:
We have a NodeJS app running that is not publicly accessible. We'd like to introduce some kind of form to acquire some data of the users/participants and that is used for another follow-up process upon completion of the form.
As we'd like to have a quick but also nice solution, I thought about embedding a Google Form as an iFrame in the app that we have already prepared some time beforehand. The Google form also gives us some additional features regarding the form creation that I don't know would be available in any Node native libraries or would be time-consuming to build, I assume. Moreover, we are partly working in the Google world so there might be some easy and fluid workflows possible.
Goal:
Now, my goal or rather problem with using the above-mentioned method is that I don't receive any notification, leave alone the responses, upon completion of the form.
I know the responses can be saved in a Sheet in Google Drive that could be requested by the app but I still don't know when someone has filled out the form in the app so that the follow-up process in the app can immediately be triggered.
Is there any way to solve this problem? I maybe thought about a Pub/Sub topic that was pushed to the app but then, again, the app is not publicly accessible.

Related

How are real-time notification systems made in Nodejs?

I want to create a social-media website project for my peronsal portfolio. But, I am really confused about how to develop a notification system.
If user-A likes a post of user-B, user-B should be instantly notified. Once he opens it, the notification will be read. Sometimes, even multiple users need to get the same notification. How is this achieved? Not talking about some 3rd-party tool but how the architecture works and if there iss any way to efficiently implement this is Node.js.
I do not want user-B to keep hitting any API for checking. I want the data to come instantly as it does in Facebook, or even in Stack Overflow. Any solution?
I am using MEAN stack.

Google Assistant - Dynamic entities

We've recently had to pause our in-depth development with Alexa Skills,due to their Dynamic entities not being completey ready for the use case it was intended for (had confirmation direct from an AWS architect).
Documentation of same:
https://developer.amazon.com/docs/custom-skills/use-dynamic-entities-for-customized-interactions.html
https://developer.amazon.com/blogs/alexa/post/db4c0ed5-5a05-4037-a3a7-3fe5c29dcb65/use-dynamic-entities-to-create-personalized-voice-experiences
Regardless, we've since been making a POC for Google Assistant, as have heard of their equivalent (Dialogflow dynamic enity).
The problem we having is that this too doesn't seem to be loading data dynamically.
Our expected result is to; load data (dynamically), into a new slot that would be used during the action.
i.e. load a list of specific names at runtime, that can then be used for lookup while using the app.
Creating a new static lookup slot (within the console) with ±5 set names (unique and not common) work fine and everytime, however, as soon as you load those names dynamically, they are not recognized when spoken.
We've seen similar issues that all seem to be resolved, using POST calls to DialogFlow, however, we are unable to replicate this in a runtime environment.
Dialogflow dynamic enity issue
Has anyone had similar issues with this and managed to get it working as expected?
If so, would you mind please sharing some additional documentation that could help with an example of same? I suspect we are really close but are missing something simple.
PS - I have not pasted example code here deliberately, as I am after documentation and examples of same, I'd rather not confuse the topic - unless required.
Dialogflow refers to these as session entities, since they are Entity Types that contain values that you set during a session, and that only maintain those values for that user during that session.
You can access them using a REST endpoint for the session entity types, or use one of the client libraries that can provide access.
However...
While this has worked fine in the past there seem to be some problems currently with Session Entities. (That SO question does provide some code and examples, so you may want to take a look at it anyway in case it does work for you.) This is opened as a bug in their issue tracker, but there has been no public acknowledgement from Google about it.

Hybrid App Development, Database-Driven Content

I've been doing a lot of research, and perhaps just need a few dots connected.
I have an idea for a mobile app/website that contains lists of local eating/drinking establishments along with the deals/specials they offer each day. The idea is to create an app that people can refer to in order to save money on a night out.
I'm familiar enough with HTML/CSS/JS to create a functioning website, but when it comes to backend I'm a little confused. Editing the markup in order to reflect changes (e.g. a new deal starts or new establishment opens up) is a bit cumbersome. Now I know I want a database with my information ready to be displayed on my page. Does this mean that I need to develop my own API for everything, and then make sure it integrates with the hosting website that I end up choosing?
I feel like I'm missing something that should make it obvious what the next step is. Can anyone offer any advice?
The short answer is yes, you are exactly right.
The long answer is that is definetly one way to do it. But, for large projext just using JS can get quite cumbersomoe on your client end. Usually the first level would be using something like ajax. It's a great way to start and you can go a long way with just ajax. This is acutually where most people "start" when using just javascript to make api calls. The next level would be to use a framework like Angular. This will of course do more for you than just help handle api calls and it requires a larger investment in learning.
So that is all client side...
Now for the server side part... When you publish a website you are now dealing with "server-side" content. You have taken your static content and it is served up from the server but it's always the same static content from the server then it becomes dynamic on the client when all the javascript starts getting parsed.
The API is another server side component. But instead of being static like your pages, a bunch of files just sitting there, it is an actual application on the server. It takes a command via an api request and then does its thinking and then spits out a response object dynamically to the requester, which in this case will be the JS on your site.
Now, if you don't like the idea of learning to make your own API there are resources out there that will host an api for you and give you a gui to build your own API. I can't recommend one because I have never used one, but I do work with businesses that do and they love the fact they don't have to hire a dev to make thier apis. The downside is they are tied to that service and limited to the functionality that the service offers. It's not a big limitation as the services are quire powerful but if you are going to be managing complex data sets then it would probably be better to learn to make your own api.
Hope that clears things up a bit for you!

How do I test restful APIs with constantly changing and random user defined data

I'm developing a clean-up API (github.com/Shadowys/btapi) for a Mediawiki application, Baka-Tsuki to pull meaningful data from the novel project pages like author, volume lists and cover images. The pages are user-defined and formatted in various ways decided by the translator(user). The pages are also updated and created daily, with the creation of new formats occurring sporadically. However, the API parser is able to handle most, if not all of the current pages, no matter their format.
Baka-Tsuki is not going to change into a database-based application in the near future, since the wiki is currently the most user friendly and cost-effective way to share translations, and we don't have enough developers to constantly work on a new application.
I'm looking into using mocha to automate testing of the API but as the input data constantly changes, testing is nearly impossible without checking every page available. I've looked at twitter and facebook testing methods but they have constantly formatted user input.
Is this case, which testing method should I refer to? Should I run the test simply based on the types returned, and the availability of the values returned or do I have to make a copy test-page to stimulate testing?

How do BAAS solutions both allow custom code and keep things secure?

Baas, backend-as-a-service, solutions like Parse.com and StackMob allow application developers to add and use custom code to run server-side business logic. I'm interested in learning how you could add functions to the app server without disruptions to other applications and keep malicious code from accessing the system or data they shouldn't.
I've searched for any posts or disclosures of how Parse or StackMob might have built up their architectures and have come up empty.
Take a look at how Kii Cloud provides custom server side code that you can add to the backend. It basically runs in a sandbox with some access to the server side API (but it's well defined, the user can only access what they are intended to access). An there are also resource limitations such as time constraints (a piece of server code can take do processing forever).
This is not exactly the internals of Kii but I think server side code in most MBaaS providers reflects on what's the correct way to add server side logic on a running system without disrupting the system.
Please head to community.kii.com if you want to discuss internals with the engineers (we're happy to chat with you).

Resources