rails-disco 0.5.0.pre2 → 0.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -33
  3. metadata +12 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e670b4fb30869da45455e0459e4eca76f92b2785
4
- data.tar.gz: c6d03b51deb31dffe9c2edf34c7616e82887f626
3
+ metadata.gz: 80898327268b3f4a52c4e86bca134da6f992630e
4
+ data.tar.gz: 60b545f796e44cb69b7d40f25ab726313e545543
5
5
  SHA512:
6
- metadata.gz: 1fcbc175aa7f90861314c9596b061e80e76df2e09a1b97984a841cfe4ba781f29dcb5d14e1e82e20f9463e828ab15e73120e4bf5656f6ae428879f121bf15259
7
- data.tar.gz: b5d8044b2a84a8b85fa7912157a09dd2b9d90c8513bddc941525bd3d5f2730a266ff88a05745d38a4a41bb4efc8d40d9abf908e24e8905cf591320a20113b184
6
+ metadata.gz: 05501f12f5e2e2be148dc8a3e52d49c6a2fa76b3c1548b557a4fa08344f4b07a10c2493bf37f2d97e39e161e03cd494888d51cb2510d2c2085a583cd618ab12e
7
+ data.tar.gz: 7da9f994236ce9c5fcae039c087c41c0abe42d6770eff6d1db6cbe8503efee8c682687a1d1840d6eb07125c7b2668c23f5eef297b715bd7547b0be9702fe17c0
data/README.md CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  # Rails Disco - A distributed party with commands, events and projections
7
7
 
8
- Rails Disco is a framework on top of the rails framework to provide cqrs and simple event sourcing possibilities to rails.
9
- The framework consists out of three main parts, commands, events and projections.
8
+ Rails Disco is a framework that extends Rails with support for the best parts of event sourcing.
9
+ The framework consists out of three main parts: commands, events and projections.
10
10
 
11
11
  _Commands_ will be created and executed by actions of your controller, instead of directly manipulating your model. These commands are only the order to do something and after possible validations, the framework executes them by creating an event and finally manipulating the model.
12
12
 
13
13
  The _events_ will be all stored in a separate database and also published to all projections, where they can be processed to update the projections model/database
14
14
 
15
- Finally _projections_ are your representation of your data, they get the events and process them, to get the needed informations for building up their models.
15
+ Finally _projections_ are your representation of your data, they get the events and process them, to get the needed information for building up their models.
16
16
 
17
17
  # Requirements
18
18
 
@@ -20,59 +20,59 @@ Finally _projections_ are your representation of your data, they get the events
20
20
 
21
21
  * Because Rails Disco relies on [bunny](https://github.com/ruby-amqp/bunny) for sending the events from the domain to the projection, you need [RabbitMQ](http://www.rabbitmq.com/download.html) on your system.
22
22
 
23
- * Any Server which is capable of streaming, e.g. puma or thin (Standard Rails Server Webrick will **not** work). If you are facing problems installing puma on windows, here is a [tutorial](https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows).
23
+ * Any Server which is capable of streaming, e.g. puma or thin (standard Rails server WEBrick will **not** work). If you are facing problems installing puma on Windows, here is a [tutorial](https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows).
24
24
 
25
25
  # Getting Started
26
26
 
27
- 1. Rails Disco depends heavily on [RubyOnRails](http://rubyonrails.org/), so you should install that first if you haven't yet.
28
-
29
- 2. Install Rails Disco at the command prompt
27
+ 1. Install Rails Disco at the command prompt
30
28
 
31
29
  gem install rails-disco
32
30
 
31
+ 1. At the command prompt, create a new Rails Disco application.
33
32
 
34
- 3. At the command prompt, create a new Rails Disco application.
35
-
36
- drails new myapp
33
+ disco new myapp
37
34
 
38
- where "myapp" is the application name.
35
+ where `myapp` is the name of you application.
39
36
 
40
- (Note: You can also add Rails Disco to an existing rails application. Simply omit the application name and run the command inside your application.)
37
+ (Note: You can also add Rails Disco to an existing Rails application. Simply omit the application name and run the command inside your application.)
41
38
 
42
- 4. Change directory to `myapp`, if you haven't yet and migrate the databases:
39
+ 1. Change directory to `myapp` and migrate the databases:
43
40
 
44
41
  cd myapp
45
- rake drails:db:setup
42
+ rake disco:migrate:setup
43
+
44
+ This will operate on the Rails (= projection) and the domain database.
45
+ You can configure the domain database and more Rails Disco related configurations in `config/disco.yml`.
46
46
 
47
- This will create the two databases domain and projection (for database details look in config/disco.yml)
47
+ 1. If you just want to look a some standard server output, start the disco server (Remember to use a server which is capable of streaming, which means not WEBrick). Else go ahead and skip this point.
48
48
 
49
- 5. If you just want to look a some standard server output, start the drails server (Remember to use a server which is capable of streaming, which means not Webrick). Else go ahead and skip this point.
49
+ disco server
50
50
 
51
- drails server
51
+ This will start the domain, the projection and the web server, but you won't see much of the disco yet.
52
52
 
53
- This will start the domain, the projection and the standard rails server, but you won't see much of the disco yet.
53
+ 1. For a humble start, let's create the scaffold for a simple blog system:
54
54
 
55
- 6. For a humble begin, scaffolding is the way to go. Lets create a simple blog system:
55
+ disco generate scaffold Post title:string text:text
56
56
 
57
- drails generate scaffold Post title:string text:text
57
+ The syntax is leaned to Rails' generate style and it basically creates a resource Post with a title and a text attribute.
58
58
 
59
- The syntax is leant to rails' generate style and it basically creates a resource Post with a title and a text attribute.
59
+ 1. Now that we have something to rely on, lets migrate and see it in action:
60
60
 
61
- 7. Before we can start, we need to tell rails that we have some shiny new db. Open up config/database.yml and edit the config for your environment (propably development) to the projection database. So basically:
61
+ rake disco:migrate
62
+ disco server
62
63
 
63
- ```diff
64
- - database: db/development.sqlite3
65
- + database: db/projection_dev.sqlite3
66
- ```
64
+ 1. Go to [http://localhost:3000/posts](http://localhost:3000/posts) and you'll see an empty list of our posts with a link to create a new one. Go ahead and create one.
65
+ If you watch the console output, you can see that an event is created, published and processed by a projection.
67
66
 
68
- 8. Now that we have something to rely on, lets see it in action:
69
-
70
- drails server
67
+ 1. If you look at your databases, you see in both of them a table `posts`, which contains your freshly created post.
68
+ The domain database also contains a table `domain_events`. There you find an event for your post creation. Lets see this in action.
71
69
 
72
- 9. Go to [http://localhost:3000/posts](http://localhost:3000/posts) and you'll see an empty list of our posts with a link to create a new one. Go ahead and create one. If you watch the console output, you can see that an event will be created for the creating of the post and will be published to the projection.
70
+ 1. Clear your projection database and restart the server.
73
71
 
74
- 10. If you look at your databases, you see in both of them a table `posts`, which contains your freshly created post. The domain database also contains a table `domain_events`. There you find an event for your post creation. Lets see this in action.
72
+ rake disco:db:drop
73
+ rake disco:migrate
74
+ disco server
75
75
 
76
- 11. Clear your projection database and restart the server. You will see some console output, where the projection is requesting the missing posts from the domain and there you have your projection database complete again.
76
+ You will see some console output, the projection requests the missing posts from the domain. Finally the state of your projection database will be restored.
77
77
 
78
- 12. Thats it for now, have fun with it. For more informations take a look at the [wiki](https://github.com/hicknhack-software/rails-disco/wiki)
78
+ 1. That's it for now, have fun with it. For more information take a look at the [wiki](https://github.com/hicknhack-software/rails-disco/wiki)
metadata CHANGED
@@ -1,32 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-disco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre2
4
+ version: 0.5.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
- - Robert Kranz
8
- - Andreas Reischuck
7
+ - HicknHack Software
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-03-22 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: drailties
14
+ name: disco-railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
17
  - - '='
19
18
  - !ruby/object:Gem::Version
20
- version: 0.5.0.pre2
19
+ version: 0.5.0.rc1
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - '='
26
25
  - !ruby/object:Gem::Version
27
- version: 0.5.0.pre2
28
- description: Rails Disco is a framework on top of the rails framework to provide cqrs
29
- and simple event sourcing possibilities to rails.
26
+ version: 0.5.0.rc1
27
+ description: |2
28
+ Rails Disco is a framework that extends Rails with support for the best parts of event sourcing.
29
+
30
+ Instead of updating models synchronously in Rails, these changes are captured in commands. Commands are validated in a domain and create the only source of truth: events. Later events can be projected into Rails models and other actions.
31
+
32
+ Have a look at the documentation on Github for more details.
30
33
  email: rails-disco@hicknhack-software.com
31
34
  executables: []
32
35
  extensions: []