README.md in acfs-0.19.0 vs README.md in acfs-0.20.0.dev.b181
- old
+ new
@@ -3,11 +3,11 @@
[![Gem Version](https://badge.fury.io/rb/acfs.png)](http://badge.fury.io/rb/acfs)
[![Build Status](https://travis-ci.org/jgraichen/acfs.png?branch=master)](https://travis-ci.org/jgraichen/acfs)
[![Coverage Status](https://coveralls.io/repos/jgraichen/acfs/badge.png?branch=master)](https://coveralls.io/r/jgraichen/acfs)
[![Code Climate](https://codeclimate.com/github/jgraichen/acfs.png)](https://codeclimate.com/github/jgraichen/acfs)
[![Dependency Status](https://gemnasium.com/jgraichen/acfs.png)](https://gemnasium.com/jgraichen/acfs)
-[![RubyDoc Documentation](https://raw.github.com/jgraichen/acfs/master/rubydoc.png)](http://rubydoc.info/github/jgraichen/acfs/master/frames)
+[![RubyDoc Documentation](https://raw.github.com/jgraichen/shields/master/rubydoc.png)](http://rubydoc.info/github/jgraichen/acfs/master/frames)
Acfs is a library to develop API client libraries for single services within a larger service oriented application.
Acfs covers model and service abstraction, convenient query and filter methods, full middleware stack for pre-processing requests and responses on a per service level and automatic request queuing and parallel processing. See Usage for more.
@@ -44,12 +44,11 @@
```
This specifies where the `UserService` is located. You can now create some models representing resources served by the `UserService`.
```ruby
-class User
- include Acfs::Model
+class User < Acfs::Resource
service UserService # Associate `User` model with `UserService`.
# Define model attributes and types
# Types are needed to parse and generate request and response payload.
@@ -192,40 +191,12 @@
Acfs.run # Would have raised Acfs::RealRequestNotAllowedError
# Will run real request to user service instead.
end
```
-## Messaging (Experimental)
+## Messaging (Experimental) [Depricated] {Removed}
-Acfs 0.17.0 includes experimental messaging support using RabbitMQ. You can create receivers for messages as well as send custom messages. Messages can be high level structures (like hashes) and will be packed into MessagePack.
-
-Create your custom receivers e.g. in `app/receivers`:
-
-```ruby
-# app/receivers/my_receiver.rb
-
-class MyReceiver
- include Acfs::Messaging::Receiver
- route "my.#" # Specify routing key for receiving messages
-
- def receive(delivery_info, metadata, payload)
- puts payload.inspect
- # more foo...
- end
-end
-```
-
-Make sure the receivers get loaded by placing an initializer in you app that require all receivers. You need to do this manually but it will be automated in some future release.
-
-You can now send messages by calling the `publish` method directly:
-
-```ruby
-Acfs::Messaging::Client.instance.publish "my.message", { message: "Hi!" }
-```
-
-This will invoke `#receive` on an instance of your receiver class.
-
-Be aware that messaging is still experimental and *will* change in future releases.
+Removed in 0.20.0. See [jgraichen/msgr](https://github.com/jgraichen/msgr) for a Rails-like messaging solution.
## Roadmap
* Update
* Better new? detection eg. storing ETag from request resources.