Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there a good tutorial/guide/blog post/book chapter/screencast/etc that attempts to comprehensively cover everything having to do with locks, transactions, and isolation levels in ActiveRecord? (preferably relevant to Rails 4.0)
There's a brief section in the guides, and of course some API docs, but it's a really important and (for me) hard-to-understand domain, and it's my first time trying to take data integrity seriously in my Rails app. I'd like to get a good understanding so I can do it properly.
List of Known Resources
http://guides.rubyonrails.org/active_record_querying.html#locking-records-for-update
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html
http://api.rubyonrails.org/classes/ActiveRecord/Transactions.html
https://github.com/rails/rails/commit/392eeecc11a291e406db927a18b75f41b2658253 ("Support for specifying transaction isolation level" commit -> Rails 4.0)
http://railscasts.com/episodes/59-optimistic-locking-revised
I would check out Chapter 5 of The Rails 3 Way for now, particularly Section 5.5 on Database Locking. I would also look at the ActiveRecord::Locking source, ActiveRecord::Transactions source, and the transaction_isolation test case as the code is very readable and if you're going to need some down in the weeds answers, it's there in the code!
I found Differences between transactions and locking on Makandropedia a pretty useful starting point to learn the difference between transactions and locks.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm still relatively new to iOS development and also an absolute stranger to any kind of testing that is not compile, run, and check whatever comes to your mind.
This is obviously a weakness on any developer's profile and I'm decided to get ride of it now that interesting, real projects are coming my way.
In my quest to look for the best approach to go from 0 to 100 as soon (and well) as possible I'm coming to the specialized community to get your feedback.
At the same time I'm asking for your tips I'm also getting into Amazon to look for well-reviewed books on the subject and Google to get the rest. I'm just coming here to gather the feedback of those willing to spare a minute or to so I can probably hit jackpot with a great advise and better plan my learning strategy.
Thats right. For my job testing and test driven development is indispensable.
I often use Java and JUnit, but for Objective-C and XCode I think this screencast is a very good start: http://qualitycoding.org/objective-c-tdd/
Since I watch this screencast I use OCHamcrest and OCMockito (both explaind in this screencast) as well as SenTestingKitAsync for testing asynchronous functions.
I think the Clean Code book is a must have for every developer. There is a chapter about testing.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm a seasoned Symfony 1.4 developer with a good handle on Symfony 2.0, so I'm a bit beyond the basics of frameworks.
I've recently built a solution with Rails 3 and would like to pick up a book to read up on how I could have done some things better.
I'm mostly using Rails as a database layer with very minimal in the ways of ERb. Some topics I'd hope to see covered in advanced detail are:
JSON
Ideas and opinions on how to serve rich internet applications
Good ActiveRecord usage and planning
Writing models and keeping implementation out of controllers
In general, conventions on controllers and actions
There are likely many subjects I'd like to hear about however I'm not interested in focusing too strongly on testing quite yet.
Haven't read this book, but it seems really good Ruby Science
After spending a bit of time with some of the books from the comments above, it looks like Rails Antipatterns is still quite worthwhile.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
How can I test my Rails app with N concurrent users?
These simulated users will do some actions like upload/download files, etc.
Are there any frameworks or free tools that support this?
ab(Apache Benchmark) is made for that. Here is an example:
https://github.com/igrigorik/async-rails
I use jMeter, although the UI is a little rough IMO. I ended up sharing a lot of code between my easyb (Groovy-based) specs and a mini-DSL I used to create jMeter config/execution files (XML) so redundancy between specs and load testing was reduced. The same should be doable in Ruby as well.
JMeter allows concurrent testing, ramp-ups, all sorts of stuff. I don't know if it does everything a commercial tool does, but I've used it for a long time on a wide range if apps and it's been, more or less, satisfactory.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
The task is to process a lot of commands that needs to be saved in some kind of stack or buffer.
While one method will push the data in, there will be multiple threads or processes, that will take thees tasks one by one and process them.
Right know the Idea is to save the tasks in buffer that uses NoSQL database, so we can get object and delete it simultaneously.
I'm thinking, that for this problem probably is already solution with some kind of server or library, that handles task processing and distribution between multiple instances.
Is there such a thing?
Well the pattern implementation depends on your specific needs. Your question is too general for a better answer than the one provide as a comment by #AljoshaBre: "this is a classic - producer/consumer problem. look it up on the webz.". If you look at the wikipedia article about producer/consumer problem, you can find the pattern implementation in Java - the general pattern is small, but to address your specific needs more details are required. You say something about "task processing and distribution between multiple instances", and it leads for a more specific architectural pattern called Distributed Message Queues (some random ref). There is the Apache project ActiveMQ that aims to implement such pattern.
I found gearman, php queue manager, and solution with nodejs node-amqp and php-amqp using RabbitMQ
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to spend some serious time reading about changes in Ruby 1.9.1 and upcoming Rails 3/Merb. Can people suggest any articles to read?
Not really looking for one answer, just kinda looking for a compilation of resources people are using to keep up with what's coming and what currently exists, so if you stop by, let me know what you're looking at. Thanks!
Rails3 is moving really fast. Updates from books or blog entry is not sufficient enough to keep up with the changes that is happening in Rails3. So I would suggest follow Rails in Github instead, although it might seem scary but I found it much more effective.
articles about Rails 3 - Yehuda Katz's blog
Rails 3 in Action looks like a good place to start. There is an early access edition available.
This is helpful for 1.9
http://www.youtube.com/watch?v=oEkJvvGEtB4
The changelogs for the respective facets of Rails is where I get my information from.