This library aims at small-scale in-process use cases, where you want to model things using concurrent actors, but pulling in a huge framework like Akka might be an overkill. The linked docs go into more detail in how to use it. Any feedback is welcome!
Is interesting for me too. Question: can one do dynamic routing as, e.g., needed for REST (you post a resource and get a new path to access the resource9
Is interesting for me too. Question: can one do dynamic routing as, e.g., needed for REST (you post a resource and get a new path to access the resource9
Cask Actors does not come with any feature for routing; you can only send messages to actors via programmatic reference to the Actor[T]. You’ll have to deal with resolving REST URLs to individual actors, as well as de-serializing HTTP fields into structured case classes, yourself: perhaps using a dictionary of actors with a serialization library like uPickle, or a server routing library like cask.Routes
I asked the wrong question for the email subject. From Cask Actors i was seduced to look at the main page of Cask. So the question addressed the Http framework. Does Cask provide dynamic routing?
The strings you pass to the route decorators like @cask.get("...") are dynamic; you can construct them from local variables, class constructor parameters, environment variables, etc.
If you need ultimate flexibility, you can define a route that takes a subpath = True as documented here, take the request.remainingPathSegments and dispatch to your own custom logic in any way you’d like