Is it possible to embed Finatra in an existing HTTP server?

32 views
Skip to first unread message

liam.t....@gmail.com

unread,
Jul 9, 2016, 3:09:41 PM7/9/16
to finatra-users
Hello finatra-users:
I'm using Finatra happily to build a RESTful web service, I've really enjoyed working with it so far. However I've run into a snag which I hope you can help me with.

For various reasons I have to deploy this solution within a framework which provides a web interface and socket server already, and passes in input and output streams to my code. I've got this hacked together right now by using the testing support within Finatra, creating an EmbeddedHttpServer instance and using that to pass calls into my app. This seems to work, but apart from being inelegant in the extreme, it also means my code has to pull in Finatra test-time dependencies at runtime, and that leads to all sorts of dependencies that really fatten up my JAR.

All I need to be able to do basically is to pass in HTTP operations directly to Finatra, just like EmbeddedHttpServer does, but preferably without the entire Finatra test apparatus being required at runtime. I've taken a look at the EmbeddedHttpServer code but I confess to being out of my depth. Can anyone suggest a solution that's more elegant than what I currently have?

Thanks,

Liam

Christopher Coco

unread,
Jul 10, 2016, 11:14:48 AM7/10/16
to liam.t....@gmail.com, finatra-users
Finatra is built on-top of Finagle as such you may want to take a look at the Finagle user guide for more information. Long story, short -- while it may be possible to hack something together (even without Finatra's test code) this is not the intended way to use either the Finagle or Finatra frameworks and as such you will most likely not find any elegant solution here. 

Thanks,
-c


--
You received this message because you are subscribed to the Google Groups "finatra-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages