celluloid / dcell

UNMAINTAINED: See celluloid/celluloid#779 - Actor-based distributed objects in Ruby based on Celluloid and 0MQ
http://celluloid.io
MIT License
595 stars 65 forks source link

Map DCell::Explorer within Rack #66

Open HoneyryderChuck opened 10 years ago

HoneyryderChuck commented 10 years ago

I'm not sure if this concerns dcell or reel, but I'd like to provide DCell Explorer web views under a certain namespace from my main rack app (using rack map for it). From what I've seen is the explorer not a rack app, but a reel server, which is by default not a rack app. But I've seen also that there is the reel-rack extension. How can I use this approach to expose the DCell::Explorer server an a map endpoint? An example of what I want to do:

map '/sidekiq' do        
  run Sidekiq::Web       
end                      
map '/dcell' do          
  run DCell::Explorer    
end                      
tarcieri commented 10 years ago

It's not a rack app at the moment, but you could reimplement it on top of reel-rack

HoneyryderChuck commented 10 years ago

How exactly? The way I saw it, the DCell::Explorer is a a Reel::Server which takes directly a hostname and port. How could I pass the class to the rack app as in other implementations? Or by reimplementing, you meant I have to rewrite it/inherit from it and provide my own explorer so that it can become a rack app?

Sorry about this, maybe this should not be a dcell issue. Should I move this to reel-rack or google group?

tarcieri commented 10 years ago

If you want to run DCell::Explorer alongside other Rack apps, it needs to be rewritten as a Rack app and run atop Reel::Rack.

HoneyryderChuck commented 10 years ago

https://groups.google.com/forum/#!topic/celluloid-ruby/bqImzs4SGCo