Skip to content

oofp/beseder-demo-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beseder-demo-apps

ATM control program

This demo implements control of simplified ATM. ATM consists of four resources:

Supported operations:

  • Checking account balance
  • Cash withdrawal

Currently there are two alternative implementations of the program:

The demo are using Beseder feature of deriving resource declaration from type class that describe resource behavior. As a bonus, it also creates state diagram that provides visual presentation of resource behavior.

Here are state diagram for CashDispenser and Terminal resources:

Cash Dispenser Resource

ATM Terminal Resource

ATM Program example

State diagram of ATM program implemented as event loop.

AtmLoopApp.hs

This implementation is similar to traditional loop with state defined as ADT. Just that with Beseder state variants are inferred. All possible resource state combinations are shown and state transitions are shown below:

ATM program implemented as event loop

State diagram of of ATM program implemented as steps sequence.

AtmApp.hs

ATM State Diagram

Callback demo

This demo shows web controlled setup of callback call.

  • The users enters its own phone number abd destination number
  • First call reaches the caller's phone and then call is placed to destination.
  • During call setup, user is listening to the ringback tone.
  • Once destination answered the call, both parties are connected.
  • At any time user can cancel or hang up.
  • Once parties are connected, the user can mute herself.
  • Web UI will be implemented using Server Driven UI Beseder binding

outbound_call

callback


About

Collection of Beseder applications and application specific resource definitions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published