Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

committing update to read me file #2

Merged
merged 3 commits into from
May 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,87 @@
#kdb-rest-service
# kdb-rest-service

This is an open source rest service written in java which can be used to connect to an instance of kdb using json. The rest service can provide a single query to run or call a function predefined on the instance of kdb.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove "This is" and start with "An open source..."; the "this is" adds nothing IMO and I think it's advantageous to keep the description as brief as possible

possibly also capitalise JSON & REST given they are abbreviations?


##Pre-requisite Configuration
#####Properties
## Pre-requisite Configuration
##### Properties
There is an application.properties file in the resources folder, connect the rest service and the instance of kdb by updating the properties below:

kdb.host=localhost
kdb.host=localhost

kdb.port=6007
kdb.port=6007

kdb.username=admin
kdb.username=admin

kdb.password=admin
kdb.password=admin

server.port=8080
server.port=8080


#####EndPoints
##### EndPoints
The kdb-rest-service provides two endpoints:executeFunction and executeQuery.

The executeFunction provides a means to call a predefined function and pass parameters to the kdb instance.
For example this is the format of a request call a function called plus which passes two arguments labelled "xarg" and "yarg" with values 96.3 and 9.7:

e.g.
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opening and closing { should be in code blocks as well

"function_name" : "plus",
"arguments" : {
"xarg" : "96.3",
"yarg" : "9.7"

"function_name" : "plus",
"arguments" :
{
"xarg" : "96.3",
"yarg" : "9.7"
}
}

The executeQuery provides a means to provide a query to the kdb instance, by default this endpoint is disabled using the property freeform.query.mode.enabled, to enable change the value to true.
For example this is the format of a synchronous query request where the user expects a response to be returned:

e.g.
{
"type" : "sync",
"query" : "select from table",
"response" : true

"type" : "sync",

"query" : "select from table",

"response" : true

}

#####Certificates
##### Certificates
The requests are sent in HTTPS format and to provide this the project has a self-signed certifiate embedded within. It is strongly recommended that you add your own certificate. Updating the certificate will require and update to the following properties in application.properties:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"will require and update" -> an update

also is application.properties a filename? I think it's generally nicer to have filenames as inline code e.g. application.properties (wrap it in ` to do this)


security.require-ssl=true
security.require-ssl=true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd get rid of all these blank lines between each property, they're not needed inside code blocks (same in earlier section)

server.ssl.key-store-type=PKCS12
server.ssl.key-store-type=PKCS12

server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store=classpath:keystore.p12

server.ssl.key-store-password=aquaq2018
server.ssl.key-store-password=aquaq2018

server.ssl.key-alias=tomcat
server.ssl.key-alias=tomcat

#####Authentication
##### Authentication
The rest service uses basic authentication and is using a single username and password which are configured in the application.properties file:

basic.authentication.user=user
basic.authentication.user=user

basic.authentication.password=pass
basic.authentication.password=pass

These value are provided within the header of the request, it is strongly recommended to invoke your own security if you use the project.


##Deploying
## Deploying

There is a DockerFile within the project for deploying the project on docker.

Alternatively it can be run locally by providing the appropriate build configuration via command line or ide.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ide -> IDE


##Built with
## Built with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a full section? Seems weird to have a section where title is longer than the full section

Maven

##Licensing
## Licensing
Please see license file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be said? github displays license pretty prominently in the info bar at the top of the repo


##Contributing
## Contributing
The branch is currently locked down and will require a pull request reviewed by a member of the aquaq team before any changes can be committed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aquaq -> AquaQ