Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Mar 19, 2015
1 parent 52cc632 commit 4865455
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 1.2.0 (2015-03-19)
* Update orient (1.7.10 -> 2.0.5)
* Update studio
* Update example configurations
* Add validation for root user presence in configuration: otherwise orient would ask for password on each start
* Health check now checks that server is active and storages available (memory check removed because its not available in orient 2)
* Fix console command help (clean urls)

### 1.1.1 (2014-11-25)
* Update dropwizard (0.7 -> 0.8.rc1)
* Update orient (1.7.9 -> 1.7.10)
Expand Down
70 changes: 66 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Best fits for development environment (to easily try orient or simplify develope
may be used in production for small to middle projects.

Features:
* For orient 2 and dropwizard 0.8
* [Embedded orient server](http://www.orientechnologies.com/docs/last/orientdb.wiki/Embedded-Server.html),
managed by dropwizard (using [Managed object](http://dropwizard.io/manual/core.html#managed-objects))
* Configuration in main yaml configuration file or with external
Expand All @@ -33,17 +34,18 @@ Maven:
<dependency>
<groupId>ru.vyarus</groupId>
<artifactId>dropwizard-orient-server</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Gradle:

```groovy
compile 'ru.vyarus:dropwizard-orient-server:1.1.1'
compile 'ru.vyarus:dropwizard-orient-server:1.2.0'
```

for dropwizard 0.7 use version 1.1.0 (see [old docs](https://github.com/xvik/dropwizard-orient-server/tree/dw-0.7))
For orient 1.x and dropwizard 0.8 use version 1.1.1 (see [old docs](https://github.com/xvik/dropwizard-orient-server/tree/dw-0.8-orient-1.x))
For orient 1.x and dropwizard 0.7 use version 1.1.0 (see [old docs](https://github.com/xvik/dropwizard-orient-server/tree/dw-0.7))

### Usage

Expand Down Expand Up @@ -84,7 +86,7 @@ Example application could be found [in tests](https://github.com/xvik/dropwizard

##### Client initialization

Server lifecycle is managed using `Managed` object, so embedded server will start only together with jetty (`server` command).
Server lifecycle is managed using `Managed` object, so embedded server will start only together with jetty (`server` command) or with environment command.
Managed instances are started after all bundles run methods and even after application run method, so server will be unreachable if you try to access
it from these methods.

Expand Down Expand Up @@ -126,6 +128,65 @@ Orient use xml format for configuration files and this section is simply yaml re
See [example xml config](https://github.com/xvik/dropwizard-orient-server/blob/master/src/test/resources/ru/vyarus/dropwizard/orient/sample.xml)
(taken from orient distribution)

**IMPORTANT**: user 'root' must be defined in configuration, because orient 2 asks for root user password on start, and in embedded mode it can't save it (so will ask on each start).
To avoid this case, error is thrown if no 'root' user defined.

Also, note that server users and database users are different! In default configuration root and guest users defined for server.
When new database created, orient will create default database users: admin, reader, writer.

#### Graph server

By default, server supports document and object databases.
If graph db required you'll need to add graph dependency: `com.orientechnologies:orientdb-graphdb:2.0.5`.

Graph related sections are commented in default [yaml config](https://github.com/xvik/dropwizard-orient-server/blob/master/src/test/resources/ru/vyarus/dropwizard/orient/yamlConfig.yml):

```yaml
clazz: com.orientechnologies.orient.graph.handler.OGraphServerHandler
parameters:
...
```

and

```yaml
pattern: 'GET|gephi/*'
implementation: com.orientechnologies.orient.graph.server.command.OServerCommandGetGephi
```

[Example](https://github.com/xvik/dropwizard-orient-server/blob/master/src/test/resources/ru/vyarus/dropwizard/orient/yamlGraphConfig.yml)

Note: graph db also depends on gremlin-groovy, which will bring groovy (1.8.9). You can safely exclude it (to reduce dependencies size).

```groovy
compile("com.orientechnologies:orientdb-graphdb:2.0.5") {
exclude module: 'gremlin-groovy'
}
```

#### Lucene plugin

Orient 2 distribution includes lucene plugin out of the box.
To enable lucene indexes in embedded server add dependency: `com.orientechnologies:orientdb-lucene:2.0.5`.

And register lucene plugin in handlers section:

```yaml
handlers:
- clazz: com.orientechnologies.lucene.OLuceneIndexPlugin
```

[Example](https://github.com/xvik/dropwizard-orient-server/blob/master/src/test/resources/ru/vyarus/dropwizard/orient/yamlLuceneConfig.yml)

This registration is completely equivalent to default lucene plugin registration in orient distribution.

When lucene plugin registered, you can avoid graph dependency declaration (lucene includes it).

#### ETL

To use [ETL](http://www.orientechnologies.com/docs/2.0/orientdb-etl.wiki/Introduction.html)
add dependency `com.orientechnologies:orientdb-etl:2.0.5`

### Console

Internally bundle registers orient console command (`ConsoleCommand`). Console may be used in interactive mode, to execute command(s)
Expand Down Expand Up @@ -203,6 +264,7 @@ You can check version, packaged inside jar [here](https://github.com/xvik/dropwi
### Might also like

* [dropwizard-guicey](https://github.com/xvik/dropwizard-guicey) - dropwizard guice integration
* [guice-persist-orient](https://github.com/xvik/guice-persist-orient) - guice integration for orient

-
[![java lib generator](http://img.shields.io/badge/Powered%20by-%20Java%20lib%20generator-green.svg?style=flat-square)](https://github.com/xvik/generator-lib-java)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.1.2-SNAPSHOT
version=1.2.0-SNAPSHOT

0 comments on commit 4865455

Please sign in to comment.