Questions tagged [celluloid]

Actor-based concurrent object framework for Ruby

Celluloid is a concurrent object oriented programming framework for Ruby which lets you build multithreaded programs out of concurrent objects just as easily as you build sequential programs out of regular objects

102 questions
19
votes
3 answers

Why does Sidekiq not close old connections?

My Rails 4.1 application uses Sidekiq to run measurements in Celluloid actors. It continously runs out of database connections. It appears that Sidekiq opens 2 connections per job, and old connections never get closed properly. What the system…
slhck
  • 30,965
  • 24
  • 125
  • 174
14
votes
3 answers

Celluloid async inside ruby blocks does not work

Trying to implement Celluloid async on my working example seem to exhibit weird behavior. here my code looks class Indefinite include Celluloid def run! loop do [1].each do |i| async.on_background …
Viren
  • 5,764
  • 6
  • 35
  • 91
12
votes
2 answers

Wrong number of arguments when run compass watch

When I run "compass watch" I got this error: LoadError on line ["54"] of /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb: cannot load such file -- susy Run with --trace to see the full backtrace I managed to fix it with: sudo gem…
Drupal Noob
  • 153
  • 6
10
votes
2 answers

Understanding Celluloid Concurrency

Following are my Celluloid codes. client1.rb One of the 2 clients. (I named it as client 1) client2.rb 2nd of the 2 clients. (named as client 2 ) Note: the only the difference between the above 2 clients is the text that is passed to the server.…
Viren
  • 5,764
  • 6
  • 35
  • 91
10
votes
1 answer

Error in celluloid gem installation

Recently I have update my rails version to 4.2.3 and ruby version to ruby-2.2.3. After that when I do bundle it gives following error: $ bundle Fetching gem metadata from http://rubygems.org/.......... Fetching version metadata from…
Siva Gollapalli
  • 578
  • 4
  • 17
10
votes
1 answer

Sinatra + websocket + Celluloid

Hi does anybody know how to put in place a quick code example of a Sinatra app running on top of Celluloid:IO and using websocket? I know of the existance of Reel for Celluloid ("Reel is a fast, non-blocking 'evented' web server built on top of…
jj_
  • 2,548
  • 28
  • 55
9
votes
1 answer

Sidekiq current Celluloid Actor

I need to access the current celluloid actor inside of my Sidekiq worker, but I don't see a way to do that. Whenever I try to call: Celluloid::Actor.current I get an error: not in actor scope I tried to get around finding the current actor by…
ardavis
  • 9,149
  • 10
  • 50
  • 108
8
votes
2 answers

How to handle a Thread Issue in ZeroMQ + Ruby?

Stumble upon reading ZeroMQ FAQ about a Thread safety. My multi-threaded program keeps crashing in weird places inside the ZeroMQ library. What am I doing wrong? ZeroMQ sockets are not thread-safe. This is covered in some detail in the Guide. The…
Viren
  • 5,764
  • 6
  • 35
  • 91
6
votes
1 answer

Ruby: Connect to remote WebSocket

I'm trying to connect to remote websocket using Celluloid and Websocket client based on celluloid (gem 'celluloid-websocket-client'). The main advantage of this client for me is that I can use callbacks in the form of class methods instead of…
Ilya Cherevkov
  • 1,673
  • 2
  • 17
  • 43
5
votes
1 answer

Ruby and Celluloid

Due to some limitations I want to switch my current project from EventMachine/EM-Synchrony to Celluloid but I've some trouble to get in touch with it. The project I am coding on is a web harvester which should crawl tons of pages as fast as…
ctp
  • 1,025
  • 1
  • 7
  • 27
4
votes
1 answer

Attempting to use pools crashes Celluloid

I'm trying to use pools in a project of mine that uses Celluloid. However, whenever I invoke the pool method on a class which includes Celluloid (thus receiving methods from Celluloid::ClassMethods) I consistently get the error: NoMethodError:…
GDP2
  • 1,808
  • 1
  • 18
  • 33
4
votes
2 answers

How to use Rails as DDP server with Meteor.js client

We have a Rails app that acts HTTP API only. On the client side, Ember.js is currently used. We are not overly impressed by Ember and really like the approach Meteor.js takes. So we'd like to exchange the client side with Meteor.js and communicate…
Patrik
  • 85
  • 9
4
votes
1 answer

How can I parallize the execution of my plugins with Celluloid?

My question should help me to get on the right way. I'm developing a ruby application with the concurrent framework celluloid. Here how it looks like: I have some plugins. I want to run them concurrently and wait until the last one has finished.…
Robin
  • 6,726
  • 4
  • 47
  • 75
4
votes
2 answers

Celluloid callback

How can I get notified when an async method has finished it's job (callback) when using Celluloid? Sample code: require 'celluloid/autostart' class Test include Celluloid def initialize(aaa) @aaa = aaa end def foo …
shoen
  • 11,805
  • 4
  • 20
  • 27
3
votes
1 answer

Delay in processing more requests/sec

I have a JRuby application using celluloid. It receives requests through Zeromq socket and responds with JSON string. So, There are 2 actors in my application one for processing requests and another for sending a response(Push socket in…
1
2 3 4 5 6 7