Component-based application with scalability in mind: OSGi or Akka?

一世执手 提交于 2019-12-06 13:31:05

As Peter says they are not directly comparable. In fact you can use them together and they should be quite complementary.

Akka provides an asynchronous communications API. OSGi provides a modular, service-oriented framework. There is nothing in Akka, for example, that would solve the problem of isolating modules so that they cannot have visibility of each others' internals. Likewise there is nothing in OSGi quite like the async communications provided by Akka. So use them together and you get the best of both worlds...

OSGi does have synchronous Services, which are the principal method of communication between modules in a single JVM. OSGi also has a Remote Services layer that can be used for communication between remote machines. This is probably the area where OSGi and Akka most directly overlap, I suppose. But even here I think there is potential for cooperation. For example, OSGi Remote Services has a really powerful discovery mechanism that allows us to advertise capabilities on the network. You could possibly use this discovery to find Akka actors that are available for you to communicate with.

I'm not aware of anybody actually working on this as present, so I think that exploring and expanding on this idea would be an excellent topic for a master's thesis!

Which university do you attend? The OSGi Alliance is very interested in fostering links with the academic community, perhaps we could set up an online meeting with you and your professor?

I think you compare apple and pears. You can run Scala code on OSGi (though their binary compatibility is horrible).

Scala is a programming language, and Akka a messaging library. OSGi is a dynamic component system. So not sure how you can compare them

I agree with both Neil and Peter, you're asking us to make a comparison between apples and oranges. You can use both frameworks together. I'm currently working on a project with the same main requirements you specified. I'm creating a prototype that demonstrates using both technologies together, OSGi to provide modularity and updatability, and Akka to provide scalability and performance.

If you would like to see both frameworks working together you can play with the sample application I posted on github.

They aren't an apples to apples comparison. They are Orthogonal to each other and, if anything, complement each other. Use both.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!