-
I am not in favor of making much effort for components to support multiple versions of the Tigase server. I had a talk with Bartosz and Andrzej about separating some code (kernel API) from the Tigase server as Bot Framework (and maybe JaXMPP) uses it. So right now Bot Framework depends on the Tigase server code which is not good.
So, if we are talking about extracting some kind of general purpose API from the server for other projects to use, then yes we should do this.
-
Artur Hefczyc wrote:
So, if we are talking about extracting some kind of general purpose API from the server for other projects to use, then yes we should do this.
I had something slightly different in mind, but after pondering it more I realised it wouldn't work/make sense. Closing/Rejecting.
-
Proposal
What I have in mind is project structure similar to structure of JaXMPP:
Tigase Server Project |- Server |- Kernel |- EventBus |- Installer \- Something Else
Why?
Because it is easier to develop some new features. For example Kernel. Now it is inside monolithic
tigase-server@, and @bot
have to depend on whole Server code. With modular project structure Bot imports only Kernel. If we will decide to make Kernel as separate project (for example to have platform running all our software, something like OSGi platform), it will be easy to do that: just move code from module to new repo and update dependencies inpom.xml
files.Modules are not different repos or different projects. Everything is in the same code repository, in single project. If someone does
git clone https://…/tigase-server.git
he will download whole code, andmvn package
will build everything includes sub modules. From user side, it will looks the same.And most important thing:
Project structure base on modules forces better code, without cyclic code usage etc.
It is easy
If we decide to make
tigase-server
code structure modular, we have just to move current./src/
to (for example)./server/src/
and updatepom.xml
files. If you will need to make new submodule, just do it. If you want to move some code from server code to submodule - just do it! It is not required at this time. All modules are optional if we have modules friendly project structure. -
Documentation updated, blog post published (http://tigase.net/blog-entry/tigase-server-project-structure-change), for now moved only win-stuff to distribution directory as it makes more sense.
Planned:
-
removal of
server/debian
directory; -
removal of
server/package-list/
directory;
%andrzej can
conf
contents be moved to @etc@? It's OSGi related.
From Andrzej:
Quite possibly
section Configuring the Framework
java -Dfelix.config.properties=file:/home/rickhall/config.properties -jar bin/felix.jar
so we would need to adjust
tigase.sh
-
-
I went ahead and removed
server/debian
andserver/package-list/
directories; OSGi configuration file was moved underserver/etc
(and shellscripts were updated).Jenkins was updated to accommodate the changes.
I consider the task to be completed.
%Bartek can now work on extracting needed modules: kernel, dsl, eventbus(?!) and others as needed.
Type |
Task
|
Priority |
Normal
|
Assignee | |
RedmineID |
4879
|
Version |
tigase-server-8.0.0
|
Spent time |
0
|
Repository, folder structure should be reorganised to match logical, maven module structure (which will allow extracting more modules):
In addition, binaries should be removed from repository (deploy to our maven repository, handle downloading during basic build):
~~Based on the discussion in https://projects.tigase.org/issues/4871#note-3 I would like to discuss something (and it may be related a bit to a concept we had a while back ~~ making component support particular [set of] versions of Tigase) - we could try to extract Tigase APIs to separate module/project and make it a dependency:
APIs don't change that much so it would require less updating (as per above ticket)
with the above we would be able to make components support ranges of Tigase versions (which would be based on particular API version)
possibly could help with building as currently we have build tigase-server module (because all components depends on it because of the APIs used) and after that build main tigase-server module (binaries, modules) because in turn this depends on the components being included (and this results in circular dependencies).
I'm aware that decoupling it will be tricky at the least but this is a stub for discussion.-