Looking at the MongoDB project, it seems to have many drivers. It has a C Driver, Java Driver, Ruby Driver, etc...
How are these different from client libraries? It seems that each of those provide an interface to use the product (in this case MongoDB) from one of those languages.
Is there a technical difference between the two terms?
Thanks!
An application communicates with MongoDB by way of a client library, called a driver, that handles all interaction with the database in a language appropriate to the application.
Source: https://docs.mongodb.org/manual/applications/drivers/
Related
I am trying to implement a project on the cloud for as minimum resources as possible (cpu, ram usage) and be able to handle medium to large number of requests through the database.
For the database part, I have chosen mongodb but for the backend I am between golang or quarkus.
Golang has many advantages but the only thing that concerns me is the interaction with mongodb. Mongodb official driver for Golang doesn't support reactive interface and despite the fact that golang can be easily implemented to be async I am afraid that mongodb will be my bottleneck.
Quarkus looks very promising, it is supported by Red Hat and it has been built to address many issues for the cloud era. It has been built on top of async servers and supports reactive communication with mongodb.
What is your opinion of the above? What would you suggest?
Thanks,
I'm doing these tests. Reactive quarkus and golang. So far go is much better
Context
I am looking for postgres jdbc drivers which supports reactive programming. I came across https://r2dbc.io/ which is a spec for reactive api's for jdbc.There are two sections in the site
one is "Clients" and another is "Drivers"
The client section starts with
R2DBC encourages libraries to provide a “humane” API in the form of a client library. R2DBC avoids implementing user-space features in each driver, and leaves these for specific clients to implement.
Postrgres implementation of r2dbc - https://github.com/pgjdbc/r2dbc-postgresql starts with
This implementation is not intended to be used directly, but rather to be used as the backing implementation for a humane client library to delegate to
My Questions
What is the difference between client and driver in general, or at-least in above context ?
What is the "humane api" being referred here ?
An example of client and human api in Spring is the DatabaseClient in Spring 5.3.
The original R2dbc spec defines the APIs using reactive streams spec. But DatabaseClient is based on the project reactor, which provides richer APIs for developers.
Compare my example connection factories(I have to use Reactor APIs to wrap the R2dbc APIs to make it more easy for use) and database clients.
Is there any industry standard framework available in the market for implementing Event Sourcing and CQRS (Command Query Responsibility Segregation) ?
You can use Axon framework in java
and Prooph in php.
For node.js environment where is two major frameworks which are actual maintained nowadays - ReSolve and Wolkenkit. These frameworks also contain integrated solutions for communication with front-end web page (SPA application).
There are back-end only libraries for eventsourcing for node.js, including Node-Eventstore and Node-cqrs, but it's more libraries than frameworks for production applications.
Note that I recommended to implement your own Framework in the comment above. However I can still refer you to Akka. Akka is an actor model implementation that comes with support for event sourcing. It is available for .NET, Scala and Java:
See:
https://getakka.net/articles/intro/what-is-akka.html (.NET)
https://akka.io/docs/ (Scala & Java)
I'd like to access an existing postgres database, which is on my local (mac) machine, from haskell.
I can see quite a few postgres packages on hackage. Which is likely to be the easiest for me to use?
postgresql-simple, a binding to libpq, was just announced, and seems to have a nice feature set. I haven't used it myself (or indeed PostgreSQL from Haskell at all), but it seems to have community support, so I'd recommend it if you don't want to use a particular library on top (like HDBC or persistent).
The alternatives appear to be libpq (another binding to libpq), which postgre-simple is based on, and pgsql-simple (a direct implementation of the wire protocol in Haskell), which, going by the post, doesn't seem ready for prime-time yet, and is not on Hackage.
There is also a PostgreSQL driver for HDBC; the PostgreSQL backend for the persistent library (as used in Yesod) is based on it.
Opaleye is a higher-level alternative to postgresql-simple. It uses postgresql-simple under the hood but provides a typesafe and composable API.
http://hackage.haskell.org/package/opaleye
What is the difference between these two graph databases: Neo4j and AllegroGraph? Which is better for Java Web programming?
If you have no reason to choose RDF + SPARQL (which both products support), Neo4j provides a clean Java API for manipulating a property graph (nodes + relationships + properties on both). For web applications, I wrote up an example using Spring Framework, which also exists in a simplified version as a workshop.
Disclaimer: Obviously I'm on the Neo4j team, and I don't have any in-depth knowledge regarding AllegroGraph.
I chose AllegroGraph over Neo4j because of its support for SPARQL queries. It seemed to me that the Neo4j approach of traversing a graph is less tidy, especially for more complex retrieval operations.
...and no, I have no affiliation with either organisation.
One other consideration is the licenses. AllegroGraph's free edition can be used as long as you have fewer than 50 million triples. See http://www.franz.com/agraph/allegrograph/ag_commercial_edition.lhtml
Neo4j is free as long as your project uses the community edition; only if you modify the Neo4j source you must open-source the modifications. The basic license terms can be found on their home page: http://neo4j.org/
AllegroGraph has a java client library which supports 2 standard java semantic API's: Jena and Sesame. The client source is EPL on github. AG supports sparql, transactions, reasoning, geospatial, temporal, and graph analysis. There are no extra features specifically for web apps, but it would fit into any framework as a library.
(I work for Franz.)
In addition to SPARQL, AllegoGraph allows you to write Prolog rules and queries. For complex query logic, it's much more expressive than SPARQL.
There are some examples in the Java client tutorial: http://www.franz.com/agraph/support/documentation/v4/java-tutorial/java-tutorial-40.html