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

compatibility rack #2

Open
francescoagati opened this issue Jul 17, 2012 · 3 comments
Open

compatibility rack #2

francescoagati opened this issue Jul 17, 2012 · 3 comments

Comments

@francescoagati
Copy link

is compatible with rack or must run in a separated process if i want to use with async sinatra and rainbows?
if i want to use with rails and activerecord in a separate process i must use async mysql2 feature (with event machine)?

@movitto
Copy link
Owner

movitto commented Jul 19, 2012

Hrm I haven't tried integrating it with rack but it should be possible, it uses the vanilla EventMachine in the standard fashion to process requests. The only question would be the correct integration point, a new node could be created to use the rack / eventmachine interface to satisfy requests instead of a more lower level webserver. Or alternatively the dispatcher hierarchy can be abstracted a bit so that the developer may opt to dispatch requests to registered handlers (as it does now) or to a rack based interface.

As far as using it in a separate process, again I imagine this is something that could be easily solved with a new node or dispatcher type (nodes are what map the JSON-RPC requests to the underlying transport mechanism and the dispatchers route the requests to the handlers which satisfy them)

Perhaps we can flush something out together if I have a clearer picture of what you are trying to do. What is this for? How do you want to invoke your server and integrate JSON-RPC into those requests?

@francescoagati
Copy link
Author

the situation where use json-rpc is an application rails 3.2 and 2 process:

  • one process running on passenger/unicorn as application server
  • one process running on rainbows/thin that expose a web socket in faye for example and rpc-websocket

all 2 process share the same code of rails enviroment

@movitto
Copy link
Owner

movitto commented Aug 2, 2012

Hey ya if I understand what you're going for, I imagine rjr could be extended to support dispatching requests via rack to a rails app. As mentioned your best bet for integration would be to define a new dispatcher so that http, websocket, and other requests can be dispatched to a rack-compliant interface.

-Mo

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

No branches or pull requests

2 participants