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

Comments

@ryanking
Copy link

commented Apr 5, 2012

Its not currently possible to use scrooge with vanilla thrift.

@robey

This comment has been minimized.

Copy link
Collaborator

commented Apr 10, 2012

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

@ryanking

This comment has been minimized.

Copy link
Author

commented Apr 11, 2012

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

@madsmith

This comment has been minimized.

Copy link

commented Jun 27, 2013

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

This comment has been minimized.

Copy link

commented Aug 23, 2013

+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

This comment has been minimized.

Copy link

commented Sep 9, 2013

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Sep 1, 2015

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

This comment has been minimized.

Copy link
Contributor

commented May 29, 2016

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

@ryanking ryanking closed this 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
8 participants
You can’t perform that action at this time.