We want to demonstrate how easy it is to model a domain as a graph and answer questions in almost natural language.
Graph Based Search and Discovery is prominent a use-case for graph databases like Neo4j.
const path = require('path'); | |
const SRC_DIR = path.join(__dirname, '/client/src'); | |
const DIST_DIR = path.join(__dirname, '/client/dist'); | |
module.exports = { | |
mode: 'none', | |
entry: `${SRC_DIR}/index.jsx`, | |
output: { | |
filename: 'bundle.js', | |
path: DIST_DIR, |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
config: | |
target: 'http://localhost:3000' | |
phases: | |
- duration: 60 | |
arrivalRate: 5 | |
- duration: 120 | |
arrivalRate: 5 | |
rampTo: 50 | |
- duration: 600 | |
arrivalRate: 50 |
config: | |
target: 'http://localhost:3001' | |
phases: | |
- duration: 60 | |
arrivalRate: 5 | |
- duration: 120 | |
arrivalRate: 5 | |
rampTo: 50 | |
- duration: 600 | |
arrivalRate: 50 |
Mac Book Pro | |
MacBook Pro (Retina, 13-inch, Mid 2014) | |
Processor 2.6 GHz Intel Core i5 | |
8 GB 1600 MHz DDR3 | |
POSTGRES | |
testdb=# EXPLAIN ANALYZE SELECT * FROM testschema.listing; | |
QUERY PLAN | |
----------------------------------------------------------------------------------------------------------------------- | |
Seq Scan on listing (cost=0.00..214433.65 rows=10001565 width=59) (actual time=1.003..2149.797 rows=9999996 loops=1) |
We want to demonstrate how easy it is to model a domain as a graph and answer questions in almost natural language.
Graph Based Search and Discovery is prominent a use-case for graph databases like Neo4j.
get http://localhost:3000/api/product/reviews?productId=10 | |
response: | |
[ | |
[ | |
{ | |
"ratings": { | |
"quality": 1, |
app.get("/my-view", async (req, res) => { | |
res.send(render("my-view", {data: await db.getData()})) | |
}) | |
function render(view, ctx = {}) { | |
return _.template(fs.readFileSync(`./views/${view}.html`))(ctx) | |
} |
/* | |
* Taken from http://stackoverflow.com/questions/5867534/how-to-save-canvas-data-to-file/5971674#5971674 | |
*/ | |
var fs = require('fs'); | |
// string generated by canvas.toDataURL() | |
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0" | |
+ "NAAAAKElEQVQ4jWNgYGD4Twzu6FhFFGYYNXDUwGFpIAk2E4dHDRw1cDgaCAASFOffhEIO" | |
+ "3gAAAABJRU5ErkJggg=="; | |
// strip off the data: url prefix to get just the base64-encoded bytes |