Skip to content

Maven dependencies

Regunath B edited this page Nov 4, 2013 · 10 revisions

This page lists Maven Dependencies for applications that intend to use Phantom proxies and/or its Libraries.

Phantom release repository

Phantom builds are distributed via the Clojars community maintained repository for open source libraries. A sample Maven settings file with relevant public repositories is available here : Maven user settings (Note : The artifactory settings may need to be suitably modified if you have a local instance or removed altogether if your build relies entirely on public repositories.)

Add the following repository to your Maven settings or POM build file to access releases builds:

<repository>
    <id>clojars</id>
    <name>Clojars repository</name>
    <url>https://clojars.org/repo</url>
</repository>

Maven artifacts

Phantom is made up of multiple modules. These modules allow users to compose/create proxies using existing proxy handlers and socket listeners (or) create own proxy implementations for protocols/transports that are yet not readily available in Phantom. Version of these artifacts map to stable releases. For e.g. 1.0.0 for Version 1.0.0.

Proxy API

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom task API interfaces for writing proxy handlers. Also contains implementation for an in-memory registry and a runtime repository for routing executions

Protocol & Transport specific Proxy API implementations

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom task-http Http proxy handler implementation with connection pooling support
com.flipkart.phantom task-thrift Thrift proxy handler implementation that works on IDL compiled interfaces

Runtime

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom runtime Launches the JVM and contains a Netty NIO based socket listener for accepting requests. Also manages lifecycle of deployed proxy handlers. Has embedded Jetty based admin console.

Runtime variants

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom runtime-netty-uds Runtime variant using UDS(Unix Domain Socket) transport for Netty NIO
com.flipkart.phantom runtime-oio-uds Runtime variant using OIO(Old Java I/O) transport for UDS(Unix Domain Socket)

Note that the junixsocket library is distributed via the downloads page of the project site junixsocket downloads. The Java binaries will need to be added to your local Maven repository (or) a local Artifactory (if one exists) using these identifiers:

<groupId>org.newsclub</groupId>
<artifactId>junixsocket</artifactId>
<version>1.3</version>

Protocol & Transport specific Netty implementations

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom channel-handler-http Simple Netty Channel Handler implementation for Http
com.flipkart.phantom channel-handler-thrift Thrift transport for Netty using ChannelBuffer, and custom implementations of ReplayingDecoder and SimpleChannelUpstreamHandler

Dashboard

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom dashboard Aggregated Monitoring dashboard for a cluster of deployed Proxy servers

Netty UDS transport

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom netty-uds A UDS transport for Netty. Useful for high volume calls to Netty on localhost i.e. avoids the TCP stack and issues of frequent open/close of sockets.
See Unix Domain Socket transport for Netty for additional details on building this module.

Samples

GroupID/Org ArtifactID/Name Description
com.flipkart.phantom sample-http-proxy Simple Http Proxy server
com.flipkart.phantom sample-thrift-proxy Simple Thrift Proxy server
com.flipkart.phantom sample-task-proxy Simple Command protocol Proxy server