├── web └── src │ ├── main │ ├── webapp │ │ ├── louie.ico │ │ └── louie-logo-small.png │ ├── resources │ │ ├── config │ │ │ └── velocity.properties │ │ └── templates │ │ │ ├── footer.vm │ │ │ ├── header.vm │ │ │ ├── navbar.vm │ │ │ ├── downloads.vm │ │ │ ├── proto.vm │ │ │ ├── servers.vm │ │ │ └── build.vm │ └── java │ │ └── com │ │ └── rhythm │ │ └── louie │ │ └── servlet │ │ └── ServiceRegister.java │ └── site │ └── site.xml ├── src └── site │ ├── resources │ ├── images │ │ ├── run │ │ │ ├── nb_run.png │ │ │ ├── app_run.png │ │ │ ├── nb_run_select.png │ │ │ └── nb_run_remember.png │ │ ├── swagr │ │ │ ├── swagr.png │ │ │ ├── swagr_hover.png │ │ │ ├── swagr_mini_view.png │ │ │ └── swagr_rightclick.png │ │ ├── create │ │ │ ├── nb_new.png │ │ │ ├── nb_arch_args.png │ │ │ ├── nb_from_arch.png │ │ │ ├── nb_generated.png │ │ │ ├── nb_arch_filter.png │ │ │ └── nb_clean_build.png │ │ ├── addserver │ │ │ ├── nb_gf_done.png │ │ │ ├── nb_gf_new.png │ │ │ ├── nb_gf_config.png │ │ │ ├── nb_add_server.png │ │ │ └── nb_gf_detected.png │ │ └── undeploy │ │ │ ├── app_alt_undeploy.png │ │ │ ├── app_clean_build.png │ │ │ └── app_undeployed.png │ └── glassfish │ └── apt │ ├── manual │ ├── swagr │ │ └── start.apt │ ├── develop │ │ ├── develop.apt │ │ ├── logging.apt │ │ └── service.apt │ ├── start │ │ ├── undeploy.apt │ │ ├── run.apt │ │ ├── addserver.apt │ │ ├── start.apt │ │ └── create.apt │ ├── index.apt │ └── setup │ │ ├── setup.apt │ │ └── pbinstall.apt │ └── index.apt ├── swagr ├── client │ ├── src │ │ └── main │ │ │ └── webapp │ │ │ ├── Swagr.bmp │ │ │ ├── Swagr.jpg │ │ │ ├── Swagr.png │ │ │ ├── Swagr.tiff │ │ │ ├── swagrFavicon.ico │ │ │ ├── black_delete_icon.png │ │ │ ├── magnifying-glass.png │ │ │ ├── model │ │ │ ├── .DateRangeModel.js │ │ │ ├── .gridModel.js │ │ │ ├── .HostTypeModel.js │ │ │ ├── LocationModel.js │ │ │ ├── RemovedModel.js │ │ │ └── ServiceModel.js │ │ │ ├── WEB-INF │ │ │ ├── web.xml │ │ │ ├── sun-web.xml │ │ │ └── glassfish-web.xml │ │ │ ├── store │ │ │ ├── RemovedStore.js │ │ │ ├── ChartStore.js │ │ │ ├── SingleReqStore.js │ │ │ ├── MinimalChartStore.js │ │ │ ├── MovingAvgStore.js │ │ │ ├── StackChartStore.js │ │ │ ├── ServiceStore.js │ │ │ └── LocationStore.js │ │ │ ├── index.html │ │ │ └── HashSet.js │ └── nb-configuration.xml ├── server │ ├── src │ │ └── main │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── web.xml │ │ │ └── glassfish-web.xml │ └── nb-configuration.xml ├── README.md └── service │ └── src │ ├── main │ ├── resources │ │ └── com │ │ │ └── exampleorg │ │ │ └── pb │ │ │ └── example │ │ │ └── example.proto │ └── java │ │ └── com │ │ └── rhythm │ │ └── swagr │ │ └── datasource │ │ ├── DrjJdbc.java │ │ └── SwagrJdbc.java │ └── test │ └── java │ └── com │ └── rhythm │ └── swagr │ └── AppTest.java ├── engine ├── findbugs-exclude.xml ├── src │ ├── site │ │ └── site.xml │ ├── main │ │ ├── python │ │ │ └── louie │ │ │ │ └── __init__.py │ │ ├── java │ │ │ └── com │ │ │ │ └── rhythm │ │ │ │ └── louie │ │ │ │ ├── request │ │ │ │ ├── README │ │ │ │ ├── data │ │ │ │ │ ├── DataType.java │ │ │ │ │ ├── PBBuilder.java │ │ │ │ │ └── DataParser.java │ │ │ │ ├── ProtoProcess.java │ │ │ │ ├── JsonProcess.java │ │ │ │ ├── RequestContextManager.java │ │ │ │ └── LogVars.java │ │ │ │ ├── jdbc │ │ │ │ ├── JdbcConstants.java │ │ │ │ ├── JdbcFactory.java │ │ │ │ ├── ConnectionFactory.java │ │ │ │ ├── query │ │ │ │ │ ├── ResultMapper.java │ │ │ │ │ └── ResultProcessor.java │ │ │ │ ├── StandardJdbcFactory.java │ │ │ │ ├── DatasourceConnectionFactory.java │ │ │ │ ├── DatasourceFactory.java │ │ │ │ ├── MysqlConnectionFactory.java │ │ │ │ └── DBUtils.java │ │ │ │ ├── Delegate.java │ │ │ │ ├── service │ │ │ │ ├── layer │ │ │ │ │ ├── ServiceLayer.java │ │ │ │ │ └── CustomServiceLayer.java │ │ │ │ ├── ServiceFactory.java │ │ │ │ ├── CacheLayer.java │ │ │ │ ├── Service.java │ │ │ │ └── command │ │ │ │ │ └── PBCommand.java │ │ │ │ ├── stream │ │ │ │ ├── Consumer.java │ │ │ │ ├── Consumers.java │ │ │ │ ├── SingleConsumer.java │ │ │ │ └── ListConsumer.java │ │ │ │ ├── jms │ │ │ │ ├── MessageProcessor.java │ │ │ │ ├── MessageAdapterException.java │ │ │ │ ├── MessageHandler.java │ │ │ │ ├── MessageOperation.java │ │ │ │ ├── JmsAdapter.java │ │ │ │ ├── MessageContext.java │ │ │ │ ├── MessageType.java │ │ │ │ ├── MessageAction.java │ │ │ │ └── MessageInfo.java │ │ │ │ ├── services │ │ │ │ ├── auth │ │ │ │ │ ├── UnauthenticatedException.java │ │ │ │ │ ├── UnauthorizedSessionException.java │ │ │ │ │ ├── AuthRemoteClient.java │ │ │ │ │ └── AuthUtils.java │ │ │ │ ├── devtest │ │ │ │ │ ├── DevTestDAO.java │ │ │ │ │ └── DevTestService.java │ │ │ │ ├── sql │ │ │ │ │ └── SqlService.java │ │ │ │ └── info │ │ │ │ │ └── InfoService.java │ │ │ │ ├── exception │ │ │ │ ├── LouieRouteException.java │ │ │ │ ├── LouieRequestException.java │ │ │ │ ├── LouieResponseException.java │ │ │ │ └── LouieException.java │ │ │ │ ├── connection │ │ │ │ ├── Connectable.java │ │ │ │ ├── Response.java │ │ │ │ ├── SSLConfig.java │ │ │ │ ├── LouieConnection.java │ │ │ │ └── BasicSSLClientConfig.java │ │ │ │ ├── cache │ │ │ │ ├── Cache.java │ │ │ │ ├── GuavaCache.java │ │ │ │ └── LoadingSupplier.java │ │ │ │ ├── async │ │ │ │ ├── PipeIOBundle.java │ │ │ │ └── AsyncIOCallable.java │ │ │ │ ├── util │ │ │ │ ├── SystemUtils.java │ │ │ │ └── Lists.java │ │ │ │ ├── server │ │ │ │ ├── CustomProperty.java │ │ │ │ ├── LocalConstants.java │ │ │ │ └── ThreadInspector.java │ │ │ │ └── client │ │ │ │ └── connection │ │ │ │ └── JsonReader.java │ │ └── resources │ │ │ ├── louie │ │ │ ├── sql │ │ │ │ └── sql.proto │ │ │ ├── system.proto │ │ │ ├── message.proto │ │ │ ├── jms │ │ │ │ └── jms.proto │ │ │ └── options.proto │ │ │ └── config │ │ │ └── louie-internal.xml │ └── test │ │ └── java │ │ └── com │ │ └── rhythm │ │ └── louie │ │ └── services │ │ └── devtest │ │ └── DevTestServiceTest.java ├── assembly │ └── python.xml └── nbactions.xml ├── .gitignore ├── processor └── src │ ├── main │ ├── resources │ │ ├── config │ │ │ └── velocity.properties │ │ └── templates │ │ │ ├── Client.vm │ │ │ ├── ClientFactory.vm │ │ │ ├── LocalClient.vm │ │ │ ├── Delegate.vm │ │ │ ├── RemoteService.vm │ │ │ └── ServiceFactory.vm │ └── java │ │ └── com │ │ └── rhythm │ │ └── louie │ │ ├── ServiceProvider.java │ │ ├── Constants.java │ │ ├── DAO.java │ │ ├── Router.java │ │ ├── NoFactory.java │ │ ├── Updating.java │ │ ├── Admin.java │ │ ├── CacheDelegate.java │ │ ├── Disabled.java │ │ ├── Internal.java │ │ ├── Restricted.java │ │ ├── Streaming.java │ │ ├── Service.java │ │ ├── process │ │ ├── ServiceHandler.java │ │ └── ServiceCall.java │ │ └── Grouping.java │ └── site │ └── site.xml ├── plugin └── src │ ├── site │ └── site.xml │ └── main │ └── java │ └── com │ └── rhythm │ └── louie │ └── clientgen │ └── ParamInfo.java ├── archetype ├── src │ ├── site │ │ └── site.xml │ └── main │ │ └── resources │ │ └── archetype-resources │ │ ├── server │ │ ├── src │ │ │ └── main │ │ │ │ ├── resources │ │ │ │ ├── louie.xml │ │ │ │ └── louie-info.html │ │ │ │ ├── webapp │ │ │ │ └── WEB-INF │ │ │ │ │ └── glassfish-web.xml │ │ │ │ └── config │ │ │ │ └── dev │ │ │ │ └── louie-dev.xml │ │ ├── nbactions.xml │ │ └── assembly │ │ │ └── python.xml │ │ ├── nbactions.xml │ │ └── service │ │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── __service_lowercase__ │ │ │ │ │ └── __service_lowercase__.proto │ │ │ ├── python │ │ │ │ └── hello.py │ │ │ └── java │ │ │ │ └── __service_lowercase__ │ │ │ │ ├── __service_titlecase__Service.java │ │ │ │ └── __service_titlecase__DAO.java │ │ └── test │ │ │ └── java │ │ │ └── __service_lowercase__ │ │ │ └── __service_titlecase__Test.java │ │ ├── assembly │ │ └── python.xml │ │ └── nbactions.xml └── pom.xml ├── activemq-adapter ├── src │ └── site │ │ └── site.xml └── pom.xml ├── nbactions.xml └── README.md /web/src/main/webapp/louie.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/web/src/main/webapp/louie.ico -------------------------------------------------------------------------------- /src/site/resources/images/run/nb_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/run/nb_run.png -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/Swagr.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/Swagr.bmp -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/Swagr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/Swagr.jpg -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/Swagr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/Swagr.png -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/Swagr.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/Swagr.tiff -------------------------------------------------------------------------------- /web/src/main/webapp/louie-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/web/src/main/webapp/louie-logo-small.png -------------------------------------------------------------------------------- /src/site/resources/images/run/app_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/run/app_run.png -------------------------------------------------------------------------------- /src/site/resources/images/swagr/swagr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/swagr/swagr.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_new.png -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/swagrFavicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/swagrFavicon.ico -------------------------------------------------------------------------------- /engine/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/site/resources/images/run/nb_run_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/run/nb_run_select.png -------------------------------------------------------------------------------- /src/site/resources/images/swagr/swagr_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/swagr/swagr_hover.png -------------------------------------------------------------------------------- /src/site/resources/images/addserver/nb_gf_done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/addserver/nb_gf_done.png -------------------------------------------------------------------------------- /src/site/resources/images/addserver/nb_gf_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/addserver/nb_gf_new.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_arch_args.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_arch_args.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_from_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_from_arch.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_generated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_generated.png -------------------------------------------------------------------------------- /src/site/resources/images/run/nb_run_remember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/run/nb_run_remember.png -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/black_delete_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/black_delete_icon.png -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/magnifying-glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/swagr/client/src/main/webapp/magnifying-glass.png -------------------------------------------------------------------------------- /src/site/resources/images/addserver/nb_gf_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/addserver/nb_gf_config.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_arch_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_arch_filter.png -------------------------------------------------------------------------------- /src/site/resources/images/create/nb_clean_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/create/nb_clean_build.png -------------------------------------------------------------------------------- /src/site/resources/images/swagr/swagr_mini_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/swagr/swagr_mini_view.png -------------------------------------------------------------------------------- /src/site/resources/images/swagr/swagr_rightclick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/swagr/swagr_rightclick.png -------------------------------------------------------------------------------- /src/site/resources/images/addserver/nb_add_server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/addserver/nb_add_server.png -------------------------------------------------------------------------------- /src/site/resources/images/addserver/nb_gf_detected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/addserver/nb_gf_detected.png -------------------------------------------------------------------------------- /src/site/resources/images/undeploy/app_alt_undeploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/undeploy/app_alt_undeploy.png -------------------------------------------------------------------------------- /src/site/resources/images/undeploy/app_clean_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/undeploy/app_clean_build.png -------------------------------------------------------------------------------- /src/site/resources/images/undeploy/app_undeployed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhlabs/louie/HEAD/src/site/resources/images/undeploy/app_undeployed.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /engine/target/ 3 | /processor/target/ 4 | /web/target/ 5 | /plugin/target/ 6 | /archetype/target/ 7 | /activemq-adapter/target/ 8 | *~ 9 | /swagr/server/target/ 10 | /swagr/service/target/ 11 | /swagr/client/target/ 12 | *.pyc 13 | -------------------------------------------------------------------------------- /web/src/main/resources/config/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class = org.apache.velocity.runtime.log.SystemLogChute 2 | 3 | resource.loader = classpath 4 | classpath.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader -------------------------------------------------------------------------------- /processor/src/main/resources/config/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class = org.apache.velocity.runtime.log.SystemLogChute 2 | 3 | resource.loader = classpath 4 | classpath.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader -------------------------------------------------------------------------------- /src/site/apt/manual/swagr/start.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Swagr 3 | ------ 4 | 5 | Swagr 6 | 7 | Swagr (<>ystem <>ide <>ctivity <>aphs) is a tool for analyzing service utilization. 8 | 9 | [../../images/swagr/swagr.png] 10 | 11 | <> 12 | -------------------------------------------------------------------------------- /swagr/server/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/.DateRangeModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | 7 | Ext.define('AM.model.DateRangeModel', { 8 | extend: 'Ext.data.Model', 9 | fields: [{type: 'date', dateFormat: 'Ymd', name: 'Time'}] 10 | }); -------------------------------------------------------------------------------- /processor/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /swagr/README.md: -------------------------------------------------------------------------------- 1 | # Swagr 2 | 3 | Swagr is an analytics tool for inspecting Louie-based service usage. It is composed of a python script which should be executed as a cron, a MySQL schema, a Louie-based service, and a web client. For more information on configuring and 4 | using louie, please visit http://louie.rhythm.com/manual/swagr/start.html 5 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/.gridModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | 7 | Ext.define('AM.model.gridModel', { 8 | extend: 'Ext.data.Model', 9 | fields: [{ 10 | type: 'int', 11 | name: 'qid' 12 | } 13 | ] 14 | }); -------------------------------------------------------------------------------- /web/src/main/resources/templates/footer.vm: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/.HostTypeModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * UNUSED 3 | */ 4 | 5 | 6 | Ext.define('AM.model.HostTypeModel', { 7 | extend: 'Ext.data.Model', 8 | fields: [ 9 | {type: 'string', name: 'informixLoc'}, 10 | {type: 'string', name: 'hostType'}, 11 | {type: 'string', name: 'hTypeName'}, 12 | {type: 'string', name: 'location'} 13 | ] 14 | }); -------------------------------------------------------------------------------- /swagr/service/src/main/resources/com/exampleorg/pb/example/example.proto: -------------------------------------------------------------------------------- 1 | package com.exampleorg.example; 2 | 3 | import "google/protobuf/descriptor.proto"; 4 | 5 | option java_package = "com.exampleorg.pb.example"; 6 | option java_outer_classname = "ExampleProtos"; 7 | option java_generate_equals_and_hash = true; 8 | 9 | message ExampleResponsePB { 10 | optional string response = 1; 11 | } -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/site/apt/manual/develop/develop.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Developing with Louie 3 | ------ 4 | 5 | Developing with Louie 6 | 7 | 8 | To develop with Louie you will need to setup your data objects with 9 | {{{./pb.html}Protocol Buffers}} and write a {{{./service.html}service interface}}. 10 | 11 | If this is a database driven service, you will want to configure a {{{./datasource.html} datasource}}. 12 | 13 | Other additional concepts can be found in the index on the left. -------------------------------------------------------------------------------- /web/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | org.apache.maven.skins 14 | maven-fluido-skin 15 | 1.3.1 16 | 17 | 18 | -------------------------------------------------------------------------------- /engine/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | org.apache.maven.skins 14 | maven-fluido-skin 15 | 1.3.1 16 | 17 | 18 | -------------------------------------------------------------------------------- /plugin/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | org.apache.maven.skins 14 | maven-fluido-skin 15 | 1.3.1 16 | 17 | 18 | -------------------------------------------------------------------------------- /archetype/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | org.apache.maven.skins 14 | maven-fluido-skin 15 | 1.3.1 16 | 17 | 18 | -------------------------------------------------------------------------------- /activemq-adapter/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | org.apache.maven.skins 14 | maven-fluido-skin 15 | 1.3.1 16 | 17 | 18 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/src/main/resources/louie.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-clean build +python 5 | clean build +python 6 | 7 | clean 8 | install 9 | 10 | 11 | python 12 | 13 | 14 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-clean build +python 5 | clean build +python 6 | 7 | clean 8 | install 9 | 10 | 11 | python 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/src/main/resources/__service_lowercase__/__service_lowercase__.proto: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | package ${service_lowercase}; 5 | 6 | option java_package = "${package}.${service_lowercase}"; 7 | option java_outer_classname = "${service_titlecase}Protos"; 8 | option java_generate_equals_and_hash = true; 9 | 10 | message ${service_titlecase}ResponsePB { 11 | optional string response = 1; 12 | } 13 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/WEB-INF/sun-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /SWAGr 5 | 6 | 7 | Keep a copy of the generated servlet class' java code. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/site/apt/manual/start/undeploy.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Undeploying an application 3 | ------ 4 | 5 | Undeploying Your Application 6 | 7 | * In NetBeans: 8 | 9 | [../../images/undeploy/app_clean_build.png] 10 | 11 | <> 12 | 13 | [../../images/undeploy/app_undeployed.png] 14 | 15 | <> 16 | 17 | [../../images/undeploy/app_alt_undeploy.png] 18 | 19 | <> -------------------------------------------------------------------------------- /processor/src/main/resources/templates/Client.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | public interface ${className} { 9 | #foreach($method in $info.methodInfos) 10 | #if ($method.isClientAccess()) 11 | 12 | /** 13 | #foreach( $line in $method.javadoc.split("\n")) 14 | * $line 15 | #end 16 | */ 17 | #if ( $method.isDeprecated() ) 18 | @Deprecated 19 | #end 20 | ${method.clientReturnType} ${method.name}(${method.paramString})${method.throwsClause}; 21 | #end 22 | #end 23 | } -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /swagr 5 | 6 | 7 | 8 | Keep a copy of the generated servlet class' java code. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /swagr/server/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | swagrserver 5 | 6 | 7 | 8 | Keep a copy of the generated servlet class' java code. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/header.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /processor/src/main/resources/templates/ClientFactory.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | import com.rhythm.louie.server.Server; 9 | import com.rhythm.louie.server.ServiceManager; 10 | import com.rhythm.louie.connection.LouieConnection; 11 | import com.rhythm.louie.connection.LouieConnectionFactory; 12 | 13 | public class ${className} { 14 | private ${className}() {} 15 | 16 | public static ${baseName}ServiceClient getClient(LouieConnection connection) { 17 | return new ${baseName}ServiceClient(connection); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/src/main/python/hello.py: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | ${symbol_pound}!/usr/bin/python 5 | 6 | from ${service_lowercase}.client import ${service_titlecase}Client 7 | import logging 8 | 9 | def main(): 10 | logging.basicConfig(format='%(asctime)s %(message)s') 11 | outgoing = 'HELLO WORLD!' 12 | client = ${service_titlecase}Client() 13 | print 'sending to server: {0}'.format(outgoing) 14 | incoming = client.basicRequest(outgoing) 15 | print 'server sent back: {0}'.format(incoming.response) 16 | 17 | 18 | if __name__=='__main__': 19 | main() 20 | -------------------------------------------------------------------------------- /engine/src/main/python/louie/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Rhythm & Hues Studios. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | __version__ = '${project.version}' 16 | -------------------------------------------------------------------------------- /src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Introduction 3 | ------ 4 | 5 | Welcome to Louie! 6 | 7 | Louie is a service that provides a unified interface to a disparate set of data-sources. It is language and platform independent and an integral part of our infrastructure technology. 8 | 9 | The main goals of Louie: 10 | 11 | * Centralize data access to facilitate caching and modification of the underlying data sources without effecting client APIs. 12 | 13 | * Enable lookups of complex data structures in single lookups regardless of where the data formally lives 14 | 15 | * Caching of data in remote locations in place of formal database replication 16 | 17 | * Provide a global messaging system to enable dynamic updates to applications -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/src/main/resources/louie-info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | 5 | 6 | 7 | ${rootArtifactId} 8 | 9 | 10 | 11 | Keep a copy of the generated servlet class' java code. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-clean build +python 5 | clean build +python 6 | 7 | clean 8 | install 9 | 10 | 11 | python 12 | 13 | 14 | 15 | CUSTOM-site parent only 16 | site pl 17 | 18 | clean 19 | site 20 | -pl 21 | . 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/site/apt/manual/index.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Introduction 3 | ------ 4 | 5 | Welcome to Louie! 6 | 7 | Louie is a service networking framework that provides a unified, multi-language, interface to a disparate set of data-sources. 8 | 9 | The main goals of Louie: 10 | 11 | * Centralize data access to facilitate caching and modification of the underlying data sources without effecting client APIs. 12 | 13 | * Enable lookups of complex data structures in single lookups regardless of where the data formally lives 14 | 15 | * Configurable routing for multiple server and multiple data center installations. 16 | 17 | * Caching of data in remote locations in place of formal database replication. 18 | 19 | * Provide a global messaging system to enable dynamic updates to applications -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/src/main/java/__service_lowercase__/__service_titlecase__Service.java: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | package ${package}.${service_lowercase}; 5 | 6 | import ${package}.${service_lowercase}.${service_titlecase}Protos.*; 7 | 8 | import com.rhythm.louie.Service; 9 | 10 | @Service 11 | public interface ${service_titlecase}Service { 12 | 13 | /** 14 | * An example service method which accepts a String 15 | * and returns a ${service_titlecase}ResponsePB 16 | * 17 | * @param request 18 | * @return ${service_titlecase}ResponsePB 19 | * @throws Exception 20 | */ 21 | ${service_titlecase}ResponsePB basicRequest(String request) throws Exception; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/src/main/java/__service_lowercase__/__service_titlecase__DAO.java: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | package ${package}.${service_lowercase}; 5 | 6 | import ${package}.${service_lowercase}.${service_titlecase}Protos.*; 7 | 8 | import com.rhythm.louie.DAO; 9 | 10 | @DAO 11 | public class ${service_titlecase}DAO implements ${service_titlecase}Service { 12 | 13 | @Override 14 | public ${service_titlecase}ResponsePB basicRequest(String request) throws Exception { 15 | ${service_titlecase}ResponsePB resp = ${service_titlecase}ResponsePB.newBuilder() 16 | .setResponse("Received : " + request) 17 | .build(); 18 | return resp; 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/site/apt/manual/start/run.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Running a project 3 | ------ 4 | 5 | Running a Louie based project 6 | 7 | * Run your new project from NetBeans: 8 | 9 | [../../images/run/nb_run.png] 10 | 11 | <> 12 | 13 | [../../images/run/nb_run_select.png] 14 | 15 | <> 14 | 15 | [../../images/addserver/nb_gf_detected.png] 16 | 17 | <> 18 | 19 | [../../images/addserver/nb_gf_config.png] 20 | 21 | <> 22 | <> 23 | 24 | [../../images/addserver/nb_gf_done.png] 25 | 26 | <> 27 | 28 | Next, you can {{{./run.html}run}} your application! -------------------------------------------------------------------------------- /swagr/service/src/test/java/com/rhythm/swagr/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.rhythm.swagr; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | extends TestCase 12 | { 13 | /** 14 | * Create the test case 15 | * 16 | * @param testName name of the test case 17 | */ 18 | public AppTest( String testName ) 19 | { 20 | super( testName ); 21 | } 22 | 23 | /** 24 | * @return the suite of tests being tested 25 | */ 26 | public static Test suite() 27 | { 28 | return new TestSuite( AppTest.class ); 29 | } 30 | 31 | /** 32 | * Rigourous Test :-) 33 | */ 34 | public void testApp() 35 | { 36 | assertTrue( true ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/README: -------------------------------------------------------------------------------- 1 | PBRequest Architecture 2 | 3 | Request1(Data1-1,Data1-2,Data1-3) 4 | Request1(Data2-1,Data2-2,Data2-3) 5 | . 6 | . 7 | . 8 | Request2(Data1-1,Data1-2) 9 | Request2(Data2-1,Data2-2) 10 | . 11 | . 12 | . 13 | 14 | 15 | Header 16 | Request1 17 | Param1 18 | Data1-1 19 | Data1-2 20 | Data1-3 21 | Param2 22 | Data2-1 23 | Data2-2 24 | Data2-3 25 | . 26 | . 27 | . 28 | Request2 29 | Param1 30 | Data1-1 31 | Data1-2 32 | Param2 33 | Data2-1 34 | Data2-2 35 | . 36 | . 37 | . 38 | . 39 | . 40 | . 41 | 42 | 43 | {HEADER}{REQUEST}{DATA}{DATA}{DATA}{DATA}{DATA}{DATA}....{REQUEST}{DATA}{DATA}{DATA}{DATA}{DATA}{DATA} -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/JdbcConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class JdbcConstants { 23 | public static final int JDBC_IN_LIMIT=500; 24 | } 25 | -------------------------------------------------------------------------------- /processor/src/main/resources/templates/LocalClient.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | public class ${className} implements ${baseName}Client { 9 | private final ${info.serviceClassName} service; 10 | 11 | public ${className}(${info.serviceClassName} service) { 12 | this.service = service; 13 | } 14 | 15 | public ${info.serviceClassName} getService() { 16 | return service; 17 | } 18 | #foreach($method in $info.methodInfos) 19 | #if ($method.isClientAccess()) 20 | 21 | #if ( $method.isDeprecated() ) 22 | @Deprecated 23 | #end 24 | @Override 25 | public ${method.clientReturnType} ${method.name}(${method.paramString})${method.throwsClause} { 26 | return this.service.${method.name}(${method.paramNameString}); 27 | } 28 | #end 29 | #end 30 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/data/DataType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request.data; 17 | 18 | /** 19 | * @author cjohnson 20 | * Created: Jun 14, 2011 2:19:44 PM 21 | */ 22 | public enum DataType { 23 | PB, 24 | JSON; 25 | } 26 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/LocationModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | Ext.define('RH.model.LocationModel', { 19 | extend: 'Ext.data.Model', 20 | fields: [ 21 | {type:'string', name: 'location', mapping: 'location'} 22 | ] 23 | }); 24 | 25 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/Delegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | * @param 22 | */ 23 | public interface Delegate { 24 | void setDelegate(T delegate); 25 | T getDelegate(); 26 | } 27 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/layer/ServiceLayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service.layer; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public interface ServiceLayer { 23 | T loadLayer(Class service) throws Exception; 24 | } 25 | -------------------------------------------------------------------------------- /src/site/apt/manual/start/start.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Getting Started 3 | ------ 4 | 5 | Getting Started 6 | 7 | To develop with louie you will need to be familiar with java development using {{{http://maven.apache.org/}maven}}. 8 | Using an IDE is advised as well, we prefer {{{https://netbeans.org/}netbeans}}. 9 | You can find documentation on using these tools on their respective sites. 10 | 11 | * Creating a Louie based project 12 | 13 | To create a louie project from scratch, you will need to invoke the louie archetype. 14 | You can do this through the new project dialog in your {{{./create.html}ide}}, if it supports maven, or via the {{{./create.html}command line}}. 15 | 16 | * Running your Louie based project 17 | 18 | To run a newly built project, you'll need to first {{{./addserver.html}add}} your GlassFish server to your NetBeans IDE. 19 | Then you can {{{./run.html}run}} the application from within NetBeans. 20 | 21 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/RemovedModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.model.RemovedModel', { 18 | extend: 'Ext.data.Model', 19 | idProperty: 'id', 20 | fields: [ 21 | {type: 'int', name: 'id'}, 22 | {type: 'string', name: 'idString'} 23 | ] 24 | }); -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/JdbcFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | /** 19 | * @author cjohnson 20 | * Created: Nov 14, 2011 6:57:09 PM 21 | */ 22 | public interface JdbcFactory { 23 | public JdbcService newService(String sql) throws Exception; 24 | } 25 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/ConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | import java.sql.Connection; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public interface ConnectionFactory { 25 | Connection createConnection() throws Exception; 26 | } 27 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/model/ServiceModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | Ext.define('RH.model.ServiceModel', { 19 | extend: 'Ext.data.Model', 20 | fields: [ 21 | {type:'int', name:'systemid', mapping: 'systemid'}, 22 | {type:'string', name:'service', mapping: 'service'} 23 | ] 24 | }); -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/data/PBBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request.data; 17 | 18 | import com.google.protobuf.Message; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public interface PBBuilder { 25 | public M build(A a); 26 | } 27 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/ServiceProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.*; 19 | 20 | /** 21 | * 22 | * @author eyasukoc 23 | */ 24 | @Target(ElementType.TYPE) 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface ServiceProvider {} 27 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/ServiceFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public interface ServiceFactory { 23 | 24 | public Service getService() throws Exception; 25 | 26 | public String getServiceName(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /processor/src/main/resources/templates/Delegate.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | import com.rhythm.louie.Delegate; 9 | 10 | public class ${className} implements ${info.serviceClassName}, Delegate<${info.serviceClassName}> { 11 | private ${info.serviceClassName} delegate; 12 | public ${className}() {} 13 | 14 | @Override 15 | public void setDelegate(${info.serviceClassName} delegate) { 16 | this.delegate = delegate; 17 | } 18 | 19 | @Override 20 | public ${info.serviceClassName} getDelegate() { 21 | return delegate; 22 | } 23 | #foreach($method in $info.methodInfos) 24 | 25 | #if ( $method.isDeprecated() ) 26 | @Deprecated 27 | #end 28 | @Override 29 | public ${method.returnType} ${method.name}(${method.paramString})${method.throwsClause} { 30 | return this.delegate.${method.name}(${method.paramNameString}); 31 | } 32 | #end 33 | } -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | /* 19 | * Constants.java 20 | * 21 | * Copyright (c) 2014 Rhythm & Hues Studios. All rights reserved. 22 | */ 23 | 24 | /** 25 | * 26 | * @author cjohnson 27 | */ 28 | public class Constants { 29 | public static final String DEFAULT_GATEWAY = "louie"; 30 | } 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/stream/Consumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.stream; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | * @param Type of the returned object(s) 22 | */ 23 | public abstract class Consumer { 24 | 25 | public void informMessageCount(int count) {} 26 | 27 | abstract public void consume(T object); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SWAGr 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | import com.rhythm.louie.request.data.Data; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public interface MessageProcessor { 25 | 26 | public String getType(); 27 | 28 | public void execute(MessageAction action, Data data) throws Exception; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/query/ResultMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc.query; 17 | 18 | import java.sql.ResultSet; 19 | import java.util.Map; 20 | 21 | /** 22 | * 23 | * @author cjohnson 24 | * 25 | * @param 26 | * @param 27 | */ 28 | public interface ResultMapper { 29 | public void processResults(ResultSet rst, Map results) throws Exception; 30 | } 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/ProtoProcess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request; 17 | 18 | import java.io.InputStream; 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * 23 | * @author eyasukoc 24 | */ 25 | public interface ProtoProcess { 26 | 27 | public void processRequest(InputStream input, OutputStream output, RequestProperties props) throws Exception; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/site/apt/manual/setup/setup.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Environment Setup 3 | ------ 4 | 5 | Environment Setup 6 | 7 | 8 | * New to Java? 9 | 10 | The biggest hurdle when beginning Louie development is getting your environment 11 | configured for Java EE developement. You will need to ensure that you have a proper 12 | Java Development Kit (JDK) installed as well as the various servers and tools that 13 | are required for building and running a Louie service effectively. 14 | 15 | * Environment 16 | 17 | The documentation included here assumes that you are working on a linux based 18 | operating system. If you are on another platform, or do not have access to install 19 | servers in certain directories, feel free to setup your work environment as you like. 20 | These practices are mainly suggestions and you can setup your development environment 21 | however you, or your organization, prefers. 22 | 23 | Louie is primarily just a Java EE Web application with compilation hooks. Therefore 24 | you should be able to run Louie in a variety of application servers. -------------------------------------------------------------------------------- /src/site/apt/manual/setup/pbinstall.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Installing Protocol Buffers 3 | ------ 4 | 5 | Installing Protocol Buffers 6 | 7 | Louie uses Google's Protocol Buffers as the underlying serialization for it's RPC 8 | layer. When compiling Louie based projects you will need to use Protocol Buffers 9 | for the arguments and return types of all your service methods. The java dependencies 10 | will be fetched via Maven, but you will still need to install the PB compiler. 11 | 12 | Note: Currently Louie is dependent on your compiler being v2.5. We will work on making this more flexible 13 | in the future. 14 | 15 | * Install with a Package Manager 16 | 17 | If you are running on a Linux OS, you should be able to install protoc through your 18 | package manager. 19 | 20 | +-------------+ 21 | Example from Ubuntu Here 22 | +-------------+ 23 | 24 | * Compile and Install from Source 25 | 26 | Alternatively, you can find instructions for downloading, building, and installing the compiler from 27 | source {{{http://developers.google.com/protocol-buffers/}here}}. -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageAdapterException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class MessageAdapterException extends Exception{ 23 | public MessageAdapterException(String message) { 24 | super(message); 25 | } 26 | 27 | public MessageAdapterException(Exception ex) { 28 | super(ex); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/DAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface DAO { 30 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/auth/UnauthenticatedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.auth; 17 | 18 | import com.rhythm.louie.exception.LouieException; 19 | 20 | /** 21 | * 22 | * @author eyasukoc 23 | */ 24 | public class UnauthenticatedException extends LouieException{ 25 | 26 | public UnauthenticatedException(String message) { 27 | super(message); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Router.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Router { 30 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/exception/LouieRouteException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.exception; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class LouieRouteException extends LouieException{ 23 | 24 | public LouieRouteException(String message) { 25 | super(message); 26 | } 27 | 28 | public LouieRouteException(Exception ex) { 29 | super(ex); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/query/ResultProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc.query; 17 | 18 | import java.sql.ResultSet; 19 | import java.util.Collection; 20 | 21 | /** 22 | * 23 | * @author cjohnson 24 | * @param Type result that will be returned 25 | */ 26 | public interface ResultProcessor { 27 | public void processResults(ResultSet rst, Collection results) throws Exception; 28 | } 29 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/NoFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface NoFactory {} 30 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/exception/LouieRequestException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.exception; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class LouieRequestException extends LouieException{ 23 | public LouieRequestException (String message) { 24 | super(message); 25 | } 26 | 27 | public LouieRequestException (Exception ex) { 28 | super(ex); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/exception/LouieResponseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.exception; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class LouieResponseException extends LouieException{ 23 | public LouieResponseException (String message) { 24 | super(message); 25 | } 26 | 27 | public LouieResponseException (Exception ex) { 28 | super(ex); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Updating.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | 28 | @Target(ElementType.METHOD) 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface Updating {} 31 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Admin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Admin { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/CacheDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface CacheDelegate { 30 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/stream/Consumers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.stream; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class Consumers { 23 | 24 | public static ListConsumer newListConsumer() { 25 | return new ListConsumer(); 26 | } 27 | 28 | public static SingleConsumer newSingleConsumer() { 29 | return new SingleConsumer(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Disabled.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Disabled { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Internal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Internal { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Restricted.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Restricted { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Streaming.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Streaming { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Service.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | 24 | /** 25 | * @author cjohnson 26 | * Created: Jan 24, 2012 6:57:11 PM 27 | */ 28 | @Target(ElementType.TYPE) 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface Service {} 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | import java.util.Collection; 19 | 20 | import com.rhythm.louie.request.data.Data; 21 | 22 | /** 23 | * 24 | * @author cjohnson 25 | */ 26 | public interface MessageHandler { 27 | public void executeMessageHandler(MessageAction action, String type, Data data) throws Exception; 28 | 29 | public Collection getMessageProcessors(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/ChartStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.store.ChartStore', { 18 | requires: ['Ext.data.Store'], 19 | extend: 'Ext.data.Store', 20 | model: 'RH.model.ChartModel', 21 | autoLoad: false, 22 | proxy: { 23 | actionMethods: { read: 'POST'}, 24 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 25 | type: 'ajax', 26 | noCache: false, 27 | url: '/swagrserver/json' 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/process/ServiceHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.process; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface ServiceHandler { 30 | String value(); 31 | } 32 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/SingleReqStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.store.SingleReqStore', { 18 | requires: ['Ext.data.Store'], 19 | extend: 'Ext.data.Store', 20 | model: 'RH.model.SingleReqModel', 21 | autoLoad: false, 22 | proxy: { 23 | actionMethods: { read: 'POST'}, 24 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 25 | type: 'ajax', 26 | noCache: false, 27 | url: '/swagrserver/json' 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/assembly/python.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | python 11 | false 12 | 13 | zip 14 | 15 | 16 | 17 | true 18 | / 19 | src/main/python 20 | 21 | 22 | true 23 | / 24 | target/generated-sources/python 25 | 26 | **/*.py 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/MinimalChartStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.store.MinimalChartStore', { 18 | requires: ['Ext.data.Store'], 19 | extend: 'Ext.data.Store', 20 | model: 'RH.model.MinimalChartModel', 21 | autoLoad: false, 22 | proxy: { 23 | actionMethods: { read: 'POST'}, 24 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 25 | type: 'ajax', 26 | noCache: false, 27 | url: '/swagrserver/json' 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/MovingAvgStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | Ext.define('RH.store.MovingAvgStore', { 19 | requires: ['Ext.data.Store'], 20 | extend: 'Ext.data.Store', 21 | model: 'RH.model.MovingAvgModel', 22 | autoLoad: false, 23 | proxy: { 24 | actionMethods: { read: 'POST'}, 25 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 26 | type: 'ajax', 27 | noCache: false, 28 | url: '/swagrserver/json' 29 | } 30 | }); 31 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/StackChartStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | Ext.define('RH.store.StackChartStore', { 19 | requires: ['Ext.data.Store'], 20 | extend: 'Ext.data.Store', 21 | model: 'RH.model.StackChartModel', 22 | autoLoad: false, 23 | proxy: { 24 | actionMethods: { read: 'POST'}, 25 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 26 | type: 'ajax', 27 | noCache: false, 28 | url: '/swagrserver/json' 29 | } 30 | }); 31 | -------------------------------------------------------------------------------- /engine/src/main/resources/louie/sql/sql.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Rhythm & Hues Studios. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package louie.sql; 16 | 17 | option java_package = "com.rhythm.louie.sql"; 18 | option java_outer_classname = "SqlProtos"; 19 | option java_generate_equals_and_hash = true; 20 | 21 | message SqlStatementPB { 22 | optional string sql = 1; 23 | } 24 | 25 | message SqlResultPB { 26 | repeated SqlColumnPB columns = 1; 27 | } 28 | 29 | message SqlColumnPB { 30 | optional bytes value = 1; 31 | optional uint32 type = 2; 32 | } 33 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/CacheLayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service; 17 | 18 | import com.rhythm.louie.cache.CacheManager; 19 | import com.rhythm.louie.jms.MessageHandler; 20 | 21 | /** 22 | * 23 | * @author cjohnson 24 | */ 25 | public interface CacheLayer { 26 | 27 | MessageHandler getMessageHandler(); 28 | 29 | CacheManager getCacheManager(); 30 | 31 | void initialize() throws Exception; 32 | 33 | void shutdown() throws Exception; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/JsonProcess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request; 17 | 18 | import java.io.IOException; 19 | import javax.servlet.ServletException; 20 | import javax.servlet.http.HttpServletRequest; 21 | import javax.servlet.http.HttpServletResponse; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | public interface JsonProcess { 28 | 29 | public void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/auth/UnauthorizedSessionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.auth; 17 | 18 | import com.rhythm.louie.exception.LouieException; 19 | 20 | import com.rhythm.pb.RequestProtos.SessionKey; 21 | 22 | /** 23 | * 24 | * @author cjohnson 25 | */ 26 | public class UnauthorizedSessionException extends LouieException { 27 | public UnauthorizedSessionException(SessionKey key) { 28 | super("Invalid Session Key: "+(key==null?null:key.getKey())); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/stream/SingleConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.stream; 17 | 18 | /** 19 | * @author eyasukoc 20 | * @param Type of the returned object(s) 21 | */ 22 | public class SingleConsumer extends Consumer{ 23 | 24 | private T item; 25 | 26 | public SingleConsumer() {}; 27 | 28 | @Override 29 | public void consume(T item) { 30 | this.item = item; 31 | } 32 | 33 | public T get() { 34 | return item; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/process/ServiceCall.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.process; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface ServiceCall { 30 | String javadoc() default ""; 31 | String[] args() default {""}; 32 | } 33 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/exception/LouieException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.exception; 17 | 18 | /** 19 | * Base Louie Exception 20 | * @author eyasukoc 21 | */ 22 | public class LouieException extends Exception{ 23 | public LouieException (String message) { 24 | super(message); 25 | } 26 | 27 | public LouieException (Exception ex) { 28 | super(ex); 29 | } 30 | 31 | public LouieException (String message, Exception ex) { 32 | super(message, ex); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageOperation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * @author sfong 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface MessageOperation { 30 | // String[] args() default {""}; 31 | // String type() default ""; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /swagr/client/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | gfv3ee6 17 | 18 | 19 | -------------------------------------------------------------------------------- /swagr/server/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | gfv3ee6 17 | 18 | 19 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/src/main/config/dev/louie-dev.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/connection/Connectable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.connection; 17 | 18 | /** 19 | * Interface to allow manipulation of an underlying LouieConnection 20 | */ 21 | public interface Connectable { 22 | /** 23 | * Set the underlying connection 24 | * @param conn 25 | */ 26 | public void setConnection(LouieConnection conn); 27 | 28 | /** 29 | * Return the underlying connection 30 | * @return a connections 31 | */ 32 | public LouieConnection getConnection(); 33 | } 34 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/ServiceStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.store.ServiceStore', { 18 | requires: ['Ext.data.Store'], 19 | extend: 'Ext.data.Store', 20 | model: 'RH.model.ServiceModel', 21 | autoLoad: false, 22 | proxy: { 23 | actionMethods: { read: 'POST'}, 24 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 25 | type: 'ajax', 26 | noCache: false, 27 | url: '/swagrserver/json' 28 | }, 29 | sorters: [{ 30 | property: 'service' 31 | }] 32 | }); 33 | -------------------------------------------------------------------------------- /engine/src/main/resources/louie/system.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Rhythm & Hues Studios. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package louie; 16 | 17 | option java_package = "com.rhythm.pb"; 18 | option java_outer_classname = "SystemProtos"; 19 | option java_generate_equals_and_hash = true; 20 | 21 | message SystemPropertiesPB { 22 | optional uint64 serverTime = 1; 23 | repeated FieldTimePB fields = 2; 24 | optional bool sparse = 3 [default = false]; 25 | } 26 | 27 | message FieldTimePB { 28 | optional uint32 fieldid = 1; 29 | optional uint64 serverTime = 2; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /processor/src/main/java/com/rhythm/louie/Grouping.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | /** 23 | * 24 | * @author eyasukoc 25 | */ 26 | 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Grouping { 30 | //method level grouping for information display purposes 31 | String group(); 32 | int groupOrder() default -1; 33 | } 34 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/store/LocationStore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.store.LocationStore', { 18 | requires: ['Ext.data.Store'], 19 | extend: 'Ext.data.Store', 20 | model: 'RH.model.LocationModel', 21 | autoLoad: false, 22 | proxy: { 23 | actionMethods: { read: 'POST'}, 24 | headers: {'Content-Type': 'application/json; charset=utf-8' }, 25 | type: 'ajax', 26 | noCache: false, 27 | url: '/swagrserver/json' 28 | }, 29 | sorters: [{ 30 | property: 'location' 31 | }] 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/cache/Cache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.cache; 17 | 18 | import java.util.Map; 19 | 20 | /** 21 | * @author cjohnson 22 | * Created: Feb 10, 2011 2:03:55 PM 23 | */ 24 | public interface Cache { 25 | 26 | void put(K key, V value) throws Exception; 27 | 28 | V get(K key); 29 | 30 | void remove(K key) throws Exception; 31 | 32 | void clear() throws Exception; 33 | 34 | String getCacheName(); 35 | 36 | void putAll(Map map) throws Exception; 37 | 38 | int getSize(); 39 | } 40 | -------------------------------------------------------------------------------- /engine/src/main/resources/louie/message.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Rhythm & Hues Studios. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package louie; 16 | 17 | import "louie/datatype.proto"; 18 | 19 | option java_package = "com.rhythm.pb"; 20 | option java_outer_classname = "MessageProtos"; 21 | option java_generate_equals_and_hash = true; 22 | 23 | message UpdateMessage { 24 | required uint64 id = 1; 25 | required string type = 2; 26 | required louie.DateTimePB when = 3; 27 | required string data = 4; 28 | optional bool delete = 5; 29 | optional bool new = 6; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/async/PipeIOBundle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.async; 17 | 18 | import com.google.protobuf.Message; 19 | 20 | 21 | /** 22 | * Generic placeholder bundle, meant for pipe action for remote requests 23 | * @author eyasukoc 24 | * @param 25 | */ 26 | public class PipeIOBundle extends AsyncIOBundle{ 27 | 28 | public PipeIOBundle(String address) { 29 | super(null, address, 0); 30 | } 31 | 32 | public void setResponseMessage(T msg) { 33 | super.responseMsg = msg; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/auth/AuthRemoteClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.auth; 17 | 18 | import com.rhythm.louie.connection.LouieConnection; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public class AuthRemoteClient extends AuthServiceClient { 25 | private final LouieConnection connection; 26 | public AuthRemoteClient(LouieConnection connection) { 27 | super(connection); 28 | this.connection=connection; 29 | } 30 | 31 | public LouieConnection getConnection() { 32 | return connection; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /activemq-adapter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | com.rhythm.louie 7 | louie-parent 8 | 2.0-beta 9 | 10 | 11 | louie-activemq-adapter 12 | jar 13 | Louie ActiveMQ Adapter 14 | ActiveMQ Message Handler 15 | 16 | 17 | 18 | com.rhythm.louie 19 | louie 20 | 2.0-beta 21 | 22 | 23 | org.apache.activemq 24 | activemq-client 25 | 5.9.0 26 | 27 | 28 | 29 | apache20 30 | 31 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/layer/CustomServiceLayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service.layer; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class CustomServiceLayer implements ServiceLayer { 23 | private final String className; 24 | 25 | public CustomServiceLayer(String className) { 26 | this.className = className; 27 | } 28 | 29 | @SuppressWarnings("unchecked") 30 | @Override 31 | public T loadLayer(Class service) throws Exception { 32 | return (T) Class.forName(className).newInstance(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | test.single 5 | 6 | * 7 | 8 | 9 | test-compile 10 | surefire:test 11 | 12 | 13 | ${packageClassName} 14 | false 15 | 16 | 17 | 18 | CUSTOM-compile java PBs 19 | compile java PBs 20 | 21 | remote-resources:process 22 | louie:pbcompile 23 | 24 | 25 | 26 | CUSTOM-clean build +python 27 | clean build +python 28 | 29 | clean 30 | install 31 | 32 | 33 | python 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /archetype/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.rhythm.louie 7 | louie-parent 8 | 2.0-beta 9 | 10 | louie-archetype 11 | maven-archetype 12 | 13 | Louie Archetype 14 | Maven Archetype for creating Louie-based services 15 | 16 | 17 | 18 | 19 | org.apache.maven.archetype 20 | archetype-packaging 21 | 2.2 22 | 23 | 24 | 25 | 26 | 27 | 28 | maven-archetype-plugin 29 | 2.2 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/navbar.vm: -------------------------------------------------------------------------------- 1 |
27 | -------------------------------------------------------------------------------- /swagr/service/src/main/java/com/rhythm/swagr/datasource/DrjJdbc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.swagr.datasource; 17 | 18 | import com.rhythm.louie.jdbc.DatasourceFactory; 19 | import com.rhythm.louie.jdbc.JdbcFactory; 20 | 21 | public class DrjJdbc { 22 | static final String DB_KEY = "drj"; 23 | static final String DATASOURCE = "jdbc/DBstatistics"; 24 | 25 | private DrjJdbc() {} 26 | 27 | /** 28 | * Returns a factory that creates connections using JNDI 29 | * @return JdbcFactory 30 | */ 31 | public static JdbcFactory getFactory() { 32 | return new DatasourceFactory(DATASOURCE, DB_KEY); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /plugin/src/main/java/com/rhythm/louie/clientgen/ParamInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.clientgen; 17 | 18 | /** 19 | * 20 | * @author sfong 21 | */ 22 | public class ParamInfo { 23 | 24 | private final Class param; 25 | private final String name; 26 | 27 | public ParamInfo(Class param, String name) { 28 | this.param = param; 29 | this.name = name; 30 | } 31 | 32 | public Class getParam() { 33 | return param; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public String getPbType() { 41 | return param.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /swagr/service/src/main/java/com/rhythm/swagr/datasource/SwagrJdbc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.rhythm.swagr.datasource; 18 | 19 | import com.rhythm.louie.jdbc.DatasourceFactory; 20 | import com.rhythm.louie.jdbc.JdbcFactory; 21 | 22 | public class SwagrJdbc { 23 | static final String DB_KEY = "swagr"; 24 | static final String DATASOURCE = "jdbc/swagrDS"; 25 | 26 | private SwagrJdbc() {} 27 | 28 | /** 29 | * Returns a factory that creates connections using JNDI 30 | * @return JdbcFactory 31 | */ 32 | public static JdbcFactory getFactory() { 33 | return new DatasourceFactory(DATASOURCE, DB_KEY); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /engine/src/main/resources/louie/jms/jms.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Rhythm & Hues Studios. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package louie.jms; 16 | 17 | import "louie/options.proto"; 18 | import "louie/datatype.proto"; 19 | import "google/protobuf/descriptor.proto"; 20 | 21 | option java_package = "com.rhythm.louie.jms"; 22 | option java_outer_classname = "JmsProtos"; 23 | option java_generate_equals_and_hash = true; 24 | 25 | message MessageBPB { 26 | optional string action = 1; 27 | repeated ContentPB content = 2; 28 | optional sint64 timestamp = 3; 29 | } 30 | 31 | message ContentPB { 32 | optional string type = 1; 33 | optional bytes content = 2; 34 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/JmsAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | import java.util.Map; 19 | 20 | import javax.jms.QueueConnectionFactory; 21 | import javax.jms.TopicConnectionFactory; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | public interface JmsAdapter { 28 | public static String HOST_KEY = "host"; 29 | public static String PORT_KEY = "port"; 30 | public static String FAILOVER_KEY = "failover"; 31 | 32 | public void configure(Map configs); 33 | 34 | public QueueConnectionFactory getQueueConnectionFactory(); 35 | 36 | public TopicConnectionFactory getTopicConnectionFactory(); 37 | } 38 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/devtest/DevTestDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.devtest; 17 | 18 | import com.rhythm.louie.DAO; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | @DAO 25 | public class DevTestDAO implements DevTestService { 26 | 27 | @Override 28 | public String messageTest(String message) throws Exception { 29 | throw new UnsupportedOperationException("Not supported yet."); 30 | } 31 | 32 | @Override 33 | public Boolean sendEmail(String sender, String receiver, String subject, String body) throws Exception { 34 | throw new UnsupportedOperationException("Not supported yet."); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/sql/SqlService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.sql; 17 | 18 | import java.util.List; 19 | 20 | import com.rhythm.louie.sql.SqlProtos.*; 21 | 22 | import com.rhythm.louie.Service; 23 | 24 | @Service 25 | public interface SqlService { 26 | public static final String SERVICE_NAME = "sql"; 27 | 28 | /** 29 | * Performs the sql lookup returning the rows that were found. The first row 30 | * returned contains the column headers and datatypes 31 | * 32 | * @param statement 33 | * @return List of SqlResultPB 34 | * @throws Exception 35 | */ 36 | List query(SqlStatementPB statement) throws Exception; 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class MessageContext { 23 | final private static MessageContext SINGLETON = new MessageContext(); 24 | 25 | ThreadLocal message; 26 | 27 | private MessageContext() { 28 | message = new ThreadLocal(); 29 | } 30 | 31 | public static MessageInfo getMessage() { 32 | return SINGLETON.message.get(); 33 | } 34 | 35 | public static void setMessage(MessageInfo msg) { 36 | SINGLETON.message.set(msg); 37 | } 38 | 39 | public static void clearMessage() { 40 | SINGLETON.message.remove(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/StandardJdbcFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class StandardJdbcFactory implements JdbcFactory { 23 | private final String dbKey; 24 | private final ConnectionFactory connFactory; 25 | public StandardJdbcFactory(ConnectionFactory connFactory, String dbKey) { 26 | this.connFactory = connFactory; 27 | this.dbKey = dbKey; 28 | } 29 | 30 | @Override 31 | public JdbcService newService(String sql) throws Exception { 32 | DefaultJdbcService service = new DefaultJdbcService(connFactory,dbKey); 33 | service.setSqlString(sql); 34 | return service; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/site/resources/glassfish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # glassfish: Starts the Glassfish service 4 | # 5 | # Version: @(#) /etc/rc.d/init.d/glassfish 1.0 6 | # 7 | ### BEGIN INIT INFO 8 | # Provides: glassfish 9 | # Required-Start: $network 10 | # Required-Stop: $network 11 | # Default-Start: 2 3 5 12 | # Default-Stop: i 0 1 6 13 | # Description: Starts the Glassfish Application Server 14 | # 15 | # 16 | ### END INIT INFO 17 | 18 | # Configure these values for your environment 19 | GF_USER=%YOUR_USERNAME% 20 | GF_HOME=%PATH_TO_GFDIR%/glassfish4 21 | JAVAHOME=%PATH_TO_YOUR_JDK% 22 | 23 | ASADMIN=$GF_HOME/bin/asadmin 24 | [ -x $ASADMIN ] || exit 0 25 | 26 | SU="su $GF_USER -s /bin/tcsh --command " 27 | export JAVA_HOME=$JAVAHOME 28 | export AS_JAVA="$JAVA_HOME" 29 | 30 | # See how we were called. 31 | case "$1" in 32 | start) 33 | echo -n "Starting Glassfish Server: " 34 | $SU "$ASADMIN start-domain domain1" 35 | ;; 36 | stop) 37 | echo -n "Shutting down Glassfish Server: " 38 | $SU "$ASADMIN stop-domain domain1" 39 | ;; 40 | restart) 41 | echo -n "Shutting down Glassfish Server: " 42 | $SU "$ASADMIN stop-domain domain1" 43 | echo 44 | echo -n "Starting Glassfish Server: " 45 | $SU "$ASADMIN start-domain domain1" 46 | ;; 47 | *) 48 | echo "Usage: glassfish {start|stop|restart}" 49 | exit 1 50 | esac 51 | 52 | exit 0 53 | 54 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/util/SystemUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.util; 17 | 18 | import com.rhythm.pb.SystemProtos.SystemPropertiesPB; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public class SystemUtils { 25 | public static SystemPropertiesPB currentTimeProperty() { 26 | return SystemPropertiesPB.newBuilder() 27 | .setServerTime(System.currentTimeMillis()).build(); 28 | } 29 | 30 | public static SystemPropertiesPB currentTimeProperty(boolean sparse) { 31 | return SystemPropertiesPB.newBuilder() 32 | .setServerTime(System.currentTimeMillis()) 33 | .setSparse(sparse) 34 | .build(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/stream/ListConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.stream; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | /** 22 | * @author eyasukoc 23 | * @param Type of the returned object(s) 24 | */ 25 | public class ListConsumer extends Consumer{ 26 | 27 | private final ArrayList list = new ArrayList<>(); 28 | 29 | public ListConsumer() {} 30 | 31 | @Override 32 | public void informMessageCount(int count) { 33 | list.ensureCapacity(count); 34 | } 35 | 36 | @Override 37 | public void consume(T item) { 38 | list.add(item); 39 | } 40 | 41 | public List get() { 42 | return list; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | /** 19 | * 20 | * @author sfong 21 | */ 22 | public enum MessageType { 23 | DDR("type LIKE '%rh.pb.ddr.%'"), 24 | EMPLOYEE("type LIKE '%rh.pb.employee.%'"), 25 | SCENE("type LIKE '%rh.pb.scene.%'"), 26 | STAGE("type LIKE '%rh.pb.stage.%'"), 27 | JOB("type LIKE '%rh.pb.job.%'"), 28 | SETDATA("type LIKE '%rh.pb.setdata.%'"); 29 | 30 | private final String clause; 31 | 32 | MessageType(String clause) { 33 | this.clause = clause; 34 | } 35 | 36 | public String getClause() { 37 | return clause; 38 | } 39 | 40 | @Override 41 | public String toString() { 42 | return clause; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/downloads.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Louie(${contextPath}) - Downloads 5 | 6 | #parse("templates/header.vm") 7 | 8 | 9 | 10 | 11 | #parse("templates/navbar.vm") 12 | 13 |
14 | 15 | 16 | 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 |

Downloads

31 |
32 |
33 | 34 |
35 | #if($pyError == "") 36 | Download Python zip 37 | #else 38 | ${pyError} 39 | #end 40 |
41 | 42 |
43 |
44 |
45 | 46 | #parse("templates/footer.vm") 47 | 48 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/DatasourceConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | import java.sql.Connection; 19 | 20 | import javax.naming.InitialContext; 21 | import javax.sql.DataSource; 22 | 23 | /** 24 | * 25 | * @author cjohnson 26 | */ 27 | public class DatasourceConnectionFactory implements ConnectionFactory { 28 | 29 | private final String datasource; 30 | 31 | public DatasourceConnectionFactory(String datasource) { 32 | this.datasource = datasource; 33 | } 34 | 35 | @Override 36 | public Connection createConnection() throws Exception { 37 | InitialContext ic = new InitialContext(); 38 | DataSource ds = (DataSource) ic.lookup(datasource); 39 | return ds.getConnection(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/RequestContextManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class RequestContextManager { 23 | 24 | final private static RequestContextManager SINGLETON = new RequestContextManager(); 25 | 26 | ThreadLocal request; 27 | 28 | private RequestContextManager() { 29 | request = new ThreadLocal<>(); 30 | } 31 | 32 | public static RequestContext getRequest() { 33 | return SINGLETON.request.get(); 34 | } 35 | 36 | protected static void setRequest(RequestContext req) { 37 | SINGLETON.request.set(req); 38 | } 39 | 40 | protected static void clearRequest() { 41 | SINGLETON.request.remove(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/service/src/test/java/__service_lowercase__/__service_titlecase__Test.java: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | /* 5 | * ${service_titlecase}Test.java 6 | */ 7 | 8 | package ${package}.${service_lowercase}; 9 | 10 | import com.rhythm.louie.connection.Identity; 11 | import com.rhythm.louie.connection.LouieConnection; 12 | import com.rhythm.louie.connection.LouieConnectionFactory; 13 | import com.rhythm.pb.RequestProtos.IdentityPB; 14 | 15 | import ${package}.${service_lowercase}.${service_titlecase}Protos.*; 16 | 17 | import org.junit.Test; 18 | import static org.junit.Assert.*; 19 | 20 | public class ${service_titlecase}Test { 21 | 22 | private final ${service_titlecase}Client client; 23 | 24 | public ${service_titlecase}Test() { 25 | IdentityPB id = Identity.createJUnitIdentity(); 26 | LouieConnection connection = LouieConnectionFactory.getConnection("localhost", id); 27 | connection.setGateway("${rootArtifactId}"); 28 | 29 | client = ${service_titlecase}ClientFactory.getClient(connection); 30 | } 31 | 32 | @Test 33 | public void basicTest() throws Exception { 34 | String example = "Hello World!"; 35 | ${service_titlecase}ResponsePB response = client.basicRequest(example); 36 | System.out.println(response); 37 | assertNotNull(response); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /swagr/client/src/main/webapp/HashSet.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | Ext.define('RH.HashSet', { 18 | 19 | constructor: function() { 20 | this._arr = new Array(); 21 | }, 22 | 23 | add: function(e) { 24 | var arr = this._arr; 25 | var i = arr.indexOf(e); 26 | if (i == -1) arr.push(e); 27 | }, 28 | 29 | get: function(i) { 30 | return this._arr[i]; 31 | }, 32 | 33 | size: function(i) { 34 | return this._arr.length; 35 | }, 36 | 37 | remove: function(e) { 38 | var arr =this._arr; 39 | var i = arr.indexOf(e); 40 | if (i != -1) arr.splice(i, 1); 41 | }, 42 | 43 | toString: function() { 44 | return this._arr.join(','); 45 | }, 46 | 47 | toArray: function() { 48 | return this._arr; 49 | } 50 | 51 | }); -------------------------------------------------------------------------------- /engine/assembly/python.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | python 11 | false 12 | 13 | zip 14 | 15 | 16 | 17 | true 18 | / 19 | src/main/python 20 | 21 | 22 | true 23 | / 24 | target/generated-sources/python 25 | 26 | **/*.py 27 | 28 | 29 | 30 | 31 | 44 | 45 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/data/DataParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request.data; 17 | 18 | import com.google.protobuf.AbstractMessage.Builder; 19 | 20 | /** 21 | * @author cjohnson 22 | * Created: Aug 17, 2011 5:39:57 PM 23 | */ 24 | public interface DataParser { 25 | public abstract A parseData(Data data) throws Exception; 26 | 27 | public class BuilderParser implements DataParser { 28 | Builder builder; 29 | 30 | public BuilderParser(Builder builder) { 31 | this.builder = builder.clone().clear(); 32 | } 33 | 34 | @Override 35 | @SuppressWarnings("unchecked") 36 | public A parseData(Data data) throws Exception { 37 | return(A) data.merge(builder.clone()).build(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/DatasourceFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | /** 19 | * 20 | * @author cjohnson 21 | */ 22 | public class DatasourceFactory implements JdbcFactory { 23 | private final String dbKey; 24 | private final String datasource; 25 | private final ConnectionFactory connFactory; 26 | 27 | public DatasourceFactory(String datasource, String dbKey) { 28 | this.datasource = datasource; 29 | this.dbKey = dbKey; 30 | connFactory = new DatasourceConnectionFactory(datasource); 31 | } 32 | 33 | @Override 34 | public JdbcService newService(String sql) throws Exception { 35 | DefaultJdbcService service = new DefaultJdbcService(connFactory,dbKey); 36 | service.setSqlString(sql); 37 | return service; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Louie 2 | Louie is a service networking framework designed to minimize the effort needed to efficiently access information from varying sources and locations. Services are constructed in modular layers that allow for an adaptable network that 3 | scales as needed. Service clients are automatically generated for various languages, allowing a single server to feed data to all of your applications with a unified API. 4 | 5 | ## Why 6 | Louie was created to solve a few critical issues faced by Rhythm & Hues' international visual effects pipeline. Among these were data locality, global consistency, and fast, multi-language client support. Louie leverages Google's Protocol Buffers as it's common objects, and by auto-generating corresponding clients in Python, you can create an efficient multi-language service-based API. 7 | 8 | ## Getting Started 9 | * **Step 1:** [Read up](https://developers.google.com/protocol-buffers/docs/overview) and [install](https://developers.google.com/protocol-buffers/docs/downloads) Google's Protocol Buffers (protobuf) 10 | * **Step 2:** Read up on [Louie](http://louie.rhythm.com) 11 | * **Step 3:** Download and install [Java 7](http://www.oracle.com/technetwork/java/javase/downloads/index.html) 12 | * **Step 4:** Download and install [Maven](http://maven.apache.org/download.cgi) 13 | * **Step 5:** Download and install [Netbeans with Glassfish](https://netbeans.org/downloads/) 14 | * **Step 6:** Clone the repo, and then build it! 15 | ``` 16 | ~/louie> mvn clean install 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/async/AsyncIOCallable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.async; 17 | 18 | import java.io.IOException; 19 | import java.util.List; 20 | import java.util.concurrent.Callable; 21 | 22 | /** 23 | * Callable implementation for use in streaming asynchronous multiplexed calls. 24 | * @author eyasukoc 25 | */ 26 | public class AsyncIOCallable implements Callable> { 27 | 28 | private final AsyncIO io; 29 | private final List bundles; 30 | 31 | public AsyncIOCallable(List outgoingBundles) throws IOException { 32 | io = new AsyncIO(); 33 | bundles = outgoingBundles; 34 | } 35 | 36 | @Override 37 | public List call() throws Exception { 38 | io.execute(bundles); 39 | return null; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | /** 19 | * 20 | * @author sfong 21 | */ 22 | public enum MessageAction { 23 | UPDATE("update"), 24 | DELETE("delete"), 25 | INSERT("insert"); 26 | 27 | private final String action; 28 | 29 | MessageAction(String action) { 30 | this.action = action; 31 | } 32 | 33 | public String getAction() { 34 | return action; 35 | } 36 | 37 | public static MessageAction typeFromAction(String action) { 38 | for (MessageAction type : values()){ 39 | if (type.action.equals(action)) { 40 | return type; 41 | } 42 | } 43 | return null; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return action; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/site/apt/manual/develop/logging.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Logging 3 | ------ 4 | 5 | Logging 6 | 7 | Louie utilizes logging frameworks to primarily record requests and database queries. You can also access information about cache events, messages, and debugging information. Logging of request and database queries allows you to analyze usage and patterns. 8 | 9 | * {{{http://www.slf4j.org/}SLF4J}} 10 | 11 | All logging throughout Louie uses {{{http://www.slf4j.org/}SLF4J}}, which provides a facade to the actual logging code so that the actual logging implementation can be simply loaded at run time. 12 | 13 | * {{{http://code.google.com/p/log4jdbc/}Log4jdbc}} 14 | 15 | {{{http://code.google.com/p/log4jdbc/}Log4jdbc}} is a Java JDBC driver that 16 | can log JDBC calls and optionally timing information for other JDBC drivers 17 | using SLF4J. When using the including Jdbc utilties, we inject this driver 18 | automatically into the connection so that all queries can be captured and logged. 19 | 20 | * {{{http://logging.apache.org/log4j/2.x/}Log4J2}} 21 | 22 | The Louie archetype will template out a server configuration to use 23 | {{{http://logging.apache.org/log4j/2.x/}Log4J2}}. This is our preferred 24 | logging framework, but you can change the dependency bindings to a different 25 | slf4j adapter. You will need to account for the Log4Jdbc configurations. 26 | Log4j2 provides a Routing Appender which we are using in the default log4j2.xml 27 | to split logging into different files based upon your logger key. 28 | 29 | 30 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/connection/Response.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.connection; 17 | 18 | import java.util.List; 19 | 20 | import com.rhythm.pb.RequestProtos.ErrorPB; 21 | import com.rhythm.pb.RequestProtos.ResponsePB; 22 | import com.rhythm.pb.RequestProtos.RoutePathPB; 23 | 24 | /** 25 | * @author cjohnson 26 | * Created: Jan 17, 2012 2:36:16 PM 27 | */ 28 | public class Response { 29 | private final ResponsePB response; 30 | 31 | public Response(ResponsePB response) { 32 | this.response = response; 33 | } 34 | 35 | public List getRouteList() { 36 | return response.getRouteList(); 37 | } 38 | 39 | public ErrorPB getError() { 40 | return response.getError(); 41 | } 42 | 43 | public int getResultCount() { 44 | return response.getCount(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/auth/AuthUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.auth; 17 | 18 | import com.rhythm.pb.RequestProtos.IdentityPB; 19 | import com.rhythm.pb.RequestProtos.SessionKey; 20 | 21 | /** 22 | * 23 | * @author cjohnson 24 | */ 25 | public class AuthUtils { 26 | 27 | public static SessionStat accessSession(SessionKey key) throws UnauthorizedSessionException,Exception { 28 | SessionStat session = AuthDMO.getInstance().getSessionStat(key); 29 | if (session == null || session.getIdentity()==null) { 30 | throw new UnauthorizedSessionException(key); 31 | } 32 | session.update(); 33 | return session; 34 | } 35 | 36 | public static SessionKey createKey(IdentityPB identity) throws Exception { 37 | return AuthDMO.getInstance().createSession(identity); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /engine/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | test.single 5 | 6 | * 7 | 8 | 9 | test-compile 10 | surefire:test 11 | 12 | 13 | ${packageClassName} 14 | false 15 | 16 | 17 | 18 | CUSTOM-compile java PBs 19 | compile java PBs 20 | 21 | remote-resources:process 22 | louie:pbcompile 23 | 24 | 25 | 26 | CUSTOM-clean build +python 27 | clean build +python 28 | 29 | clean 30 | install 31 | 32 | 33 | python 34 | 35 | 36 | 37 | CUSTOM-clean build error 38 | clean build error 39 | 40 | clean 41 | install 42 | -e 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/connection/SSLConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.connection; 17 | 18 | import java.io.IOException; 19 | import java.security.GeneralSecurityException; 20 | import java.security.cert.CertificateException; 21 | import javax.net.ssl.SSLSocketFactory; 22 | 23 | /** 24 | * 25 | * @author eyasukoc 26 | */ 27 | public interface SSLConfig { 28 | 29 | public SSLSocketFactory getSSLSocketFactory() throws IOException, CertificateException, 30 | GeneralSecurityException; 31 | 32 | public void setSSLPass(String pass); 33 | 34 | public void setSSLCAPass(String pass); 35 | 36 | public void setHost(String host); 37 | 38 | public String getHost(); 39 | 40 | public int getPort(); 41 | 42 | public String getGateway(); 43 | 44 | public String getClientCertificate(); 45 | 46 | public String getCAKeystore(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/Service.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service; 17 | 18 | import java.util.Collection; 19 | 20 | import com.rhythm.louie.jms.MessageHandler; 21 | 22 | import com.rhythm.louie.request.RequestContext; 23 | import com.rhythm.louie.request.data.Result; 24 | import com.rhythm.louie.service.command.PBCommand; 25 | 26 | /** 27 | * 28 | * @author chris 29 | */ 30 | public interface Service { 31 | static final String PK_CHECK_ERROR = "Invalid request Parameters!"; 32 | 33 | Result executeCommand(RequestContext req) throws Exception; 34 | 35 | Collection getCommands(); 36 | 37 | String getServiceName(); 38 | 39 | Class getServiceInterface(); 40 | 41 | void initialize() throws Exception; 42 | 43 | void shutdown() throws Exception; 44 | 45 | MessageHandler getMessageHandler(); 46 | 47 | boolean isReserved(); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /processor/src/main/resources/templates/RemoteService.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | import com.rhythm.louie.connection.Connectable; 9 | import com.rhythm.louie.connection.LouieConnection; 10 | 11 | public class ${className} implements ${info.serviceClassName}, Connectable { 12 | private final ${baseName}ServiceClient remoteClient; 13 | 14 | public ${className}() { 15 | this.remoteClient = new ${baseName}ServiceClient(); 16 | } 17 | public ${className}(LouieConnection connection) { 18 | this.remoteClient = new ${baseName}ServiceClient(connection); 19 | } 20 | 21 | public ${baseName}Client getRemoteClient() { 22 | return remoteClient; 23 | } 24 | 25 | @Override 26 | public void setConnection(LouieConnection connection) { 27 | remoteClient.setConnection(connection); 28 | } 29 | 30 | @Override 31 | public LouieConnection getConnection() { 32 | return remoteClient.getConnection(); 33 | } 34 | #foreach($method in $info.methodInfos) 35 | 36 | #if ($method.isDeprecated()) 37 | @Deprecated 38 | #end 39 | @Override 40 | public ${method.returnType} ${method.name}(${method.paramString})${method.throwsClause} { 41 | #if ($method.isClientAccess()) 42 | return this.remoteClient.${method.name}(${method.paramNameString}); 43 | #else 44 | throw new UnsupportedOperationException("This method is Internal and cannot be executed on a remote instance"); 45 | #end 46 | } 47 | #end 48 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/service/command/PBCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.service.command; 17 | 18 | import java.util.List; 19 | 20 | import com.rhythm.louie.request.RequestContext; 21 | import com.rhythm.louie.request.data.Result; 22 | 23 | /** 24 | * @author cjohnson 25 | * Created: Mar 17, 2011 1:53:01 PM 26 | */ 27 | public interface PBCommand { 28 | public List getArguments(); 29 | public String getReturnType(); 30 | public String getCommandName(); 31 | public Result execute(RequestContext request) throws Exception; 32 | public String getDescription(); 33 | public boolean isDeprecated(); 34 | public boolean returnList(); 35 | public boolean isUpdate(); 36 | public String getGroup(); 37 | public int getGroupOrder(); 38 | public boolean isInternal(); 39 | public boolean isStreaming(); 40 | public boolean adminAccess(); 41 | public boolean restrictedAccess(); 42 | } 43 | -------------------------------------------------------------------------------- /engine/src/main/resources/louie/options.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Rhythm & Hues Studios. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package louie; 16 | 17 | import "google/protobuf/descriptor.proto"; 18 | 19 | option java_package = "com.rhythm.pb"; 20 | option java_outer_classname = "Options"; 21 | option java_generate_equals_and_hash = true; 22 | 23 | 24 | extend google.protobuf.FieldOptions { 25 | optional sint32 pk = 5000; 26 | } 27 | 28 | extend google.protobuf.FieldOptions { 29 | optional bool date = 5010 [default=false]; 30 | } 31 | extend google.protobuf.FieldOptions { 32 | optional bool datetime = 5011 [default=false]; 33 | } 34 | 35 | extend google.protobuf.FieldOptions { 36 | optional bool readonly = 5012 [default=false]; 37 | } 38 | 39 | extend google.protobuf.MessageOptions { 40 | optional bool wrapper = 5050 [default=true]; 41 | } 42 | 43 | extend google.protobuf.EnumValueOptions { 44 | optional string label = 1000; 45 | } 46 | 47 | extend google.protobuf.EnumValueOptions { 48 | optional string description = 1001; 49 | } 50 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/proto.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #parse("templates/header.vm") 5 | 6 | 7 | 8 | 9 | #parse("templates/navbar.vm") 10 | 11 |
12 | 13 | 14 | 21 | 22 | 23 |
24 |
25 | 26 |
27 |
28 |

$filename

29 |
30 |
31 | 32 | #if (!$error.isEmpty()) 33 |
34 |
35 |
36 |

$error

37 |
38 |
39 |
40 | #else 41 |
42 |
43 |
44 |
45 |
46 | #foreach($line in $file)
47 | $line
48 | #end
49 |                             
50 |
51 |
52 |
53 | #end 54 | 55 | #parse("templates/footer.vm") 56 | 57 | 58 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/devtest/DevTestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.devtest; 17 | 18 | import com.rhythm.louie.Service; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | @Service 25 | public interface DevTestService { 26 | final String SERVICE_NAME = "devtest"; 27 | 28 | /** 29 | * Generates a message using the configured JMS adapter, 30 | * and the same delegate should receive that message 31 | * 32 | * @param message 33 | * @return 34 | * @throws Exception 35 | */ 36 | public String messageTest(String message) throws Exception; 37 | 38 | /** 39 | * Test sending an email 40 | * @param sender 41 | * @param receiver 42 | * @param subject 43 | * @param body 44 | * @return 45 | * @throws Exception 46 | */ 47 | public Boolean sendEmail(String sender, String receiver, String subject, String body) throws Exception; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/server/CustomProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.server; 17 | 18 | import java.util.HashMap; 19 | import java.util.Map; 20 | 21 | /** 22 | * 23 | * @author eyasukoc 24 | */ 25 | public class CustomProperty { 26 | 27 | private final String name; 28 | private final Map properties; 29 | 30 | public CustomProperty(String name) { 31 | this.name = name; 32 | properties = new HashMap<>(); 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public void setProperty(String key, String value){ 40 | properties.put(key, value); 41 | } 42 | 43 | public String getProperty(String key) { 44 | return properties.get(key); 45 | } 46 | 47 | public String getProperty(String key, String def) { 48 | String value = properties.get(key); 49 | if (value == null) return def; 50 | return value; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/site/apt/manual/start/create.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Creating a project 3 | ------ 4 | 5 | Creating a new Louie project 6 | 7 | * From the command line: 8 | 9 | +-----+ 10 | mvn archetype:generate -DarchetypeGroupId='com.rhythm.louie' -DarchetypeArtifactId='louie-archetype' -DarchetypeVersion='1.12' 11 | 12 | Define value for property 'groupId': : com.somecompany 13 | Define value for property 'artifactId': : sample 14 | Define value for property 'version': 1.0-SNAPSHOT: : 15 | Define value for property 'package': com.somecompany: : 16 | Define value for property 'service_lowercase': : : sample 17 | Define value for property 'service_titlecase': : : Sample 18 | 19 | +-----+ 20 | 21 | * OR From NetBeans: 22 | 23 | 24 | [../../images/create/nb_new.png] 25 | 26 | <> 27 | 28 | [../../images/create/nb_from_arch.png] 29 | 30 | <> 31 | 32 | [../../images/create/nb_arch_filter.png] 33 | 34 | <> 35 | 36 | [../../images/create/nb_arch_args.png] 37 | 38 | <> 39 | 40 | [../../images/create/nb_generated.png] 41 | 42 | <> 43 | 44 | [../../images/create/nb_clean_build.png] 45 | 46 | <> 47 | 48 | Congratulations! Your first project is now created and compiled. 49 | Next you can {{{./addserver.html}add}} a GlassFish server to your NetBeans and then {{{./run.html}run}} the project! 50 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/MysqlConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | import java.sql.Connection; 19 | import java.sql.DriverManager; 20 | 21 | /** 22 | * 23 | * @author cjohnson 24 | */ 25 | public class MysqlConnectionFactory implements ConnectionFactory { 26 | private final String host; 27 | private final String db; 28 | private final String user; 29 | private final String pw; 30 | 31 | public MysqlConnectionFactory(String host, String db) { 32 | this (host,db,"",""); 33 | } 34 | 35 | public MysqlConnectionFactory(String host, String db, String user, String pw) { 36 | this.host = host; 37 | this.db = db; 38 | this.user = user; 39 | this.pw = pw; 40 | } 41 | 42 | @Override 43 | public Connection createConnection() throws Exception { 44 | Class.forName("com.mysql.jdbc.Driver"); 45 | return DriverManager.getConnection("jdbc:mysql://"+host+"/"+db,user,pw); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /engine/src/main/resources/config/louie-internal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 8080 9 | louie 10 | false 11 | 12 | 13 | true 14 | false 15 | true 16 | 17 | 18 | 19 | true 20 | com.rhythm.louie.services.info.InfoServiceFactory 21 | 22 | 23 | true 24 | com.rhythm.louie.services.auth.AuthServiceFactory 25 | 26 | 27 | true 28 | com.rhythm.louie.services.status.StatusServiceFactory 29 | 30 | 31 | 32 | 33 | 34 | 8 35 | 36 | 37 | 38 | % 39 | 40 | 41 | -------------------------------------------------------------------------------- /web/src/main/java/com/rhythm/louie/servlet/ServiceRegister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.servlet; 17 | 18 | import com.rhythm.louie.server.ServiceManager; 19 | 20 | import javax.servlet.ServletContextEvent; 21 | import javax.servlet.ServletContextListener; 22 | import javax.servlet.annotation.WebListener; 23 | 24 | import org.slf4j.LoggerFactory; 25 | 26 | /** 27 | * Web application lifecycle listener. 28 | * @author cjohnson 29 | */ 30 | @WebListener() 31 | public class ServiceRegister implements ServletContextListener { 32 | 33 | @Override 34 | public void contextInitialized(ServletContextEvent sce) { 35 | try { 36 | ServiceManager.initialize(sce.getServletContext()); 37 | } catch (Exception ex) { 38 | LoggerFactory.getLogger(ServiceRegister.class) 39 | .error("Error Initializing Services", ex); 40 | } 41 | } 42 | 43 | @Override 44 | public void contextDestroyed(ServletContextEvent sce) { 45 | ServiceManager.shutdown(); 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/cache/GuavaCache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.cache; 17 | 18 | import com.google.common.cache.CacheStats; 19 | import com.google.common.collect.ImmutableMap; 20 | 21 | import java.util.concurrent.Callable; 22 | import java.util.concurrent.ConcurrentMap; 23 | import java.util.concurrent.ExecutionException; 24 | 25 | /** 26 | * I hate that this exists. 27 | * It is done specifically so that the manager can handle it, and also so that 28 | * we can present an EMPTY cache if caching is disabled 29 | * @author eyasukoc 30 | */ 31 | public interface GuavaCache extends Cache { 32 | 33 | com.google.common.cache.Cache getGuava(); 34 | 35 | V get(K key, Callable valueLoader); 36 | 37 | V getIfPresent(K key); 38 | 39 | void refresh(K key); 40 | 41 | void cleanUp(); 42 | 43 | ConcurrentMap asMap(); 44 | 45 | ImmutableMap getAllPresent(Iterable keys); 46 | 47 | CacheStats getStats(); 48 | 49 | ImmutableMap getAll(Iterable keys) throws ExecutionException; 50 | } 51 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/connection/LouieConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.connection; 17 | 18 | import com.google.protobuf.Message; 19 | 20 | import com.rhythm.pb.RequestProtos.IdentityPB; 21 | import com.rhythm.pb.RequestProtos.SessionKey; 22 | 23 | import java.net.URLConnection; 24 | 25 | /** 26 | * 27 | * @author cjohnson 28 | */ 29 | public interface LouieConnection { 30 | 31 | IdentityPB getIdentity(); 32 | 33 | SessionKey getSessionKey() throws Exception; 34 | 35 | Response request(Request req) throws Exception; 36 | 37 | void setMaxTimeout(int seconds); 38 | 39 | int getMaxTimeout(); 40 | 41 | void setRetryEnable(boolean enable); 42 | 43 | boolean getRetryEnable(); 44 | 45 | void enableAuthPort(boolean enable); 46 | 47 | void setGateway(String gateway); 48 | 49 | String getGateway(); 50 | 51 | void setPort(int port); 52 | 53 | URLConnection getJsonForwardingConnection() throws Exception; 54 | 55 | URLConnection getForwardingConnection() throws Exception; 56 | 57 | } 58 | -------------------------------------------------------------------------------- /archetype/src/main/resources/archetype-resources/server/assembly/python.xml: -------------------------------------------------------------------------------- 1 | #set( $symbol_pound = '#' ) 2 | #set( $symbol_dollar = '$' ) 3 | #set( $symbol_escape = '\' ) 4 | 5 | 12 | 13 | python 14 | false 15 | 16 | zip 17 | 18 | 19 | 20 | true 21 | / 22 | src/main/python 23 | 24 | 25 | true 26 | / 27 | target/generated-sources/python 28 | 29 | **/*.py 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | true 38 | 39 | ${groupId}:${rootArtifactId}-service:zip:python:* 40 | 41 | / 42 | 43 | 44 | true 45 | 46 | com.rhythm.louie:louie:zip:python:* 47 | 48 | / 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jdbc/DBUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jdbc; 17 | 18 | import java.sql.PreparedStatement; 19 | import java.sql.SQLException; 20 | import java.sql.Types; 21 | 22 | 23 | /** 24 | * @author cjohnson 25 | * Created: Sep 2, 2011 11:23:21 AM 26 | */ 27 | public class DBUtils { 28 | public static void setStringOrNull(PreparedStatement ps, int index, String s) throws SQLException { 29 | if (s==null) { 30 | ps.setNull(index, Types.VARCHAR); 31 | } else { 32 | ps.setString(index, s); 33 | } 34 | } 35 | 36 | public static void setIntOrNull(PreparedStatement ps, int index, Integer i) throws SQLException { 37 | if (i==null) { 38 | ps.setNull(index, Types.INTEGER); 39 | } else { 40 | ps.setInt(index, i); 41 | } 42 | } 43 | 44 | public static void setIntPositiveOrNull(PreparedStatement ps, int index, int i) throws SQLException { 45 | if (i<=0) { 46 | ps.setNull(index, Types.INTEGER); 47 | } else { 48 | ps.setInt(index, i); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /processor/src/main/resources/templates/ServiceFactory.vm: -------------------------------------------------------------------------------- 1 | /*** GENERATED FROM ${info.inputFile} - DO NOT EDIT ***/ 2 | 3 | /* 4 | * ${className}.java 5 | */ 6 | package ${info.packageName}; 7 | 8 | import com.rhythm.louie.ServiceProvider; 9 | import com.rhythm.louie.server.ServiceProperties; 10 | import com.rhythm.louie.service.ServiceFactory; 11 | import com.rhythm.louie.service.ServiceUtils; 12 | 13 | @ServiceProvider 14 | public class ${className} implements ServiceFactory { 15 | 16 | private static final String serviceName = "${info.serviceName}"; 17 | 18 | public ${className}() {} 19 | 20 | @Deprecated 21 | public static ${className} getInstance() { 22 | return new ${className}(); 23 | } 24 | 25 | @Override 26 | public String getServiceName() { 27 | return serviceName; 28 | } 29 | 30 | public static ${info.serviceClassName} getServiceClient() throws Exception { 31 | return loadService().getDelegate(); 32 | } 33 | 34 | private static ${baseName}ServiceHandler service; 35 | 36 | @Override 37 | public ${baseName}ServiceHandler getService() throws Exception { 38 | return loadService(); 39 | } 40 | 41 | @SuppressWarnings("unchecked") 42 | private static synchronized ${baseName}ServiceHandler loadService() throws Exception { 43 | if (service!=null) { 44 | return service; 45 | } 46 | 47 | ServiceProperties props = ServiceProperties.getServiceProperties(serviceName); 48 | 49 | ${info.serviceClassName} serviceImpl = ServiceUtils.loadService(props.getServiceLayers(),${info.serviceClassName}.class); 50 | 51 | service = new ${baseName}ServiceHandler(); 52 | service.setDelegate(serviceImpl); 53 | return service; 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/cache/LoadingSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.rhythm.louie.cache; 18 | 19 | import com.google.common.base.Supplier; 20 | 21 | import org.slf4j.LoggerFactory; 22 | 23 | /** 24 | * A supplier that is able to deal with loading operations that throw exceptions. 25 | * In the event that load() throws an exception, the previous value retrieved is returned. 26 | * 27 | * @param 28 | */ 29 | public abstract class LoadingSupplier implements Supplier { 30 | 31 | private T previous = null; 32 | 33 | @Override 34 | public final T get() { 35 | try { 36 | previous = load(); 37 | } catch (Exception e) { 38 | LoggerFactory.getLogger(LoadingSupplier.class).error("Error looking up supplier value!", e); 39 | } 40 | return previous; 41 | } 42 | 43 | /** 44 | * Load an instance of the appropriate type. May throw an exception that will be 45 | * swallowed in the get(). 46 | * 47 | * @return the loaded value 48 | * @throws Exception if there was a problem loading the type. 49 | */ 50 | abstract public T load() throws Exception; 51 | } 52 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/servers.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Louie(${contextPath}) - Servers 5 | 6 | #parse("templates/header.vm") 7 | 8 | 9 | 10 | 11 | #parse("templates/navbar.vm") 12 | 13 |
55 | 56 | #parse("templates/footer.vm") 57 | 58 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/request/LogVars.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.request; 17 | 18 | /** 19 | * @author cjohnson 20 | * Created: Jun 14, 2011 5:34:45 PM 21 | */ 22 | public class LogVars { 23 | 24 | public static final String IP = "ip"; 25 | public static final String SESSION = "session"; 26 | public static final String TIME = "time"; 27 | public static final String EXECTIME = "exectime"; 28 | public static final String BYTES = "bytes"; 29 | public static final String ROWS = "rows"; 30 | public static final String RETURN = "return"; 31 | public static final String REQID = "reqid"; 32 | public static final String MODULE = "module"; 33 | public static final String LANGUAGE = "language"; 34 | 35 | // Used By Auth Logs 36 | public static final String USER = "user"; 37 | public static final String PROGRAM = "program"; 38 | public static final String LOCATION = "location"; 39 | public static final String MACHINE = "machine"; 40 | public static final String PATH = "path"; 41 | public static final String PROCESSID = "processId"; 42 | } 43 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/util/Lists.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.util; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public class Lists { 25 | private Lists() {} 26 | 27 | /** 28 | * Merges 2 lists as efficiently as possible. If either argument is null or empty, 29 | * the other is returned, favoring the first if both are. 30 | * 31 | * If both are non-empty, then the second list is added to the first and the first is returned. 32 | * 33 | * @param 34 | * @param first 35 | * @param second 36 | * @return returns either the first list or the second list, possibly modifying the first 37 | */ 38 | public static List mutableMerge(List first, List second) { 39 | if (first == null || first.isEmpty()) { 40 | if (second != null && !second.isEmpty()) { 41 | return second; 42 | } else { 43 | return first; 44 | } 45 | } else if (second == null || second.isEmpty()) { 46 | return first; 47 | } else { 48 | first.addAll(second); 49 | return first; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/jms/MessageInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.jms; 17 | 18 | import com.rhythm.louie.jms.JmsProtos.*; 19 | 20 | /** 21 | * 22 | * @author cjohnson 23 | */ 24 | public class MessageInfo { 25 | private final MessageBPB bundle; 26 | private final MessageAction action; 27 | private int contextIndex = -1; 28 | 29 | public MessageInfo(MessageBPB bundle) { 30 | this.bundle = bundle; 31 | action = MessageAction.typeFromAction(bundle.getAction()); 32 | } 33 | 34 | public MessageBPB getBundle() { 35 | return bundle; 36 | } 37 | 38 | public MessageAction getAction() { 39 | return action; 40 | } 41 | 42 | public int getContentCount() { 43 | return bundle.getContentCount(); 44 | } 45 | 46 | public int getContentIndex() { 47 | return contextIndex; 48 | } 49 | 50 | public boolean hasMoreContent() { 51 | return bundle.getContentCount()>(contextIndex+1); 52 | } 53 | 54 | public ContentPB getNextContent() throws Exception { 55 | return bundle.getContent(++contextIndex); 56 | } 57 | 58 | public ContentPB getCurrentContent() throws Exception { 59 | return bundle.getContent(contextIndex); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/connection/BasicSSLClientConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.connection; 17 | 18 | /** 19 | * 20 | * @author eyasukoc 21 | */ 22 | public class BasicSSLClientConfig extends SSLClientConfig implements SSLConfig{ 23 | 24 | private String gateway,clientCert,caKeystore; 25 | private int port; 26 | 27 | public BasicSSLClientConfig(String host) { 28 | setHost(host); 29 | } 30 | 31 | public void setPort(int port) { 32 | this.port = port; 33 | } 34 | 35 | @Override 36 | public int getPort() { 37 | return port; 38 | } 39 | 40 | public void setGateway(String gateway) { 41 | this.gateway = gateway; 42 | } 43 | 44 | @Override 45 | public String getGateway() { 46 | return gateway; 47 | } 48 | 49 | public void setClientCertificate(String certificatePath) { 50 | this.clientCert = certificatePath; 51 | } 52 | 53 | @Override 54 | public String getClientCertificate() { 55 | return clientCert; 56 | } 57 | 58 | public void setCAKeyStore(String keystorePath) { 59 | this.caKeystore = keystorePath; 60 | } 61 | 62 | @Override 63 | public String getCAKeystore() { 64 | return caKeystore; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/server/LocalConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.server; 17 | 18 | import java.net.InetAddress; 19 | import java.net.UnknownHostException; 20 | 21 | import org.slf4j.LoggerFactory; 22 | 23 | /** 24 | * @author cjohnson 25 | * Created: Jul 21, 2011 5:39:57 PM 26 | */ 27 | public class LocalConstants { 28 | public static final String HOST; 29 | public static final String HOSTDOMAIN; 30 | public static final String DOMAIN; 31 | public static final String IP; 32 | 33 | static { 34 | String host = ""; 35 | String hostdomain = ""; 36 | String domain = ""; 37 | String address = ""; 38 | try { 39 | host = InetAddress.getLocalHost().getHostName(); 40 | String[] components = host.split("\\."); 41 | host = components[0]; 42 | InetAddress me = InetAddress.getLocalHost(); 43 | hostdomain = me.getCanonicalHostName(); 44 | address = me.getHostAddress(); 45 | domain = hostdomain.replaceFirst(".*?\\.", ""); 46 | } catch (UnknownHostException ex) { 47 | LoggerFactory.getLogger(LocalConstants.class).error("Error initializing local host constants!", ex); 48 | } 49 | HOST=host; 50 | HOSTDOMAIN=hostdomain; 51 | DOMAIN=domain; 52 | IP = address; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/client/connection/JsonReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.client.connection; 17 | 18 | import java.io.BufferedReader; 19 | 20 | /** 21 | * @author cjohnson 22 | * Created: Jun 13, 2011 3:18:34 PM 23 | */ 24 | public class JsonReader { 25 | private BufferedReader reader; 26 | 27 | public JsonReader(BufferedReader reader) { 28 | this.reader = reader; 29 | } 30 | 31 | public String readJson() throws Exception { 32 | int i = reader.read(); 33 | char b = (char) i; 34 | 35 | if (i==-1) { 36 | return null; 37 | } else if (b!='{') { 38 | throw new Exception("JSON Parse Exception, Missing \"{\"!\n"); 39 | } 40 | StringBuilder sb = new StringBuilder(); 41 | sb.append(b); 42 | 43 | int level=1; 44 | while (level>0) { 45 | i = reader.read(); 46 | 47 | if (i==-1) { 48 | throw new Exception("JSON Parse Exception, EOF reached unexpectedly\n"); 49 | } 50 | 51 | b = (char) i; 52 | if (b=='{') { 53 | level++; 54 | } else if (b=='}') { 55 | level--; 56 | } 57 | sb.append(b); 58 | } 59 | String json = sb.toString(); 60 | return json; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/site/apt/manual/develop/service.apt: -------------------------------------------------------------------------------- 1 | ------ 2 | Writing a Service 3 | ------ 4 | 5 | Writing a Service 6 | 7 | * Defining a Service 8 | 9 | A Louie service is defined by simply tagging an interface with the @Service annotation. This flags the service for processing by the Louie annotation processor. Below is the example service generated by the Louie archetype. 10 | 11 | +-------+ 12 | @Service 13 | public interface SampleService { 14 | /** 15 | * An example service method which accepts a String 16 | * and returns a SampleResponsePB 17 | * 18 | * @param request 19 | * @return SampleResponsePB 20 | * @throws Exception 21 | */ 22 | SampleResponsePB basicRequest(String request) throws Exception; 23 | } 24 | +-------+ 25 | 26 | When defining services keep in mind the following rules: 27 | 28 | * The names of parameters must not be reserved words in a programming language (mainly just java,c,python,perl). The Louie compiler has a list of reserved words that it will prevent you from using one accidentally. The reason for this is how clients will be autogenerated in various languages. 29 | 30 | * The arguments to a service method must be: 31 | * Protocol Buffer object (ie Message) 32 | * Standard java Object (String,Integer,Long,Float,Double,Date,Boolean) 33 | * List of a standard java datatype, ie List 34 | * Lists of Protocol Buffers are not yet supported 35 | 36 | * The return type must be: 37 | * Protocol Buffer objects (ie Message) 38 | * Standard java datatype (String,Integer,Long,Float,Double,Date,Boolean) 39 | * List of a standard java datatype, ie List 40 | * List of a Protocul Buffer, ie List 41 | 42 | * Javadoc is optional, but encouraged. The javadoc comments section will propagate to client apis in the various languages. Therefore the docs should be as language agnostic as possible. 43 | 44 | 45 | * Service Method Tags 46 | 47 | Need some descriptions here... 48 | 49 | * Grouping 50 | 51 | * Updating 52 | 53 | * Internal 54 | 55 | * Disabled 56 | 57 | * Streaming -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/services/info/InfoService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.info; 17 | 18 | import java.util.List; 19 | 20 | import com.rhythm.louie.Service; 21 | 22 | import com.rhythm.louie.info.InfoProtos.*; 23 | 24 | /** 25 | * 26 | * @author cjohnson 27 | */ 28 | @Service 29 | public interface InfoService { 30 | public static final String SERVICE_NAME = "info"; 31 | 32 | /** 33 | * Returns the names of all services 34 | * 35 | * @return 36 | * @throws Exception 37 | */ 38 | List getAllServiceNames() throws Exception; 39 | 40 | /** 41 | * Returns info for all services 42 | * 43 | * @return 44 | * @throws Exception 45 | */ 46 | List getAllServices() throws Exception; 47 | 48 | /** 49 | * Returns info for a single service 50 | * 51 | * @param name 52 | * @return 53 | * @throws Exception 54 | */ 55 | ServicePB getService(String name) throws Exception; 56 | 57 | /** 58 | * Return a list of all unique locations in this server installation 59 | * 60 | * @return 61 | * @throws Exception 62 | */ 63 | List getServerLocations() throws Exception; 64 | 65 | /** 66 | * Return all Servers in this installation 67 | * 68 | * @return 69 | * @throws Exception 70 | */ 71 | List getServers() throws Exception; 72 | } 73 | -------------------------------------------------------------------------------- /web/src/main/resources/templates/build.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Louie(${contextPath}) - Build 5 | 6 | #parse("templates/header.vm") 7 | 8 | 9 | 10 | 11 | #parse("templates/navbar.vm") 12 | 13 | 14 |
15 | 16 | 17 | 24 | 25 | 26 |
27 |
28 | 29 |
30 |
31 | 34 | #foreach($build in $builds) 35 | ${build.name}:${build.version} ${build.buildString}
36 | #end 37 |
38 |
39 | 40 |
41 |
42 | 45 | #foreach($build in $louieBuilds) 46 | ${build.name}:${build.version} ${build.buildString}
47 | #end 48 |
49 |
50 | 51 |
52 |
53 | 56 | #foreach($build in $otherBuilds) 57 | ${build.name}:${build.version} ${build.buildString}
58 | #end 59 |
60 |
61 | 62 |
63 |
64 |
65 | 66 | #parse("templates/footer.vm") 67 | 68 | 69 | -------------------------------------------------------------------------------- /engine/src/main/java/com/rhythm/louie/server/ThreadInspector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.server; 17 | 18 | import java.lang.management.ManagementFactory; 19 | import java.lang.management.ThreadInfo; 20 | import java.lang.management.ThreadMXBean; 21 | 22 | /** 23 | * 24 | * @author eyasukoc 25 | */ 26 | public enum ThreadInspector { 27 | 28 | INSTANCE; 29 | 30 | ThreadMXBean threadBean; 31 | 32 | ThreadInspector() { 33 | threadBean = ManagementFactory.getThreadMXBean(); 34 | } 35 | 36 | public long[] findDeadlockedThreads() { 37 | return threadBean.findDeadlockedThreads(); 38 | } 39 | 40 | public long[] findMonitorDeadlockedThreads() { 41 | return threadBean.findMonitorDeadlockedThreads(); 42 | } 43 | 44 | public ThreadInfo getThreadInfo(long id) { 45 | return threadBean.getThreadInfo(id); 46 | } 47 | 48 | public ThreadInfo getThreadInfo(long id, int maxDepth) { 49 | return threadBean.getThreadInfo(id, maxDepth); 50 | } 51 | 52 | public String dumpStack(long id, int maxDepth) { 53 | ThreadInfo info= threadBean.getThreadInfo(id,maxDepth); 54 | StackTraceElement[] trace = info.getStackTrace(); 55 | StringBuilder builder = new StringBuilder(); 56 | for (StackTraceElement elem : trace) { 57 | builder.append(elem).append("\n"); 58 | } 59 | return builder.toString(); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /engine/src/test/java/com/rhythm/louie/services/devtest/DevTestServiceTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Rhythm & Hues Studios. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.rhythm.louie.services.devtest; 17 | 18 | import org.junit.BeforeClass; 19 | import org.junit.Test; 20 | 21 | import com.rhythm.louie.connection.Identity; 22 | import com.rhythm.louie.connection.LouieConnection; 23 | import com.rhythm.louie.connection.LouieConnectionFactory; 24 | 25 | import static org.junit.Assert.*; 26 | 27 | /** 28 | * 29 | * @author cjohnson 30 | */ 31 | public class DevTestServiceTest { 32 | 33 | 34 | private static DevTestServiceClient client; 35 | public DevTestServiceTest() {} 36 | 37 | @BeforeClass 38 | public static void setUpClass() throws Exception { 39 | LouieConnection conn = LouieConnectionFactory.getConnection("localhost", 40 | Identity.createJUnitIdentity()); 41 | 42 | client = DevTestClientFactory.getClient(conn); 43 | } 44 | 45 | 46 | @Test 47 | public void messageFeedbackTest() throws Exception { 48 | String captured = client.messageTest("Test Message"); 49 | System.out.println("Captured: " + captured); 50 | // captured = client.messageTest("test2"); 51 | // System.out.println("Captured: " + captured); 52 | } 53 | 54 | @Test 55 | public void sendEmail() throws Exception { 56 | client.sendEmail("cjohnson@rhythm.com", "cjohnson@rhythm.com", "Testing email services", "Hello!"); 57 | } 58 | 59 | } 60 | --------------------------------------------------------------------------------