Stub ODATA service - web-services

We will be building a Java/JS client that reads data from a server through ODATA.
What will be the easiest way to setup a stubbed ODATA server for our development and testing purposes. In the REST world I would have gone with MounteBank. Even this is doable using mountebank, only issue will be that i have to hard code all possible queries as a separate endpoint.
Is there a simpler way to do this?

After some research, figured out these two options.
https://github.com/TossShinHwa/node-odata
This supports v4.
https://github.com/htammen/n-odata-server
This supports v2.
The downside of both these libraries is that they don't support all the ODATA functions. But, decent enough to start with.

Related

Upload data from Linux in C++ to Firebase service

I'm working on an IoT application on top of embedded Linux, and I want to collect log data (mostly text files) of the devices.
The language I use is C++. I went through the documentation/tutorials of Firebase, however, it looks like only iOS, Android and Web (JS) are best supported, even the C++ part is assuming the carrier device is iOS/Android.
Is it's a good choice to use Firebase for my requirement? Should I just go ahead with C++ SDK or use REST API instead (that I can do with libcurl)
Thanks.
Depending on the complexity of what you want to do, you might just want to use the REST API.
Your biggest hurdle there is likely going to be the authentication part, once you get that out of the way, using the API itself is extremely simple.
Since you're talking about embedded Linux, your resources might be limited, which for me personally would be a reason to go use the REST API approach.
It comes down to ease of use (SDK), or lightweight (REST API). That's my 2 cts anyway...

Is Loopback 4 production ready?

I think I read all the documentation and I'm still confused on wether LB4 is ready for production use?
As I understand, it still misses Many-to-Many relationship and some OpenApi specs implementation. The documentation is very scarce so it left me very confused.
We are currently searching for good node REST solution and LB4 looks very promising with things like TS and dep. injection(more modular design), but it looks like we'll have to skip this one for now. Is anyone using this at all? I would be very glad to hear some experiences.
We have used it for one of our application. I agree that there are some gaps but for most of the stuff, you can handle it pretty well in loopback 4. The most significant reason for that is the awesome extensibility of LB4. That's the reason why we could do authentication, authorization, bpm integration, etc. in our application by creating Components in LB4.
After we were done with it, we thought about sharing our experience with open source world. So, we published a loopback 4 starter application which demonstrates a multi-tenant architecture, supports authentication via passport strategies (using loopback4-authentication extension we created), supports simple permission keys based authorization (using loopback4-authorization extension we created), soft delete entity (using loopback4-soft-delete extension we created) and DB revisioning, upgrades (using db-migrate package).
Hope it helps clear your doubts about loopback 4. Trust me, its an awesome framework with lots of futuristic goals.

Monitoring AJAX heavy Web Application using Nagios

We have a (AJAX heavy) web application hosted in cloud across servers and we need to monitor the availability of this service. Requires logging in to the application with a username-password, perform some searches as that user etc.
Since we plan to use Nagios for some other monitoring tasks, we decided to use Nagios for web application monitoring too.
I came across three such solutions:
Webinject: I don't feel like using this. Project not under active development. It was last released in Jan 2006. I can't see any support/help available. Also I suspect how will it behave with Ajax.
Cucumber-Nagios:
I tried using this. It involves many Ruby components and found that you have to have in-depth knowledge of Ruby platform to make all these components work together. I am not a Ruby guy and having tough time making all these components work together. Also even this project is not under active development and I don't see support/help options available. I posted a bug 4 days back and don't see any response yet.
Selenium plugin for Nagios: Haven't tried it yet. Will try now.
Any more solutions available?
Also, since I don't see any good actively developed solutions for monitoring web applications using Nagios, I suspect if it's really a good approach to use Nagios for this? If not, what alternatives do I have? In short what is the best approach to monitor web applications availability?
Edit 1: We can't afford the Nagios XI paid version and will prefer open source solutions.
If not, what alternatives do I have?
Although Nagios was one of options that we've considered, we've chosen OpenNMS for monitoring purposes. Rationale for our decision is that OpenNMS is highly reliable and configurable free open-source tool and additionally, most of our applications are Java-based; OpenNMS offers integration with JMX. However, bear in mind that if you're demanding very complex tests for your Web site maybe it's better to look elsewhere. OpenNMS can be set to check for HTTP status codes etc., but if you're looking for complex scenarios take a look at:
Apache JMeter (we're using it mainly during the testing phase)
Selenium (can be well used even in production phase)

Best technology for a simple HTTP asset server that needs C++ integration

I am looking at developing a HTTP-based server for storing and later retrieving internal assets (just files/blobs of data). Clients should be able to connect with a simple HTTP request and retrieve data, or use a RESTful API to store files.
When a file is stored, we will need to make some calls into preexisting C++ code to update our asset database, set up internal linkages, and run various checks (e.g. is the data sane).
We have mountains of existing C++ tech here and it's not going to be practical to rewrite it in a high-level language, so we'd like to reuse as much of that as we can. However, in our brief research, it seems like putting together a performant HTTP server is absolutely trivial in higher-level languages, and we'd like to use as much off-the-shelf tech as possible for the HTTP server part.
Anyone have any experience/insight with this? We looked at Node.js, and it seemed very powerful, and then we looked at its C++ integration and got scared off. We aren't going to be able to rewrite all of our low-level tech to be non-blocking, and Node.js seems to require that. Others suggested Ruby, which we have some experience with, but we've never added C++ to the mix before. Totally open to other ideas as well.
Thanks guys!
I would use http://code.google.com/p/mongoose/ .
Mongoose is written in C and easily integrated into existing code.
Maybe you can try poco:
http://pocoproject.org/features.html
Poco is a good c++ library and they provide a HTTP server framework.

Should I use a server-side script or a web service?

I need to be able to access a mySQL database from my iPhone, for both read and write ops. Instead of using MCPKit (due to security and speed considerations), I'd like to access the db through a separate service. The app is iPhone SDK, so I need to get data back in XML form, not as a web page.
I am trying to decide whether to write a Java web service (SOAP) to provide this link, or to just throw together a PHP script on the server side. I can create either solution, but I don't know enough to figure out the advantages/disadvantages of the choice. Please help; thank you!
If you're writing both the client and the server, and performance isn't a significant issue, then the primary remaining consideration is development time.
So, what tools do you have at your disposal? Which platform will allow you to do this with the least amount of work? If it's a toss-up between the two, then pick the one you're most familiar with.