John,

One approach that would be possible is to wait (or to write a patch) for the
server to support a read-only database. That way, you could start the
server, pointing at the same data directory as your app uses, and get
webadmin for free (plus, you'd get the REST API for free). The drawback
would be that only read-operations would work - webadmin would not be able
to modify any data.

If you need write support, webadmin will need the entire REST API, including
the ability to discover where those APIs are by a HTTP GET request to the
root of the server that serves webadmin. You might be able to add a
dependency to the server component, bypass its normal startup, and instead
inject your own database into it, along with configuration and other things
normally provided by the happy events originating in
org.neo4j.server.BootStrapper.

You would then mount the servers jersey services somewhere in your web
container, there are three packages of them that need to be mounted at
different places:

At / (the only url that is hard-coded) you need:
org.neo4j.server.rest.discovery.*

Since you are already serving web content from there, you could provide the
behaviour of this in some other manner. Basically, a HTTP GET to /, with an
Accept-header of "application/json" needs in response a JSON-object that
explains where the data and the management APIs are mounted. Please refer to
the discovery service and it's related response representation for how this
should be formatted.

The other two can then be mounted wherever you like, as long as you put the
urls to them in the GET / response. They are as follows:

Mounted at /db/data in server:
org.neo4j.server.rest.web.*

Mounted at /db/manage in server:
org.neo4j.server.webadmin.rest.*

When these are in place you need to serve the static webadmin stuff from
somewhere, somewhere being anywhere with the same base url as the services
you just mounted. These static files are available as part of the server
component, in a JAR artifact with the classifier "static-web".

/Jacob

On Wed, Feb 9, 2011 at 8:33 AM, John Howard <johnyho...@gmail.com> wrote:

> Thanks Jacob.
>
> What we have currently is a web application which has embedded neo graph
> and
> deployed on an app server.
> The embedded neo approach fits nicely in our application.
> We are open to any development effort it may involve.
> It would be highly helpful, if you can point to starting steps in getting
> web admin in our set up.
>
>
>
> On Sun, Feb 6, 2011 at 8:12 AM, Jacob Hansson <ja...@voltvoodoo.com>
> wrote:
>
> > The web admin client is a javascript file, some html, some css and some
> > images. If you serve those files from a server that also implements the
> > neo4j REST API, and the neo4j server management REST API, webadmin would
> > work.
> >
> > Needless to say, implementing those APIs (or using the neo4j server
> > implementation of them in some way) would be very cumbersome.
> >
> > Perhaps an easier solution would be to wait for (or start working on :) )
> a
> > java client for the server that implements the GraphDatabaseService
> > interface. As long as your app uses that, the switch from embedded to
> > server
> > should be fairly painless..
> >
> > /Jacob
> >
> > On Fri, Feb 4, 2011 at 10:12 PM, John Howard <johnyho...@gmail.com>
> wrote:
> >
> > > Hello,
> > >
> > > I like the web admin module in the neo restful server.
> > > Do we (or can we) have the same as some sort of war package or files
> > which
> > > can be embedded in our embedded application?
> > > I do not mean just jmx but also graph specific info present in web
> admin
> > > page in the neo restful server.
> > >
> > > Thank you in advance.
> > >
> > > Honnur
> > > _______________________________________________
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Jacob Hansson
> > Phone: +46 (0) 763503395 <+46763503395>
> > Twitter: @jakewins
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to