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

support non-finagle servers #12

Open
ryanking opened this issue Apr 5, 2012 · 9 comments
Open

support non-finagle servers #12

ryanking opened this issue Apr 5, 2012 · 9 comments

Comments

@ryanking
Copy link

ryanking commented Apr 5, 2012

Its not currently possible to use scrooge with vanilla thrift.

@robey
Copy link
Collaborator

robey commented Apr 10, 2012

i think specifically the request is to generate "Service" traits in the way that thrift-bin does.

@ryanking
Copy link
Author

I think what we need is a TProcessor that can be handed to one of the thrift servers (like THaHsServer and TThreadPoolServer).

@madsmith
Copy link

Don't suppose anyone has built this? I'm kinda astonished that they didn't build a basic TProcessor like every other thrift compiler.

@mirkonasato
Copy link

+1 for generating a TProcessor implementation.

I wrote one manually (partially generated with some custom scripts) for my service with Scrooge-generated Scala code so it certainly is possible. Still have to look at how the Scrooge code generator works though.

@mirkonasato
Copy link

This works for my specific case but it's not quite generic enough yet: https://github.com/mirkonasato/scrooge/commit/7591147aa89b2f20cd64f4efde330b5be0a5ccd5

The service interface now declaring a type - as per cad09af - doesn't help in this respect.

@dcapwell
Copy link

dcapwell commented Nov 9, 2014

Any update on this? As of the latest scrooge (3.17.0) it looks like you can only generate the server/client for finagle. Generating the TProcessor would let me use this project.

@nshkrob
Copy link
Contributor

nshkrob commented Nov 11, 2014

This isn't something we're working on because we mostly focus on Finagle usage. Feel free to send in patches though.

@JanBessai
Copy link

I am using a vanilla thrift generated server (F#). The only thing I had to do in order to interact with a scrooge client was using TFramedTransport instead of the default one.

type TFramedServerSocket =
  inherit TServerSocket
  new(port: int) = { inherit TServerSocket(port) } 
  new(listener: TcpListener) = { inherit TServerSocket(listener) }
  override this.AcceptImpl(): TTransport =
    new TFramedTransport(base.AcceptImpl()) :> TTransport

@mosesn
Copy link
Contributor

mosesn commented May 29, 2016

We don't have the bandwidth internally, but would be happy to look at a PR.

@ryanking ryanking closed this as completed Oct 6, 2017
@ryanking ryanking reopened this Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants