README.md in propono-1.0.0 vs README.md in propono-1.1.0
- old
+ new
@@ -46,23 +46,25 @@
```ruby
Propono.publish('some-topic', "Some string")
Propono.publish('some-topic', {some: ['hash', 'or', 'array']})
```
-Listening for messages is easy too. Just tell Propono what your application is called and start listening. You'll get a block yieleded for each message.
+Listening for messages is easy too. Just tell Propono what your application is called and start listening. You'll get a block yielded for each message.
```ruby
Propono.config.application_name = "application-name" # Something unique to this app.
Propono.listen_to_queue('some-topic') do |message|
# ... Do something interesting with the message
end
```
-In the background, Propono is automatically setting up a queue using SQS, a notification system using SNS, and glueing them all together for you. But you don't have to worry about any of that.
+In the background, Propono is automatically setting up a queue using SQS, a notification system using SNS, and gluing them all together for you. But you don't have to worry about any of that.
+**Note for using in Rake tasks and similar:** Propono spawns new threads for messages sent via SNS. If your application ends before the final thread is executed, then the last message might not send. It's therefore advisable to do a `Thread.join` on the thread that is returned from the final call to `publish`.
+
### Using TCP for messages
-Publishing directly to SNS takes about 15x longer than publishing over a simple TCP connection. It is therefore some times favourable to publish to a seperate machine listening for TCP messages, which will then proxy them on.
+Publishing directly to SNS takes about 15x longer than publishing over a simple TCP connection. It is therefore sometimes favourable to publish to a separate machine listening for TCP messages, which will then proxy them on.
To send messages this way, you need to set up a little extra config:
```ruby
Propono.config.tcp_host = "some.host.running.a.propono.listener"
@@ -89,11 +91,11 @@
Propono.proxy_tcp()
```
### Using UDP for messages
-If you want almost-zero performance impact, and don't mind the occasional message getting lost, you can use UDP. We use this for things like our live dashboard where we don't mind losing a piece of activity here and there, but any perforamnce impact on our Meducation itself is bad news.
+If you want almost-zero performance impact, and don't mind the occasional message getting lost, you can use UDP. We use this for things like our live dashboard where we don't mind losing a piece of activity here and there, but any performance impact on our Meducation itself is bad news.
Sending messages in this way is very similar to using TCP. First add some config:
```ruby
Propono.config.udp_host = "some.host.running.a.propono.listener"
@@ -104,11 +106,11 @@
```ruby
Propono.publish('some-topic', message, protocol: :udp)
```
-As per the `listen_to_tcp` method explained above, you now listen to udp or use the proxy method:
+As per the `listen_to_tcp` method explained above, you now listen to UDP or use the proxy method:
```ruby
Propono.listen_to_udp do |topic, message|
Propono.publish(topic, message) # Proxy the message to SNS
end
@@ -132,11 +134,11 @@
config.tcp_port = "The port of a machine used for TCP proxying"
config.logger = "A logger such as Log4r or Rails.logger"
end
```
-The can all also be setting using the `Propono.config.access_key = "..."` syntax.
+These can all also be set using the `Propono.config.access_key = "..."` syntax.
### Is it any good?
[Yes.](http://news.ycombinator.com/item?id=3067434)
@@ -150,11 +152,12 @@
This project is managed by the [Meducation team](http://company.meducation.net/about#team).
These individuals have come up with the ideas and written the code that made this possible:
-- [Jeremy Walker](http://github.com/iHID)
-- [Malcom Landon](http://github.com/malcyL)
+- [Jeremy Walker](http://github.com/iHiD)
+- [Malcolm Landon](http://github.com/malcyL)
+- [Charles Care](http://github.com/ccare)
- [Rob Styles](http://github.com/mmmmmrob)
## Licence
Copyright (C) 2013 New Media Education Ltd