| layout | default |
|---|---|
| title | Orbit Framework |
{% include JB/setup %}
Orbit is a modern framework for JVM languages that makes it easier to build and maintain distributed and scalable online services. It was developed by BioWare, a division of Electronic Arts. For the latest news, follow us on Twitter.
You can grab the code on GitHub or get started now.
Orbit is primarily made up of the following components:
- Orbit Actors, a framework to write distributed systems using virtual actors.
- Orbit Async, async-await methods for the JVM.
- Orbit Container, a minimal inversion of control container for building online services.
- Orbit Utils, a set of utils to help simplify various tasks on the JVM.
- Orbit Web, a lightweight HTTP and Websockets container for Orbit, powered by Jetty.
- Orbit Commons, various common utilities used by Orbit.
Actors - Java Example {% highlight java %} public interface Hello extends Actor { Task sayHello(String greeting); }
public class HelloActor extends AbstractActor implements Hello { public Task sayHello(String greeting) { getLogger().info("Here: " + greeting); return Task.fromValue("Hello There"); } }
Actor.getReference(Hello.class, "0").sayHello("Meep Meep"); {% endhighlight %}
Actors - Scala Example {% highlight scala %} trait Hello extends Actor { def sayHello(greeting: String): Task[String] }
class HelloActor extends AbstractActor[AnyRef] with Hello { def sayHello(greeting: String): Task[String] = { getLogger.info("Here: " + greeting) Task.fromValue("Hello There") } }
Actor.getReference(classOf[Hello], "0").sayHello("Meep Meep") {% endhighlight %}