display data from another database in meteor - meteor

I would like to use meteor to display data to a user. I have this data in an external (jDBC accesible) database. I would like to query the database for the relevant record and display this with meteor. Are there any examples on how to accomplish this or am I completely think in a wrong direction ?
Regards,
Marco

Right now meteor only has the capability to connect to a mongodb backend. Conceptually, there is no reason it couldn't connect to any other DB, but as of this moment it has not yet been implemented.

Related

NextAuth and TypeOrm - Retrieve a repository in an api endpoint

I've got an NextJS app with NextAuth and TypeORM.
I'm looking for the possibility to retrieve a specific user or custom entity in an api endpoint.
However, i don't know how to do this properly.
I don't want to re-initialize the connection options on every api for TypeORM and would like to use the connection set by the adapter. (idea of a singleton).
Someone has any idea on how to achieve that ?
Have a nice day !
I don’t know if I got your question, but I think the best way of doing it is by creating your Entities, connecting via TypeORM with synchronize option true.
It will create and update all your tables and columns from your defined model.
Then, you can create another connection to use in your api routes.
I don’t think Vercel can deploy it with a single connection without a custom implementation server implementation.
This guy made a solution that you can try
https://github.com/vercel/next.js/discussions/12254#discussioncomment-19769
This is another approach to the same function
https://github.com/typeorm/typeorm/issues/6241#issuecomment-643690383

How to connect Angular to PostgresSQL?

I use Angular and want to retrieve data from PostgresSQL, but I don't know where to store the database credentials correctly and how to connect Angular to PostgresSQL.
Do I need a Asp.net or Node.js backened and, if yes, what would it be like to retrieve data from database and send it to the frontend?
Yes. This logic should contains on backend side.
If you don't have a server side at the moment, then this is also not a problem. In this case, you can use the stub for development purposes. You can use a package like json-server for this.

Alexa sdk, save data for later sessions

I'm relatively new to Alexa and AWS. I'm trying to save data generated by a RequestHandler to use it later in another Handler. I know how to use the SessionAttributes, but this only works, if the skill isn't terminated meanwhile and since i can't increase the timeout, i need another solution. I read in another post, that you can save something in some DB, but i don't know how he did that:
Alexa Skills Set SDK - increase timeout of skill
Can anyone recommend a tutorial or documentation for something like that?
Btw i use nodejs and sdk v2
You are correct.
If you are trying to save the data somewhere, like a database, it is better to use Dynamo DB.
Here's a link to the tutorial on adding Memory to your skill. Hopefully this helps.

SignalR 2.0 with database update asp.net

I needed to do some notification concept for my asp.net project like facebook notifications. if a user added something in database. the notification icon will be +1 and when you click the icon, you'll see who added what to database like fb. so i needed to run SignalR function if database update is OK in codebehind. I'm new in SignalR and trying to figure it out. i'm not working with MVC btw. trying some tutorials now. so keep it easy please :)
The way I see this, I would notify my clients right after the database operations. So it would look something like this:
db.Save(objectToSave);
var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>();
context.Clients.All.notifyChange();
In this way, you are able to call clients from outside your hub, so you can have this sort of calls to your clients right after you update the database.
You can also have a look at this tutorial , also this one explains notifications..
If you are familiar with working with databases, keep in mind the approach: just call your clients right after saving in the database.
Hope this helps. Best of luck!

Implementing chat system: where to store chat data?

i am implementing a chat system in asp.net, much like google chat and i use xmhttp to send and receive data, and i am using a single table to store all chat for all user.
i wanted to create global temporary tables in sql using a XMLHttpRequest so as to be abl to organise data better(instead of storing all the chat in a sigle table which can(i dont know for sure) cause locking issues when many users are accessing it.)
also for my system i don't have to store the chat and so i thought that a global temporary table would be better since it will already be dropped and save me the trouble of clearing it.
but the after the table has been created by the Xmlhttprequest it gets dropped just after its creation....why this happen i don't know....i also have removed all connection closing lines but still no luck
so what should i do?? also if anyone knows of any online resources that can points me about best practices to follow please tell me.
Your table won't have locking issues with many users accessing it. Temporary tables are not meant to be shared cross-call, and you're going to wind up with far more roadblocks down that path. It is probably better to simply store your data in a table, then poll the table.
The only time you could have "locking issues" is if the users are attempting to write the same chunk of data to the same row at the same time ... which shouldn't be happening in a chat application.
Additionally, Google Chat uses a COMET style implementation instead of a polling implementation. It has been my experience that COMET > polling in terms of user experience.
You're not supposed to keep any chat messages on your database actually... unless you're implementing offline messages.

Resources