Angulardart + Mongodb - mongodb

I just tried angulardart, I want to use mongodb as a database, I use package: mongo_dart, this is my code
main.dart
can be seen, I want to retrieve data from the Mongo database "contact-db" collection "contact-collection" then display it on the console, but I get this error
error in console chrome
"dart_sdk.js:4835 Uncaught core.UnsupportedError.new {Symbol(UnsupportedError.message): "Socket constructor", Symbol(_error): Error
at Object.dart.throw (http://localhost:8080/packages/$sdk/dev_compiler/amd/dart_sdk.js:483…"
what I want to ask is:
Is this error from a package, if there is a solution for this error?
does this error come from my code, if so please give me a solution?
Is there another way to use it so that I can use angulardart with mongodb as a database?
Thank you in advance

First of all, mongodb can only be accessed from a server-side application. Saying that, you would need to create 2 applications, one for client-side written using angular-dart and another one for the server-side using shelf maybe.
Right now the only databases that allows connecting directly from the client-side are firebase and firestore.

Related

How to retrieve streamingdata from dataservice and use it in Pentaho CDE Dashboard?

I'm trying to display incoming streamingdata in a Pentaho dashboard. The incoming data are simple strings, which I would just like to display at the dashboard for now.
I created a kettle transformation, in which I bound a dataservice to the last step(MQTT-Producer).
Within spoon, I tested the service and it seems to work fine.
After uploading the kettle file, the service showed up in the service list (http://localhost:9090/pentaho/kettle/listServices).
Working with the dashboard editor, I use 'streaming over dataservices' from the 'DATASERVICES Queries' as my datasource.
At this point I didn't seem to have any success an was just trying out different panel options and dataservice properties.
I was following those tutorials:
https://help.pentaho.com/Documentation/8.2/Products/Data_Integration/Data_Services
https://help.pentaho.com/Documentation/8.2/Products/CTools/Create_Streaming_Service_Dashboard
What is it that I'm doing wrong?
Any help is appreciated.
cheers
update:
I changed the incoming streaming data to be two doubles.
after some more playing around, I did connect to the data service, using an external tool. I did see the expected values within the database. My dashboard, however, still shows this error message:
Error processing component (ccclinechart)
The same kind of error occurs, when I try to view the sample real time dashboard. It can't process the chartComponent. Maybe I need to reconfigure some other things?
Found the mistake.
Something went wrong with the Ports. After switching back to the default(8080) it worked just fine.
There might be another way to adjust your ports-settings to the problem, but the easiest way to deal with this sort of thing is to switch back to default settings.

How and which database to use with NWjs offline windows app to store data

i made a simplest application in nwjs which just takes an input of name .
now i can't store this value permanently because app is not connected with any database .
i know about mongodb but don't know how to integrate with javascript app.
i watched some tutorials how to use mongodb with apps but they in tutorials always use cmd to first start server (now a general software don't require , user to start servers manually etc).
Please help me if there is a way to store, fetch and perform other operations on data offline.
what i am missing ? Thanks
You may be looking for:
NeDB, a Mongo-like offline in-memory database
LinvoDB3, same than NeDB, but not in-memory (slower, but more scalable in terms of size)
LocalStorage a Web API

Bluemix cloudant: Sudden errors being thrown by service

We are using Node.js module nano to interact with Cloudant instance on Bluemix. Suddenly today we have started getting the below errors while getting data from a view in a Cloudant instance. Any clue what might be wrong?
[{couch_os_process,prompt,3,[{file,"src/couch_os_process.erl"},{line,65}]},
{couch_query_servers,'-map_docs/2-fun-1-',2,
[{file,"src/couch_query_servers.erl"},{line,243}]},
{lists,map,2,[{file,"lists.erl"},{line,1237}]},
{couch_query_servers,map_docs,2,
[{file,"src/couch_query_servers.erl"},{line,239}]},
{couch_view_updater,view_compute,2,
[{file,"src/couch_view_updater.erl"},{line,256}]},
{couch_view_updater,do_map,2,
[{file,"src/couch_view_updater.erl"},{line,161}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{couch_view_updater,do_maps,4,
[{file,"src/couch_view_updater.erl"},{line,153}]}]}
It appears that the indexer is crashing trying to index a particular document. Probably you made a change to your documents, likely the ingestion of a larger document. One indication that it is a 'recent' change to a document causing the crash is to query the view with stale=ok. This will request a response from the last built version of the index (with the last correct version of the document). If this returns correctly it means that the issue is caused by a recent change attempting to be indexed.
This may be an intermittent issue due to a login and application management issue in the US-South region. You can track Platform and Service issues at the Bluemix Status page. If the system status is okay and you still get these errors, open a Bluemix Support ticket.
It's probably a problem with one of the Map Reduce views you have defined on the design document that contains the view you are accessing.

Importing data into Cloud SQL instance error Invalid Credentials

I'm trying to import my database using a bucket, but Im getting an error about Invalid credentials, this a second generation of google cloud, after review the operations tab of my instance it looks like the importing data still running. Im not sure if this process still working. Does anybody have idea about how to solve this problem?
Regards

How do you get data from a remote MySQL database into your app?

Have just finished a couple of tutorials regarding populating a SQLite database with data and then using this data within your app.
However none of these tutorials show how to connect to a remote server in order to obtain data.
QUESTION:
How do you get data from a remote MySQL database into your app??
What options do you have?
Remote access is not a good idea, you would have to allow everyone to access it since it's an app. The best way to go about this is to build a layer between your app and database. From the app you would access a server side script which does the database work and responds to your app.
Well there are methods to allow remote access to your mysql database on your server and being able to query the database remotely. I think this is the cleanest solution. Check out this link: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html