Can a MeteorJS app be instrumented for OpenTelemetry - meteor

I'm not familiar with MeteorJS other than it's a framework whose underlying language is Node.js. Having said that, can you instrument an app in MeteorJS for OpenTelemetry?

Unfortunately at the moment there is no auto-instrumentation for MeteorJS, but you can still use OpenTelemetry to instrument your app manually.
To do the manual instrumentation you can follow this guide:
https://opentelemetry.io/docs/instrumentation/js/instrumentation/
And in this registry you can find the list of supported frameworks (which can be used with the auto-instrumentation):
https://opentelemetry.io/registry/?language=js&component=instrumentation

Related

Meteor API vs external API

Basically I want a real time application (Meteor) so I can see a real time dashboard
This back-end (Meteor server) would eventually be hit by some external application via API to get data from the DB (example: mobile App) or add some entries (not from the front-end)
My question is : What is better: create a Meteor API OR create an external server (ExpressJS) that would be connected to Meteor DB?
Meteor is great for building Full Stack apps (front end + back end), and has native support for MongoDB, which together are powerful for building real-time apps (using DDP for example) relatively easily.
Express is an MVC Framework built in Javascript and powered by Node. You will usually have to consider more technologies and frameworks when using Express (MEAN stack), which has a steeper learning curve when compared with Meteor.
Given that you're intending to develop a Full Stack app, building an API using Meteor is more straightforward. As suggested by Mikkel, restivus would be the Meteor package to consider for building your REST service.
If complexity is not a hurdle, using Express is likely to yield to a more efficient solution.
You can integrate express with Meteor - probably a better solution, because you only need one server.
There are Meteor packages for creating REST API's that work well https://atmospherejs.com/nimble
Another approach (my preference) would be to use GraphQL server with Meteor. Apollo Client and Server were developed by the Meteor Development Group (MDG) https://github.com/abhiaiyer91/sample-graphql-meteor-server

Configure Onesignal with Nativescript (with javascript)

I´m creating an app with nativescript and i need push notifications, so i read about onesignal and it looks promissing, so i have created an account with them, follow the instructions for ios, then they sent you here where you are suppose to configure the nativescript SDK for your mobile app. Well, i´m not using typescript, so my first question is:
Where is the javascript version to configure the nativescript SDK,
does anyone knows?
My second question is related with the data that my app receives, which is throught a database, i have a webapp and everytime a user INSERTS in the database, a listview in the nativescript app is "fed"...but when this happens, i need the script from onesginal to send the push does anyone ever used it?
Thanks for your time
Regards
TypeScript makes it easy to maintain large scale JavaScript applications, NativeScript or Angular itself is written in TypeScript for same reason. So personally I would recommend getting started with TypeScript for better.
If you want to convert TypeScript into JavaScript, simply remove all typings from your code, replace import statements with require. At least this should work in NativeScript environment as it supports most of ES6 syntaxes. If you prefer ES5, simply use any online compiler to get JS version of same code, TypeScript Playground for instance.
Also NativeScript docs got examples for extending app delegate in JavaScript if you need further guidance on this.
I don't think the plugin provides any interface to handle notification data at the moment. If you are familiar with the native apis, you may directly access them from JavaScript to access the data sent from server. If possible, I would recommend migrating to Firebase which supports end to end integration with proper examples.

Accessing Cloud Datastore from Qt app

I've developed a REST API back end using Endpoints-Proto-Datastore, which wraps the Cloud Endpoints Python API. I'm starting to look at Qt and trying to get an idea what will be involved in accessing my API from the Qt networking or other library. Might it be nearly as straightforward as is making the calls from the command line using the Python Client library, which even handles OAuth2 flows? This would be very nice. I might use PyQt if this makes things simpler.
Your Endpoints service can generate an OpenAPI specification file which describes the API. Once you do this, there are many OpenAPI-compatible packages which can generate client code for you.
I located this document which gives a pretty good overview for my purposes:
"The Google APIs Client Library for C++ will automatically take care of many of the tedious details for interpreting and complying with the discovery documents so that you can write simpler and familiar C++ code."
Now it's a matter of building and installing the C++ client and then figuring out how to generate the client library and access it from a Qt application. But that is beyond the scope of this question.

Meteor REST driver

Is it possible for Meteor to use RESTful db driver instead of Mongodb?
I have started studying Meteor and I want to use it in a project I am working on. The problem is that this project uses MySQL. I want to keep using Mondb syntax for CRUD operations but instead of using the Mongodb database I want to use RESTful for a PHP web service.
For example, when I do: Albums.find({'name': 'Atom heart mother'}) I want Meteor makes a GET request to http://server/web_service.php/albums/?query={'name': 'Atom heart mother'}
I don't care if Meteor is still using mondodb for the session, app state and some other stuff.
Thank you people, and sorry if my english sucks
For the moment, Meteor can't be used with SQL directly - the best try at this so far is the meteor-sql smart package, but it's been inactive for a good while. And the meteor roadmap doesn't make SQL integration a priority.
The meteor iron-router does allow server-side routing, so you could potentially link your Mongo calls to server routes this way... but wiring this up to Meteor's real-time data might be tricky.

Combine Meteor and Express

I am evaluating Meteor as an alternative to developing real-time capabilities using socket.io and it looks like awesome framework for single page real-time apps. It is great time saver that enables developer focusing on the business logic of the app, rather than writing boilerplate code. However, I find it still pre-mature for a medium size app with multiple pages/routings and REST api. Plus, number of features like i18n are still not available which requires some time investment to develop by myself.
I think that it would be great if I could combine Meteor and Express and use Meteor in use cases where it really shines.
Is it possible to develop an app using standard Express/Mongo stack and use Meteor for only specific part of the app where I need real time collaboration?
For example, can I share a session between Express/Connect and Meteor?
Thanks!
This does not directly answer your question, but I thought I'd throw it out there:
You should check out the community packages on atmosphere. Specifically, I'd recommend having a look at iron-router and i18n (I'll note I have not used the latter).
I've built a large production app that uses iron-router and it's running smoothly. You may also be able to use its server-side-routing capabilities to implement your REST api.

Resources