Kdb+ drivers for NodeJS - node.js

I'd like to use NodeJS to implement a simple REST interface to pull data from Kdb+.
Does anyone know of any existing driver or a project to implement a Kdb+ driver for NodeJS?

Not that I know of... but shouldn't be too hard, really. You could simply use the http interface to create calls to kdb and parse the result into json with Arthur's json implementation

There is https://github.com/michaelwittig/node-q
I've used it in my project and works great.

Related

Can I use a different db as a Wolkenkit read model?

I like MongoDB ok, but I was thinking about just using postgres as the read model and querying from it with graphQL. Do I have to write an adapter to do that? If so, where should I look to start?
As always, it depends 😉
Short answer: No, you can't.
Long answer: Yes, theoretically changing the read model database is possible, as wolkenkit uses an adapter-based approach. Right now MongoDB is the only implemented one, but it would be possible to write one, for whatever datastore you want to use.
Basically, the place to start is the wolkenkit-broker, which is the public API server for wolkenkit, and which also handles reading models. At the center of this there is the so-called modelStore, which acts as an abstraction layer over the specific implementation, such as the modelStoreMongoDb adapter.
GraphQL again is currently not supported out of the box. We use our own approach, implemented in the tailwind module. The place to start here is the HTTP server API.
Please note that I am one of the developers of wolkenkit, so please take my answer with a grain of salt.

How can I connect my Node.js application to MongoDB without using native modules?

We can accept 20 times slower to avoid using python or C++ in our project. Are there a native module that still works?
There is no need to invent wheel. mongodb package is the simplest one
But if You insist there are many ways:
Easy way: You can use Rest API of mongo and do requests to it using request package
Moderate way: Open mongodb-core package and copy out what You need most, make Your own mongodb class.
Moderate way #2: fork mongodb package, manipulate it and save with new repository name
Hard way: If You want go hardcore (: read mongodb protocol and operate with it using net package to open socket connection to mongodb server.
How about Crest? It's a node wrapper around the MongoDB server that provides a REST API. With it you could talk to MongoDB over REST instead of with a native client, similar to CouchDB.
There are some other utilities listed here. Maybe you're okay with using Python outside of your app but in front of MongoDB to provide the REST API? If so then maybe those are some alternatives if you don't like Crest. Haven't used it myself so I can't vouch for its quality, but it is listed on MongoDB's own list so hopefully it's decent.

Express.js and Neo4j

I have seen alot of examples of how to integrate express.js and mongodb. Does anyone know a good way to integrate neo4j and express.js?
I have been playing around with node-neo4j and I am able to return cypher queries to the terminal. However, I am confused as to how to post the cypher query, in json format, to the local host.
Thanks for your help.
In order to reply simply to your question, there is an express module for Neo4j, here :
http://expressjs.com/guide/database-integration.html#neo4j
It will remove you the burden to format the json correctly for preparing the statements.
Repository is here if you want to see how it is used inside :
https://github.com/hacksparrow/apoc
Maybe you can contribute to it, for the quick look I did, I see that there is no support for 2.2 auth extension, so you may want to make a PullRequest in order to improve the library.

How to implement node.js and RFID?

Does anyone know how do I go about implementing this?
http://www.youtube.com/watch?v=adF-H9mLuFs&feature=youtu.be
It will be great if anyone can provide me with step by step implementation.
Thanks in advance!
The RFID reader must have some kind of documentation for how you can use it.
There is probably a smarter way that you can link it to nodejs but one method would be to have the rfid reader write the data to a csv file and have nodejs watch that file via fs.watch. (See fs.watch in docs)
You would fire an event that reads the file each time it is written and then do whatever you like. You can update the browser using websockets. (See http://socket.io/)

translation/localization workflow for nodejs/express app

What setup do you use for localization in your nodejs/express app?
Right now I'm using i18n-node in my project. But I'm not happy with the storage in the json files. I'd like to have the translations stored in a database.
I found a promising module named dialect. It can store the translations in mongodb and there's also a module from the same author which enables you to manage the translations via a webinterface(dialect-http).
Unfortunately the dialect module doesn't seem to work with latest stable versions of node. The problem is known for 2 months but since nothing was updated since then I guess the module isn't actively maintained anymore.
I think using a redis db for storing the translations would also make sense. I don't know if there's an module for that.
Maybe you guys have some hints or know of any good modules?
Why don't you just fork i18n-node and overwrite the read and write functions with your own persistence mechanism?
https://github.com/mashpie/i18n-node/blob/master/i18n.js#L235
It seems like you could easily persist the json data within a redis key instead of a json file with a few changes.
I could suggest you to use lingua. Here an example =) http://www.jmanzano.es/blog/?p=647
Another option to lingua might be http://i18next.com/node comes with backends in redis, mongodb or couchDb (and Filesystem of course!)

Resources