nodejs http connector

After a lot of searching I cannot seem to find the node.js http connector for event store. Every time I search I get confused with other projects implementing an event store, but not the ‘geteventstore.com’ project.

Greg replied to my previous question about the node.js tcp driver, indicating that it might be better to use the http connector. Does anyone help me find that adapter? I probably have plans to try and re-implement or look closer at the tcp adapter, but while I am still new to the project I would just like to start coding and get some results before I put too much effort into the adapter. The alternative is to build a http connector myself, however if one already exists I’de rather get started with that :slight_smile:

Thank you

Matt.

Its an atom feed. It’s available over a json implementation. A driver should not be needed as it’s roughly 300 loc. If you go to the chat sample there is an implementation.

Cheers,

Greg

Cools, thanks. I got the impression there was an abstraction of the http interface for nodejs.

Thanks again!

Matt.

There was at some point quite early on a TCP connector for node, though I’m not sure what it’s current status is (since the TCP interfaces has had some breaking changes between v1.0.0 and v2.0.0 I’d imagine it’s not great at the moment).

Cheers,

James

I believe it only ever supported singlenode as well and could not switch between nodes or gossip. It’s probably worth looking at that code to see where it is

If you’re on Windows, there’s the promising possibility of wrapping the C# client API with https://github.com/tjanczuk/edge . You would just need to write a facade class. Sadly, mono support is still not yet available. (I’ve been waiting for it for months)

I am curious what kind of traffic you are looking at? If anything resembling reasonable just checkout the http interface https://github.com/EventStore/EventStore/wiki/HTTP-Overview note that there is a atom+x.json if you happen to be using js. This will make writing an adapter a very small amount of work. For most occasions this will likely be fast enough for you (it benchmarks a few thousand requests/second/node with all caching etc disabled). If you look here you can actually grab some js to get you started :slight_smile: https://github.com/EventStore/EventStore/blob/master/src/EventStore/EventStore.SingleNode.Web/singlenode-web/js/projections/es.projection.js This is for running a projection in the browser but much of the code is the same.

Cheers,

Greg

If you’re talking to me, the http interface would be plenty fast for my node.js project. I just haven’t incorporated EventStore into it yet, and I’ve been keeping an eye on edgejs because I would like an easy way to go back and forth between .net and node.

It could be. Just not sure if its needed for most occasions (and doesnt work in linux :()

Point taken. :slight_smile: Sometimes I need someone to smack me around and remind me not to overcomplicate things. Hah!