Setting up Phalcon on Heroku

Yesterday I blogged about Phalcon, the PHP framework written in C. At the end of the post I said ...

Using Polytalk inside a Meteor Application

I've put together a simple demo that integrates Polytalk with Meteor. The app allows you to r...

0
Saturday, December 8, 2012
Polytalk Ruby Gem updated

I just pushed some changes to the Polytalk Ruby Gem to allow symbols to be used as arguments. Also all keys in hashes now default to symbols when using the Ruby server. To use use a symbol instead of a string you simply prepend a colon : infront of the argument.

For instance to call the find method on the post model and return the first post I would do the following:

client = Polytalk::Client.new({ port: 9090 })

request = {
    class: 'Post',
    method: 'find',
    arguments: {
      type: ':first'
    }
}

puts client.call(request)

And to implement the server I would do the following:

class Post < ActiveRecord::Base
end

server = Polytalk::Server.new({ port: 9090 })
server.run do |connection, request|
  response = server.call(request)
  server.push(connection, response)
end

I'm planning a post of using Polytalk with Meteor in the near future. Stay tuned!

Tweet this post if you found it useful

Related Posts

Using Polytalk inside a Meteor Application

Sunday, December 9, 2012  ·   0

I've put together a simple demo that integrates Polytalk with Meteor. The app all... (continued)

Introducing Polytalk. A simple protocol which allows communication between different languages via TCP.

Monday, November 26, 2012  ·   0

Polytalk is my latest open source project. I developed it out of the need to communic... (continued)

Rails 3 full page caching on Heroku

Wednesday, November 28, 2012  ·   2

Recently I implemented full page caching on this blog. Not because of the insane amou... (continued)

Open sourcing this blog. Code on GitHub

Monday, November 26, 2012  ·   0

I've tidied up the code for this site and decided to open source it if anyone is ... (continued)

0 Comments

Comment successfully added. View comment.×

Comments are now closed for this article.