Code Monkey home page Code Monkey logo

Comments (6)

v1r3n avatar v1r3n commented on May 18, 2024
  • Conductor publishes all the artifacts as jar files into maven central.
  • You can create a simple web application using Jersey and Guice that should allow you to expose the REST endpoints from conductor-jersey module.
  • The web application can be deployed in any container (tomcat or jetty). To run it in embedded mode (without a dedicated app server) look at the Main.java in test-harness.
  • Depending upon the servlet container (tomcat, jetty etc.) you can configure the port and HTTP or HTTPS connection.

from conductor.

blueelephants avatar blueelephants commented on May 18, 2024

Thanks for clarification!

from conductor.

blueelephants avatar blueelephants commented on May 18, 2024

Thanks again for your comments.

After digging deeper into the test-harness code, I am still having some questions where I would like to ask you for further help.

The test-harness code is very good to quickly try Conductor as everything is mocked/embedded (ElasticSearch, Dyno-Queues, etc.)

I am now working on two things

(a) Short-term:

  • Creating a single web app with Conductor Server (and all its embedded components like ElasticSearch, Dyno-Queues, Jetty as in test-harness code ) - but everything packaged in one "uber-jar" ...
  • and finally putting this uber-jar in a Docker Container to run it with "java jar..."

Is it possible to easily create this uber jar out of the test-harness demo-app?
Can you give me some help on how to do that?

(b) Medium-term:

  • Create a new web app which uses the pre-built Maven Central jars and and also runs in an embedded Tomcat/Jetty container - everything again finally packaged in one "uber jar"
  • Additionally:
    • Remove step-by-step all "mocked/embedded" components - i.e. connect Conductor Server to a standalone ElasticSearch cluster, Dynomite database, etc.
    • having an application.properties/bootstrap.properties file to configure Tomcat/Jetty details (e.g. port, SSL), connection details to ElasticSearch/Dynomite, etc.

I am struggeling to start to write this web app to use all the available jars.
Do you have some more demo code which shows how to use the jars and to expose the REST endpoints from conductor-jersey (unfortunately I am not familiar with Jersey & Guice but with Spring Boot).

Conc. removing the mocked/embedded components of test-harness ... can you provide some more information how the code currently works?

What I can see from Main.java in test-harness is:

  • An embedded Elastic Search Cluster gets created (via EmbeddedElasticSearch.java) at 127.0.0.1:9200 with an index called "conductor" - but where/how is Conductor Server configured on which address/port this embedded ElasticSearch Cluster is running?
  • Dependency injection seems to be done for TestModule.java: Guice.createInjector(new TestModule(), new JerseyModule())
    TestModule.java seems to bind the various DAO classes and mocks the embedded Dynomite/Dyno-queues?
    But how/where are Jersey REST endpoints incorporated (e.g. TaskResource.java, MetadataResource.java, AdminResource.java, etc.) - I can't see how this is done in JerseyModule.java.

Many thanks for some more help & background information.

from conductor.

v1r3n avatar v1r3n commented on May 18, 2024

It seems like you are looking for a deployable server component. test-harness does "mock" the components and is meant only for a demo purpose, it is not meant to be deployed to production.

Here are my thoughts:

  • Having a server component with required dependencies (maybe published as zip/tarball and an executable like start-conductor.sh) is a good idea and probably a way to go.
  • I would embed app server like jetty or netty that is lightweight
  • Dynomite and Elasticsearch are configured via Configuration. An implementation of this class that takes a property file to load the required properties will let someone use existing installation of Dynomite and Elasticsearch along with other properties.
  • Create a docker file that includes conductor-server binaries along with Dynomite and Elasticsearch which can be used to bring up a single node instance.

There is already an existing PR for the docker image, and I think we can make it work.

from conductor.

v1r3n avatar v1r3n commented on May 18, 2024

I have created #29 to track this and will get it addressed in the upcoming release.

from conductor.

blueelephants avatar blueelephants commented on May 18, 2024

Perfect, many thanks

from conductor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.