torquebox - marek goldmann · set people = new hashset(); for (team each : teams)...
TRANSCRIPT
![Page 1: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/1.jpg)
TorqueBoxMoc Javy – piękno Rubiego
![Page 2: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/2.jpg)
Marek.
![Page 3: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/3.jpg)
![Page 4: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/4.jpg)
![Page 5: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/5.jpg)
JBoss AS 7+
=
![Page 6: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/6.jpg)
![Page 7: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/7.jpg)
![Page 8: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/8.jpg)
No, do rzeczy panie!
![Page 9: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/9.jpg)
Dziś w menu:
![Page 10: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/10.jpg)
50 / 40 / 10
![Page 11: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/11.jpg)
Czym jest TorqueBox?
![Page 12: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/12.jpg)
Ruby i Java? Huh?
![Page 13: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/13.jpg)
DO RZECZY!
![Page 14: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/14.jpg)
![Page 15: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/15.jpg)
Cel.
![Page 16: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/16.jpg)
Web: Rails, Sinatra, Rack.
![Page 17: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/17.jpg)
Ponadto: wiadomości,
zadania, usługi, [...].
![Page 18: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/18.jpg)
Brzmi znajomo?
![Page 19: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/19.jpg)
Java już to ma, wykorzystajmy to!
![Page 20: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/20.jpg)
Randkowanie JBoss AS oraz
Ruby.
![Page 21: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/21.jpg)
![Page 22: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/22.jpg)
Ale dlaczego Ruby?
![Page 23: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/23.jpg)
Bob lubi Rubiego.
![Page 24: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/24.jpg)
Dynamiczny.
![Page 25: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/25.jpg)
Brak kompilacji.
![Page 26: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/26.jpg)
Liberalny.
![Page 27: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/27.jpg)
Zwięzły.
![Page 28: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/28.jpg)
Set<Person> people = new HashSet<Person>();
for (Team each : teams) { people.addAll(each.getMembers());}
for (Person each : people) { each.promote();}
com/foo/Anything.java
![Page 29: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/29.jpg)
teams. collect(&:members). flatten.uniq.each &:promote!
anything.rb
![Page 30: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/30.jpg)
Wporzo, ale co z wydajnością?
![Page 31: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/31.jpg)
JRuby FTW!
![Page 32: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/32.jpg)
Bardzo szybkie środowisko.
![Page 33: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/33.jpg)
Prawdziwe wątki.
![Page 34: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/34.jpg)
Biblioteki Javy, za free.
![Page 35: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/35.jpg)
![Page 36: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/36.jpg)
TB 1.x – JBoss AS 6TB 2.x – JBoss AS 7
![Page 37: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/37.jpg)
Instalacja.
![Page 38: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/38.jpg)
$ wget http://torquebox.org/builds/LATEST/torquebox-dist-bin.zip$ unzip -q torquebox-dist-bin.zip
$ export TORQUEBOX_HOME=$PWD/torquebox-1*$ export JBOSS_HOME=$TORQUEBOX_HOME/jboss$ export JRUBY_HOME=$TORQUEBOX_HOME/jruby$ export PATH=$JRUBY_HOME/bin:$PATH
![Page 39: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/39.jpg)
Zbyt skomplikowane?
![Page 40: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/40.jpg)
$ gem install torquebox-server --pre \ --source http://torquebox.org/2x/builds/LATEST/gem-repo/
$ torquebox run
![Page 41: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/41.jpg)
Tak, na Windowsie również.
![Page 42: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/42.jpg)
Zainstalowane, co dalej?
![Page 43: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/43.jpg)
Aplikacja webowa, powiedzmy Rails.
![Page 44: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/44.jpg)
$ rails new app -m \ $TORQUEBOX_HOME/share/rails/template.rb$ cd app$ rake torquebox:deploy[‘/app’]
http://localhost:8080/app/
![Page 45: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/45.jpg)
To może jakiś kod co działa?
![Page 46: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/46.jpg)
$ rails g scaffold Coffee \ name:string description:text$ rake db:migrate
http://localhost:8080/app/coffees/
![Page 47: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/47.jpg)
Demo!
![Page 48: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/48.jpg)
Nie takie rzeczy widziałem!
![Page 49: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/49.jpg)
Integracja z Javą.
![Page 50: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/50.jpg)
class SomeController
def index session[:password] = 'sw0rdfish' end
end
Ruby
![Page 51: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/51.jpg)
public class SomeServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) { request.getSession().getValue("password"); }}
Java
![Page 52: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/52.jpg)
Klastrowanie?
![Page 53: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/53.jpg)
Sklastruj JBoss’a!
![Page 54: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/54.jpg)
mod_cluster
![Page 55: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/55.jpg)
![Page 56: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/56.jpg)
Dynamiczna konfiguracja!
![Page 57: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/57.jpg)
Koniec o aplikacjach webowych.
![Page 58: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/58.jpg)
Zaplanowane zadania.
![Page 59: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/59.jpg)
class NewsletterSender def run subscriptions = Subscription.find(:all) subscriptions.each do |e| send_newsletter(e) end endend
app/jobs/newsletter_sender.rb
![Page 60: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/60.jpg)
jobs: monthly_newsletter: description: first of month job: NewsletterSender cron: ‘0 0 0 1 * ?’
config/torquebox.yml
![Page 61: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/61.jpg)
Messaging.
![Page 62: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/62.jpg)
Zadania w tle.
![Page 63: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/63.jpg)
class Something def foo end
def bar endend
![Page 64: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/64.jpg)
something = Something.newsomething.foosomething.bar
![Page 65: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/65.jpg)
class Something include TorqueBox::Messaging::Backgroundable
def foo end
def bar endend
![Page 66: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/66.jpg)
something = Something.newsomething.background.foosomething.bar
![Page 67: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/67.jpg)
class Something include TorqueBox::Messaging::Backgroundable always_background :foo
def foo end
def bar endend
![Page 68: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/68.jpg)
something = Something.newsomething.foosomething.bar
![Page 69: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/69.jpg)
Kolejki.
![Page 70: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/70.jpg)
queues: /queues/questions /queues/answerstopics: /topics/new_accounts /topics/notifications
config/torquebox.yml
![Page 71: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/71.jpg)
messaging: /topics/print: PrintHandler: color: ‘red’ /queues/popular: AdultObserver: filter: "age >= 18" concurrency: 5
config/torquebox.yml
![Page 72: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/72.jpg)
include TorqueBox
queue = Messaging::Queue.new '/queues/foo'queue.create
...
queue.destroy
![Page 73: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/73.jpg)
include TorqueBox::Messaging
class PrintHandler < MessageProcessor def initialize(opts) @color = opts['color'] end def on_message(body) puts “#{body} in #{@color}” endend
config/torquebox.yml
![Page 74: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/74.jpg)
Usługi.
![Page 75: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/75.jpg)
Nie-webowe, długie demony.
![Page 76: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/76.jpg)
class MyService def initialize(opts={}) @queue = Messaging::Queue.new(opts[:queue]) end def start Thread.new { run } end def stop @done = true end def run until @done @queue.publish(Time.now) sleep(1) end end end app/processors/my_service.rb
![Page 77: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/77.jpg)
Cacheowanie.
![Page 78: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/78.jpg)
Wstrzykiwanie.
![Page 79: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/79.jpg)
package com.mycorp;
@ApplicationScopedclass Something { @Inject private Else else;
public void print(String what) { # blah }}
@ApplicationScopedclass Else {
}
![Page 80: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/80.jpg)
class MyService include TorqueBox::Injectors
def initialize(opts={}) @thing = inject(Java::com.mycorp.Something) @thing.print(‘Marek’) endend
![Page 81: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/81.jpg)
CDI to tylko przykład: kolejki, tematy, heroina,
inne rzeczy.
![Page 82: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/82.jpg)
Drugs are bad, m’kay?
![Page 83: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/83.jpg)
inject_topic( "/topics/questions" )inject_queue( "/queues/answers" )inject_namig( "java:comp/env/jdbc/myDS )
![Page 84: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/84.jpg)
Demo!
![Page 85: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/85.jpg)
JBoss AS 7
TorqueBox
Baza danych
Firefox
Kolejka JMS
Twitter Service
JBoss AS 7
TorqueBox
RailsZadaniaKonsument kolejki
CDI
JPA 2.0
![Page 86: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/86.jpg)
OK, fajnie, ale jak to jest wydajne?
![Page 87: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/87.jpg)
![Page 88: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/88.jpg)
![Page 89: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/89.jpg)
http://torquebox.org/http://github.com/torquebox
http://github.com/goldmann/confitura-2011-torquebox-demo
IRC: #torquebox on FreeNode
@torquebox
![Page 90: TorqueBox - Marek Goldmann · Set people = new HashSet(); for (Team each : teams) {people.addAll(each.getMembers());} for (Person each : people) {each.promote();](https://reader036.vdocuments.mx/reader036/viewer/2022062606/5ffeaf4214cdad4bbf2759ef/html5/thumbnails/90.jpg)
Dzięki.
Nie zapomnij o naklejkach!