Documentation > Application Scenarios
Crossbar.io was designed to flexibly support different application scenarios. Here are some examples
- Polyglot backends
- Polyglot frontends
- Serving static Web and CGI
- Adding Chat to Web applications
- Adding real-time to Web applications
- Internet of Things
Crossbar.io allows to create application components in different languages, running under their native language run-time:
Application components can freely talk to each other, completely unaware of the implementation language or run-time of the peer component. You can mix and match application components as needed.
- Choose your Weapon - Getting started with Crossbar.io in different languages.
The ability of Crossbar.io to connect application components written in different programming languages extends to frontend components for user interfaces. Using Crossbar.io, you can serve different UIs from the same backend:
You need a Web frontend, but want to also package this as a hybrid mobile app? No problem. Want to create a native mobile app as well? Again, no issue. Crossbar.io was designed to give you freedom and choice.
In fact (depending on what dependencies your code has) you can write functions that can be freely moved between the browser or NodeJS!
Adding Chat to Web applications¶
Sometimes you might want to add a specific, self-contained real-time feature like "Chat" to an existing Web application, with minimal changes to existing code. Crossbar.io supports this:
Adding real-time to Web applications¶
Another scenario is when you have an existing, classical Web application to which you just want to add some real-time features without rewriting the app.
Crossbar.io features HTTP REST bridge which allows interaction between WAMP application components and REST services.
As an example, the HTTP Publisher service of Crossbar.io can be used from any Web application framework that is able to do (outgoing) HTTP/POST requests. It does not matter whether the framework is asynchronous, threaded, blocking or something else, as long as it can trigger HTTP/POSTs.
Which means it'll work from e.g.
- Django, Flask, CherryPy or any other WSGI based framework
- Java Servlet, JSP, JSF, Apache Struts, ..
Serving static Web and CGI¶
As soon as your application includes some "Web stuff" like a frontend, this will require to host the Web assets (static files like HTML, CSS, images, etc) somewhere. Crossbar.io includes a Web server for serving static Web assets to relieve you from having to run yet another wheel:
The Web server built into Crossbar.io has some more features which are useful sometimes, like ability to server CGI scripts or setup HTTP redirections.
The builtin Web Server is quite capable - it will suffice for static serving in most cases. However, it's less performant than say Nginx (e.g. it reaches 20-50% performance) at static serving.
Internet of Things¶Top