2

My application receives JSON from Neo4j rest api which is quite verbose (~ 1Mb json text) due to which the application takes time to load.

Is it possible to get compressed json from neo which I can use in my angular js application.

Neo4j 2.2.3 is installed on windows 2008 R2 with IIS on another server with 2008 windows server as well.

I went through: plugin and SO question

Is there any way to accomplish this without plugin but just a property like compressoin:true and decode that compression in angularjs app???

@Michael Hunger

NAS
  • 147
  • 12
  • Also FYI in Neo4j 3.0 there is a planned new binary protocol which will be socket-based and will have a similar encoding structure to MsgPack to reduce response sizes – Brian Underwood Oct 12 '15 at 07:21
  • Any time estimation of when Neo4j 3.0 will be out? – NAS Oct 12 '15 at 19:14
  • I don't, unfortunately. I think it will at least be some months yet. They're working on 2.3 as well and I imagine 3.0 will be after that. – Brian Underwood Oct 13 '15 at 02:34
  • @BrianUnderwood Possibly we are talking about a year till first stable 3.0 release. Bolt is in development right now, and it's quite buggy and unstable. Also there are new huge feature proposals, that still need to be implemented (stored procedures, type system). So, there is no reason to wait for 3.0 release. – FylmTM Oct 13 '15 at 06:53
  • Good to know, thanks! – Brian Underwood Oct 13 '15 at 07:30

2 Answers2

2

No. Currently there is no such functionality in Neo4j. And I think it won't be there in near future.

What other opportunities do we have?

Extension

First one, as you mentioned - develop extension that will gzip all our resonses. This one should be maintaned additionally, and updated for new database versions.

Nginx

You can use nginx in front of your database as reverse proxy, to compress all responses.

Nginx is supported on windows, but considered as "beta" version.

There is gzip module and also guide how to use it.

IIS

I have no experience with IIS on widows server. But it looks like that it is capable to compress responses.

Some articles from first google page on "IIS gzip" query:

Bolt

In upcoming major Neo4j relese (3.0) new binary protocol will added - bolt. This one is based on modified msgpack. That means:

  • Responses will be smaller
  • Request will be faster
Community
  • 1
  • 1
FylmTM
  • 1,952
  • 1
  • 9
  • 16
1

It looks like this is a pending issue in the neo4j repo:

https://github.com/neo4j/neo4j/issues/1262

I don't know of a way to do this with Neo4j offhand, but you could put something like nginx in front of Neo4j to do the gzipping:

http://nginx.org/en/docs/http/ngx_http_gzip_module.html

Brian Underwood
  • 10,398
  • 1
  • 19
  • 30