# ActionCable & WebSockets (Ruby on Rails) > Realtime functies, channels, subscriptions, broadcasting, cable.yml-configuratie, Redis-adapter - 18 gespreksvragen - Mid-Level - [Gespreksvragen: Ruby on Rails](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen.md) ## 1. Wat is ActionCable in Ruby on Rails? **Antwoord** ActionCable is een in Rails ingebouwd framework waarmee realtime functies via WebSockets kunnen worden geïmplementeerd. Het biedt een abstractie aan de serverzijde in Ruby en aan de clientzijde in JavaScript om persistente bidirectionele verbindingen tussen de browser en de server tot stand te brengen. ActionCable integreert op natuurlijke wijze met de rest van de Rails-applicatie en geeft toegang tot models en andere componenten. ## 2. Welk configuratiebestand definieert de adapter die ActionCable gebruikt voor pub/sub? **Antwoord** Het bestand cable.yml in config/ definieert de pub/sub-adapter die door ActionCable wordt gebruikt. Dit bestand specificeert verschillende adapters per omgeving: async voor ontwikkeling (in-memory, enkel proces), redis of postgresql voor productie (waardoor communicatie tussen meerdere processen/servers mogelijk is). De configuratie bevat doorgaans de URL van de Redis-server en het te gebruiken kanaal. ## 3. In welke directory worden serverside ActionCable-channels doorgaans geplaatst? **Antwoord** Serverside ActionCable-channels worden in app/channels/ geplaatst. Deze directory bevat ApplicationCable::Connection (verbindingsbeheer en authenticatie) en ApplicationCable::Channel (basisklasse voor alle channels). Aangepaste channels erven van ApplicationCable::Channel en definiëren de bedrijfslogica voor elk type realtime communicatie. ## Nog 15 vragen beschikbaar - Welke methode moet in een channel worden gebruikt om je te abonneren op een berichtenstream die door een string wordt geïdentificeerd? - Wat is het verschil tussen stream_from en stream_for in ActionCable? Meld je gratis aan: https://sharpskill.dev/nl/login ## Andere Ruby on Rails-sollicitatieonderwerpen - [Ruby-basis](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-basics.md): 25 vragen, Junior - [Objectgeoriënteerd programmeren in Ruby](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-oop.md): 20 vragen, Junior - [Rails-grondbeginselen](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-fundamentals.md): 18 vragen, Junior - [Routing & Controllers](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/routing-controllers.md): 22 vragen, Junior - [ActiveRecord-basis](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-basics.md): 25 vragen, Junior - [Views & ERB-templates](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/views-erb-templates.md): 20 vragen, Junior - [ActiveRecord-associaties](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-associations.md): 24 vragen, Mid-Level - [Geavanceerde ActiveRecord-query's](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-queries.md): 28 vragen, Mid-Level - [Rails-formulieren](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-forms.md): 20 vragen, Mid-Level - [Authenticatie & autorisatie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/authentication-authorization.md): 22 vragen, Mid-Level - [Moderne Asset Pipeline & frontend](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-asset-pipeline.md): 18 vragen, Mid-Level - [Rails API-modus](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-api-mode.md): 20 vragen, Mid-Level - [Testen met RSpec](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-testing-rspec.md): 24 vragen, Mid-Level - [ActiveJob & Background Jobs](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-job-background-jobs.md): 20 vragen, Mid-Level - [ActionMailer](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/action-mailer.md): 18 vragen, Mid-Level - [ActiveStorage](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-storage.md): 20 vragen, Mid-Level - [Cachingstrategieën](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/caching-strategies.md): 20 vragen, Mid-Level - [Geavanceerde migraties](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/database-migrations-advanced.md): 20 vragen, Mid-Level - [Rails Engines & modulaire apps](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-engines-modular-apps.md): 18 vragen, Senior - [Prestatie-optimalisatie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/performance-optimization.md): 26 vragen, Senior - [Rails Design Patterns](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-design-patterns.md): 22 vragen, Senior - [Ruby-metaprogrammering](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-metaprogramming.md): 20 vragen, Senior - [Rails-beveiliging](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-security.md): 22 vragen, Senior - [GraphQL met Rails](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/graphql-rails.md): 20 vragen, Senior - [Deployment & Productie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-deployment-production.md): 20 vragen, Senior - [Monitoring & Logging](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/monitoring-logging.md): 20 vragen, Senior - [Rails-upgradestrategieën](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-upgrade-strategies.md): 18 vragen, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/action-cable-websockets