Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Styx server object support. #589

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

mikkokar
Copy link
Contributor

@mikkokar mikkokar commented Jan 14, 2020

Description

Introduces a new InetServer interface that is a StyxService with a server InetAddress. It is an Internet server that accepts incoming connections on a specified port. The interface is not limited to HTTP. It can be anything as long as it opens a server port.

Because InetServer is a StyxService, it can be started and stopped with the usual Styx service framework.

Extend the Styx configuration object model to accommodate these new InetSerever objects. This allows used to configure styx server objects like so:

servers:
  myHttpServer:
    type: HttpServer
    config:
      port: 8080
      tlsSettings:
       ...

This PR doesn't yet provide any server implementations. Therefore the above configuration wouldn't work against this PR. This PR just extends the configuration framework into which new server implementations can be added.

Open Issues

  • The InetServer interface should really be called StyxServer. But this name is already taken, and changing it would break some existing consumers.

  • Styx services must be converted to Guava Services before they can be started. This is really inconvenient at times (in tests only), as you need two separate objects. One for the styx service to read the port number, another for starting/stopping the service.

  • NettyServer service name.

objects. Add a Styx object database and related APIs
for configuring and starting the server objects.
@mikkokar mikkokar changed the title Styx Server Object Styx server object support. Jan 14, 2020
visibility to `internal`, and tidy up comments.
@mikkokar mikkokar merged commit 1e8ce4e into ExpediaGroup:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants