crestj

View the Project on GitHub timpanogos/crestj

Welcome to the crestj framework

crestj is an EVE-Online xmlApi and crest endpoint client side caching framework. This site will provide details about this framework.

Functionality

Design Documentation>
todo: get a main design document page/link setup Sorry, site is a mess, just capturing info for now:

OAuth support

CoreController support

View Support

Model Support

Eve clients (feeds client cache)

Event Support

Access Control Lists (ACL)

RabbitMQ

Authentication

This is a development box and so will be up/down and will not be a permanent situation, but if anyone wants to see the eve SOS in action feel free.

http://ec2-23-20-106-130.compute-1.amazonaws.com

http://23.20.106.130

The authentication is a dual purpose situation. First it distinguishes what pages in the application a user has rights to while they are interacting with the application. Currently the AccessGroup db table provides these groups:

There is also a Rights table which currently only has the following right

Directors will be able to create other custom groups and assign capsuleer's to those groups. Capsuleer's will be able to assign ShareRights to other capsuleers or groups that allow those individuals access to their personal (User group) information.

This trickles over to actual access rights to the public API side of the SPI Cache, verses character and corporation private. Everyone is a member of the Anonymous group (public data). An authenticated capsuleer is in the User group (character/corp). Currently at least one Director has to be configured at installation/startup to provide an individual with "Admin" rights to go from there.

I currently have a single properties file (simple name/value pairs) for configuration. When I started I only had a single app per installation in mind. For example, the applications required scopes are declared here. The Director/s are also declared here. As the cache evolved in my design, and my discovery that RabbitMQ has implementations for all of the languages our group use is available, I realized a big buy here is for multiple applications to share the cost of the server. Thus I will look at how to break up these groups/rights, and capsuleers/directors partitioned by application, and make these accessible to the app for their own restriction purposes.

So, future, not only will this be able to provide SSO/access_token and fresh async data pushed to the application but a ACL system for the application to leverage and for individual capsuleers to share with others (alts will love it)

Do note if you authenticate the system at this time, it will capture your refresh_token in the db and can/currently will continue to refresh any endpoints that are accessed by a given CharacterID. You can go to the following url to invalidate this refresh_token ... but the db is super volatile and will continue to undergo change anyway (regularly blown away).

Structure

Personal utils

crestj

Thus OAuth, Web Application framework, Controller (Model coupling in controllers) and DataSource's have all been abstracted and loosely coupled allowing for the likes of

Provide your own OAuth, utilize the frameworks model, view and controller
Provide your own view (Web Application framework) and likely OAuth and utilize the frameworks controller/DataSources
@timpanogos

Installation

1. https://eclipse.org/downloads/ run the download, its an installer, pick "Eclipse IDE for Java EE Developers" 2. https://maven.apache.org/download.cgi 3. https://tomcat.apache.org/download-70.cgi (don't get v8 or 9 if you want to play with the PHPBridge) 4. https://www.postgresql.org/ postgresSql for the tomcat, unzip it anywhere ... I happen to gather this sort of stuff at c:\tools\* but it does not matter. Also, you will only need this if you plan to run/single-step debug. You will only need the maven if you want to build/run it.

These instructions will get you into the source quickly as any IDE has it's painful learning curve.

I like short paths, all at the bottom. Do something similar. If you follow this pattern it will make eclipse life better long term. ws stands for WorkSpace in eclipse.

First create something similar to the following directory structure

c:\ws
c:\ws\eclipse
c:\ws\ccc-common
c:\ws\crestj

git tools don't like cloning into folders that have anything in them. Copy the two that you cloned into their corresponding ccc-common and crestj folders in the above structure and delete them from where you originally cloned them out to.

When you first fire up eclipse it's going to ask you for a "Workspace" folder, set it to c:\ws\eclipse

In eclipse, hook it up with your git clone as follows

File->new->project... pick "Java Project"

Right under Project Name there is a "Use default location" check box, de-select it and browse to your git clone locations.

There are the two git repositories, each with multiple "modules" or "projects" or "jars" these are synonymous terms. So with the above mentioned browse to, select say ccc-db. Repeat this process for all of the projects in the two repositories.

c:\wsc\ccc-common (has .git repo)
c:\wsc\ccc-common\ccc-db (a jar - select me)
c:\wsc\ccc-common\ccc-oauth (a jar - select me)
c:\wsc\ccc-common\ccc-tools (a jar - select me)
c:\wsc\ccc-common\ccc-wicket (a jar - select me)

I need to get scratch.jar out of there at some point, its for junk playing around right now. c:\wsc\crestj (has .git repo)


c:\wsc\crestj\crest-core (a jar select me)
c:\wsc\crestj\crest-da (a jar select me)
pc:\wsc\crestj\crest-pd-da (a jar select me)
pc:\wsc\crestj\crest-web (a .war (special jar) select me)
c:\wsc\crestj\crest-wicket (a jar select me)
c:\wsc\crestj\nee-d (a jar select me - skeletal application that sparked this slow, overly design ed nightmare)longer term in the "Project Explorer" tab the cryptic small graphics at the top, check out the triangle and "working sets" to better organize these two sets.At thi s point you should have 12 eclipse projects which are typed java and may or may not have realized they are also of type maven (they have a pom.xml in them). Look close at the folder icons for each of the 12, there should be an 'm' upper left corner and 'j' upper right corner. Select any/all that don't have the 'm', right click and select "configure->mavenEverythin g is going to be red at this point (not building), but you will have full IDE helps ... F3 any selected item jumps you to the declaration of that item, etc. watch for the various navigational mnemonics and accelerators in the right click pull downs.Ok, if you w ant to build and get rid of all the red. I use ccc-common for a lot of other personal/work stuff, thus I've used an advanced feature of maven for dependency version management that utilizes parent poms. You need to get these parents loaded into your local .m2 repository. To do this execute the batch file at: c:\ws\ccc-comm on\shadowbuild\parents\buildParents.bat installit will need that install command line parameter.Ok, at this point you have two build systems, the maven command line build, which is used for final deployments, this is the master. Then you have Eclipses auto maven build, a subset of the command line which does it's own caching of the .m2 repository classes/jars for IDE time dependencies etc. Sometimes these two get out of synch, and we have definitely confused eclipse at this time.To fix this, right click on any of the p rojects (i.e. crest-core) select "maven->update project ..." and hit the "Select All" button and then ok. All the red will drop.if i t does not drop, I have a cart-before the horse situation in the build poms that I'm not sure resolve in a clean environment. Holler if that's the case.

later, you are real close here to being able to single step servlet code running on the tomcat server, so holler if/when ready to play with that.