agourlay / omnibus Goto Github PK
View Code? Open in Web Editor NEWAn HTTP-friendly persistent message bus.
License: Apache License 2.0
An HTTP-friendly persistent message bus.
License: Apache License 2.0
Test spray interface using topic name randomly generate via Scalacheck
The standalone process should be configurable with a file in /conf/application.conf
etc
see : https://github.com/agourlay/omnibus/blob/master/src/main/resources/application.conf#L1
Provide a Grafana dashboard to display metrics from Graphite
http://grafana.org/
https://www.youtube.com/watch?v=OUvJamHeMpw
Interesting design decision .. I would have said that if one listens for /topics/animals one gets all animal related messages (incl. furry) but if one listens on /topics/animals/furry then one just gets those and not messages from /topics/animals
Thoughts?
Follow the great example here
http://www.cakesolutions.net/teamblogs/2013/08/02/akka-and-spray/
Omnibus persists locally a journal log of events on the file system.
Currently it uses akka-persistence-leveldb which has performance issues :
akka/akka#15585
ideas :
Use gatling-sbt plugin when ready https://github.com/gatling/gatling-sbt
Would be awesome to pub/sub via websocket.
Wait for websocket to be implemented in akka-http
provide a basic administration interface to
Currently the ´ask pattern´ is used often.
Investigate the pattern one actor per-request.
http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/
Try to remove all usage of Future.
Manipulate the rest API via the admin interface for lazy people.
Right now the GET method on a topic is used to subscribe directly to the topic.
I believe we should offer a level of indirection to expose the topic in a more REST fashion way.
GET /topics/animals/furry "should" reply something like
{
"name" : "animals/furry",
"creationDate" : "aTimestamp",
"_links": {
"subscribe": { "href": "/stream/topics/animals/furry" },
"stats": { "href": "/stats/topics/animals/furry" },
"parent": { "href": "/topic/animals/" },
"children": [{ "href": "/topic/animals/furry/cats",
"href": "/topic/animals/furry/fox" }]
}
}
That way the topic tree can be traversed in a clear REST way and subscribing becomes more clear with the action url.
Any suggestion/feedback on this?
edit : fix title
Redesign application metrics using Codahale's Metrics http://metrics.codahale.com/manual/
Archived stats. should not be saved in Cassandra with the events but pushed outside to a reporter (Graphite for instance).
Managing stats manually will become a burden in a distributed environment where stats need to be aggregated.
Omnibus will only provide the current stats in the webadmin.
"Last-Event-ID" can be directly used with "since-id" reactive mode,
optional binary payload per connection.
Build omnibus standalone with https://github.com/sbt/sbt-native-packager
Using String for topic's name introduce ugly code and potential bugs due to lack of input validation.
Create a case class TopicPath
that would contain a list of segments and a toString method to produce the printed version.
The topic name coming from spray interface should be validated and serialized into TopicPath as soon as possible.
All actors should then use TopicPath in their API and state.
When a topic is created, the message in POST data is received by subscribers whereas on subtopic this message is not received.
Design a domain object for subscription (topic, IP, id etc) and expose API.
get -> /admin/subscribers
: get collection of all subscribers
delete -> /admin/subscribers/{sub_id}
: shutdown connection
make sure that responses contain the proper status code and clean error messages
Omnibus should support an external akka-persistence plugin to persist data
those collections can become pretty big
Migrate to Scala 2.11
The stat should provide the complete name of the topic; not only the current node topic name.
should be discussed :
In the current stat response for a /stats/topics/omnibus/bus1
we got a topicName "bus1" but it doesn't help for aggregate stat if there is another /topics/personalbus/bus1; we can't say if it we need to add an entry for the first or the second.
Some ideas :
Omnibus acts as a MQTT broker
[info] Running omnibus.Boot
2014-11-19 10:06:08,847 INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
Uncaught error from thread [omnibus-akka.persistence.dispatchers.default-plugin-dispatcher-9] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[omnibus]
java.lang.UnsatisfiedLinkError: org.fusesource.leveldbjni.internal.NativeOptions.init()V
at org.fusesource.leveldbjni.internal.NativeOptions.init(Native Method)
at org.fusesource.leveldbjni.internal.NativeOptions.(NativeOptions.java:54)
at org.fusesource.leveldbjni.JniDBFactory$OptionsResourceHolder.init(JniDBFactory.java:98)
at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:167)
at akka.persistence.journal.leveldb.LeveldbStore$class.preStart(LeveldbStore.scala:112)
at akka.persistence.journal.leveldb.LeveldbJournal.preStart(LeveldbJournal.scala:20)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at akka.persistence.journal.leveldb.LeveldbJournal.aroundPreStart(LeveldbJournal.scala:20)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:279)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.