[sip-comm-dev] Proposition concerning the JAIN-SIP stack


#1

Hi all,

To process SIP messages, SC relies on a stack called JAIN-SIP (API and
reference implementation). However, the version used by SC is not a
"vanilla" one and has a few modifications, for instance to replace the
log4j by the standard Logger class.

Currently, we provide no way to retrieve the exact sources of the
version used in SIP Communicator. It is a problem from a free software
point of view and also not very convenient for the developers.

A first solution to solve that would be have a page on the wiki with the
following informations:
- current revision of JAIN-SIP used in our svn trunk
- set of patches applied
- possibly, a downloadable archive with the sources (patched or not)

Additionally, I'd like to see that hosted in a version control system.
It might be a bit heavy for our svn, but using an external git repo
would really ease the work of rebasing our patches against the latest
version of JAIN-SIP (you could be sure I'd propose that ;)). Here is a
gitorious project to see how it would look like:
http://gitorious.org/projects/jain-sip/repos/mainline/trees/master

What do you think?

Cheers,

···

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi all,

To process SIP messages, SC relies on a stack called JAIN-SIP (API and
reference implementation). However, the version used by SC is not a
"vanilla" one and has a few modifications, for instance to replace the
log4j by the standard Logger class.

Can you submit this change to jain sip ( assuming that the default can
be made to work as it does today ?)

Currently, we provide no way to retrieve the exact sources of the
version used in SIP Communicator. It is a problem from a free software
point of view and also not very convenient for the developers.

That is a cvs problem. However, note that I do keep a date stamp on
the cvs repository.

A first solution to solve that would be have a page on the wiki with the
following informations:
- current revision of JAIN-SIP used in our svn trunk
- set of patches applied
- possibly, a downloadable archive with the sources (patched or not)

Additionally, I'd like to see that hosted in a version control system.
It might be a bit heavy for our svn, but using an external git repo
would really ease the work of rebasing our patches against the latest
version of JAIN-SIP (you could be sure I'd propose that ;)). Here is a
gitorious project to see how it would look like:
http://gitorious.org/projects/jain-sip/repos/mainline/trees/master

What do you think?

Have you tried git-cvs and (I've only ever used git-svn). How do you
propose to keep the hosted git repository in sync with the master
(jain-sip.dev.java.net) cvs repository?

Thanks

Ranga

···

On Wed, Jan 14, 2009 at 5:12 PM, Sébastien Mazy <smazy@dev.java.net> wrote:

Cheers,

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
M. Ranganathan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi M. Ranganathan,

> To process SIP messages, SC relies on a stack called JAIN-SIP (API and
> reference implementation). However, the version used by SC is not a
> "vanilla" one and has a few modifications, for instance to replace the
> log4j by the standard Logger class.

Can you submit this change to jain sip ( assuming that the default can
be made to work as it does today ?)

I talked with Emil concerning the replacement of log4j in jain-sip and
IIRC he said that JAIN-SIP wasn't to take this direction (Emil, more
details about that?). Anyway, that would be better discussed on
JAIN-SIP ML.

> Currently, we provide no way to retrieve the exact sources of the
> version used in SIP Communicator. It is a problem from a free software
> point of view and also not very convenient for the developers.

That is a cvs problem. However, note that I do keep a date stamp on
the cvs repository.

Actually I think the problem is also on our side. We only store a
"JainSipRi1.2.jar" in our svn tree with no version information
whatsoever. That would be easily solved however. But that's true as well
that CVS sucks :wink:

> A first solution to solve that would be have a page on the wiki with the
> following informations:
> - current revision of JAIN-SIP used in our svn trunk
> - set of patches applied
> - possibly, a downloadable archive with the sources (patched or not)
>
> Additionally, I'd like to see that hosted in a version control system.
> It might be a bit heavy for our svn, but using an external git repo
> would really ease the work of rebasing our patches against the latest
> version of JAIN-SIP (you could be sure I'd propose that ;)). Here is a
> gitorious project to see how it would look like:
> http://gitorious.org/projects/jain-sip/repos/mainline/trees/master
>
> What do you think?

Have you tried git-cvs and (I've only ever used git-svn). How do you
propose to keep the hosted git repository in sync with the master
(jain-sip.dev.java.net) cvs repository?

git-cvs is really feature poor compared to git-svn. It can be used to
import CVS commits in a git repo but I dont' think it's possible to
commit with it (whereas git makes also a great svn client), so you can't
get rid of your cvs working copy. Correct me if I wrong, I used it for
the first time today.

I see 2 cases where it would be useful to use git:
- to provide a read-only mirror that another party could use to
   maintain its set of patches and have them rebased periodically. That
   what I thought for SC as I have a hacky patch in mind that is not
   commitable upstream (too SC specific, I'll think about it further to
   find a cleaner solution).
- to do a full-migration to git.

Currently, here is what I do to update the gitorious repos:
(1) git cvsimport -v -k -p x -C jain-sip -r cvs -d:pserver:guest@cvs.dev.java.net:/cvs jain-sip
(2) git push gitorious refs/remotes/cvs/HEAD:refs/heads/cvs/HEAD

(1) will import/update the branches and tags from CVS in the following
places in my local repo:
  refs/remotes/cvs/HEAD
  refs/remotes/cvs/NIO
  refs/remotes/cvs/deployment-to-maven-repository
  refs/remotes/cvs/master
  refs/remotes/cvs/nist
  refs/tags/JAIN-SIP-1-1
  refs/tags/JAIN-SIP-1-2-1
  ... and so on

(2) will send the cvs head in the gitorious cvs/HEAD branch

···

On Wed, Jan 14, 2009 at 05:38:53PM -0500, M. Ranganathan wrote:

On Wed, Jan 14, 2009 at 5:12 PM, Sébastien Mazy <smazy@dev.java.net> wrote:

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

No thats not what I meant. If you can add a new config parameter to
chose whether the logger is log4j ( the default ) or java logging,
that would be good.

Any solution is fine as far as git is concerned just so long as the
master copy is on jain-sip.dev.java.net Commits could be a bit of a
pain - you would need to commit to jain-sip.dev.java.net first and
have the git repo be updated from that master copy

Regards

Ranga

···

On Wed, Jan 14, 2009 at 6:26 PM, Sébastien Mazy <smazy@dev.java.net> wrote:

Hi M. Ranganathan,

On Wed, Jan 14, 2009 at 05:38:53PM -0500, M. Ranganathan wrote:

On Wed, Jan 14, 2009 at 5:12 PM, Sébastien Mazy <smazy@dev.java.net> wrote:
> To process SIP messages, SC relies on a stack called JAIN-SIP (API and
> reference implementation). However, the version used by SC is not a
> "vanilla" one and has a few modifications, for instance to replace the
> log4j by the standard Logger class.

Can you submit this change to jain sip ( assuming that the default can
be made to work as it does today ?)

I talked with Emil concerning the replacement of log4j in jain-sip and
IIRC he said that JAIN-SIP wasn't to take this direction (Emil, more
details about that?). Anyway, that would be better discussed on
JAIN-SIP ML.

--
M. Ranganathan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

[snip]

I talked with Emil concerning the replacement of log4j in jain-sip

and

IIRC he said that JAIN-SIP wasn't to take this direction (Emil, more
details about that?). Anyway, that would be better discussed on
JAIN-SIP ML.

No thats not what I meant. If you can add a new config parameter to
chose whether the logger is log4j ( the default ) or java logging,
that would be good.

SLF4J (http://www.slf4j.org/) is a kind of meta-logging API which lets
you choose the logging system at deployment time. I guess this would be
the way to go if you want to support both log4j and Java logging. (I
haven't programmed with it so far though, only used libraries which use
it.)

Cheers
Michael Koch

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

I've CC'ed jain-sip dev ML.

> Hi M. Ranganathan,
>
>> > To process SIP messages, SC relies on a stack called JAIN-SIP (API and
>> > reference implementation). However, the version used by SC is not a
>> > "vanilla" one and has a few modifications, for instance to replace the
>> > log4j by the standard Logger class.
>>
>>
>> Can you submit this change to jain sip ( assuming that the default can
>> be made to work as it does today ?)
>
> I talked with Emil concerning the replacement of log4j in jain-sip and
> IIRC he said that JAIN-SIP wasn't to take this direction (Emil, more
> details about that?). Anyway, that would be better discussed on
> JAIN-SIP ML.
>

No thats not what I meant. If you can add a new config parameter to
chose whether the logger is log4j ( the default ) or java logging,
that would be good.

Sorry, I had jumped over "assuming that the default can be made to work
as it does today". I'll look into it. The less we customize JAIN-SIP,
the better.

Any solution is fine as far as git is concerned just so long as the
master copy is on jain-sip.dev.java.net Commits could be a bit of a
pain - you would need to commit to jain-sip.dev.java.net first and
have the git repo be updated from that master copy

Exactly.

···

On Wed, Jan 14, 2009 at 06:42:16PM -0500, M. Ranganathan wrote:

On Wed, Jan 14, 2009 at 6:26 PM, Sébastien Mazy <smazy@dev.java.net> wrote:
> On Wed, Jan 14, 2009 at 05:38:53PM -0500, M. Ranganathan wrote:
>> On Wed, Jan 14, 2009 at 5:12 PM, Sébastien Mazy <smazy@dev.java.net> wrote:

On Thu, Jan 15, 2009 at 07:53:02AM +0100, Koch Michael wrote:

>No thats not what I meant. If you can add a new config parameter to
>chose whether the logger is log4j ( the default ) or java logging,
>that would be good.

SLF4J (http://www.slf4j.org/) is a kind of meta-logging API which lets
you choose the logging system at deployment time. I guess this would be
the way to go if you want to support both log4j and Java logging. (I
haven't programmed with it so far though, only used libraries which use
it.)

It seems to be perfect solution indeed:
http://www.slf4j.org/faq.html#when

Thanks Michael Koch!

What do you JAIN-SIP devs think about it?

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
For additional commands, e-mail: dev-help@jain-sip.dev.java.net


#7

Regarding logging, I think one should be able to provide its own LogWriter
implementation (rename the current LogWriter class to LogWriterImpl and have
a LogWriter interface). the current LogWriterImpl will do the log4j
implementation but this way we could either plug java util logging, commons
logging, SLF4J or whatever new logging system comes in the future. The
logwriter classname would be supplied to the jain sip stack through yet
another property
This can be hacked pretty easily and I can do it if there is enough
interest. I actually did it for the jain sip port to Android because I
thought log4j could not run on android but that was not the case so I
discarded my changes.
This will allow people to plug any kind of logging system because some might
not want to use SLF4J neither.

Not sure what the git thing is about, can someone provide more details ?

Thanks
Jean

···

On Thu, Jan 15, 2009 at 10:39 AM, Sébastien Mazy <smazy@dev.java.net> wrote:

I've CC'ed jain-sip dev ML.

On Wed, Jan 14, 2009 at 06:42:16PM -0500, M. Ranganathan wrote:
> On Wed, Jan 14, 2009 at 6:26 PM, Sébastien Mazy <smazy@dev.java.net> > wrote:
> > Hi M. Ranganathan,
> >
> > On Wed, Jan 14, 2009 at 05:38:53PM -0500, M. Ranganathan wrote:
> >> On Wed, Jan 14, 2009 at 5:12 PM, Sébastien Mazy <smazy@dev.java.net> > wrote:
> >> > To process SIP messages, SC relies on a stack called JAIN-SIP (API
and
> >> > reference implementation). However, the version used by SC is not a
> >> > "vanilla" one and has a few modifications, for instance to replace
the
> >> > log4j by the standard Logger class.
> >>
> >>
> >> Can you submit this change to jain sip ( assuming that the default can
> >> be made to work as it does today ?)
> >
> > I talked with Emil concerning the replacement of log4j in jain-sip and
> > IIRC he said that JAIN-SIP wasn't to take this direction (Emil, more
> > details about that?). Anyway, that would be better discussed on
> > JAIN-SIP ML.
> >
>
>
> No thats not what I meant. If you can add a new config parameter to
> chose whether the logger is log4j ( the default ) or java logging,
> that would be good.

Sorry, I had jumped over "assuming that the default can be made to work
as it does today". I'll look into it. The less we customize JAIN-SIP,
the better.

> Any solution is fine as far as git is concerned just so long as the
> master copy is on jain-sip.dev.java.net Commits could be a bit of a
> pain - you would need to commit to jain-sip.dev.java.net first and
> have the git repo be updated from that master copy

Exactly.

On Thu, Jan 15, 2009 at 07:53:02AM +0100, Koch Michael wrote:
> >No thats not what I meant. If you can add a new config parameter to
> >chose whether the logger is log4j ( the default ) or java logging,
> >that would be good.
>
> SLF4J (http://www.slf4j.org/) is a kind of meta-logging API which lets
> you choose the logging system at deployment time. I guess this would be
> the way to go if you want to support both log4j and Java logging. (I
> haven't programmed with it so far though, only used libraries which use
> it.)

It seems to be perfect solution indeed:
http://www.slf4j.org/faq.html#when

Thanks Michael Koch!

What do you JAIN-SIP devs think about it?

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
For additional commands, e-mail: dev-help@jain-sip.dev.java.net


#8

Hi Jean,

Regarding logging, I think one should be able to provide its own LogWriter
implementation (rename the current LogWriter class to LogWriterImpl and have
a LogWriter interface). the current LogWriterImpl will do the log4j
implementation but this way we could either plug java util logging, commons
logging, SLF4J or whatever new logging system comes in the future. The
logwriter classname would be supplied to the jain sip stack through yet
another property
This can be hacked pretty easily and I can do it if there is enough
interest. I actually did it for the jain sip port to Android because I
thought log4j could not run on android but that was not the case so I
discarded my changes.
This will allow people to plug any kind of logging system because some might
not want to use SLF4J neither.

Well, that's the point of SLF4J. It is not a logging system. From
http://www.slf4j.org/faq.html#what_is:
"SLF4J is a simple facade for logging systems allowing the end-user to
plug-in the desired logging system at deployment time."

Not sure what the git thing is about, can someone provide more details ?

Sorry, the beginning of the thread is here:
https://sip-communicator.dev.java.net/servlets/BrowseList?list=dev&by=thread&from=1510298

The point was to provide a git mirror of the cvs head so that other
projects could maintain a git branch with their [non commited yet|non
commitable] changes against JAIN-SIP.

···

On Thu, Jan 15, 2009 at 10:53:03AM +0100, Jean Deruelle wrote:

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
For additional commands, e-mail: dev-help@jain-sip.dev.java.net


#9

My point is that Jakarta Commons Logging once promised the same thing then
came SLF4J, it is highly probable that another "facade" will come along in
the future. And there is nothing preventing you from writing a LogWriter
implementation to plug SLF4J thus allowing you to plug any underlying
logging implementation which seems more extensible and flexible.
Also instead of using a property, maybe a getter/setter would be better,
this would allow one to be able to initialize the LogWriter impl. as they
wish (such as assing custom appenders and so on for log4j by example a thing
which seems not possible to do from SLF4J from what the link you provided
say) and just pass it along to the sip stack before starting it.

I would be interested in the opinion of other jain sip stack
users/developpers as well

···

On Thu, Jan 15, 2009 at 11:37 AM, Sébastien Mazy <smazy@dev.java.net> wrote:

Hi Jean,

On Thu, Jan 15, 2009 at 10:53:03AM +0100, Jean Deruelle wrote:
> Regarding logging, I think one should be able to provide its own
LogWriter
> implementation (rename the current LogWriter class to LogWriterImpl and
have
> a LogWriter interface). the current LogWriterImpl will do the log4j
> implementation but this way we could either plug java util logging,
commons
> logging, SLF4J or whatever new logging system comes in the future. The
> logwriter classname would be supplied to the jain sip stack through yet
> another property
> This can be hacked pretty easily and I can do it if there is enough
> interest. I actually did it for the jain sip port to Android because I
> thought log4j could not run on android but that was not the case so I
> discarded my changes.
> This will allow people to plug any kind of logging system because some
might
> not want to use SLF4J neither.

Well, that's the point of SLF4J. It is not a logging system. From
http://www.slf4j.org/faq.html#what_is:
"SLF4J is a simple facade for logging systems allowing the end-user to
plug-in the desired logging system at deployment time."

> Not sure what the git thing is about, can someone provide more details ?

Sorry, the beginning of the thread is here:

https://sip-communicator.dev.java.net/servlets/BrowseList?list=dev&by=thread&from=1510298

The point was to provide a git mirror of the cvs head so that other
projects could maintain a git branch with their [non commited yet|non
commitable] changes against JAIN-SIP.

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
For additional commands, e-mail: dev-help@jain-sip.dev.java.net


#10

The point of having nist-sip's logger wrapers is exactly this. I am not
a fervent admirer of the commons-logging-like frameworks. Different
projects are likely to have different needs in terms of logging which is
why, for example, both sip-communicator and jain-sip have their own
Logger classes. They can however play exactly the same role as slf4j.
After all that's part of their raison d'etre.

I believe that if there was a way of setting our own logger impl in
jain-sip, which is what Jean suggested, then we'd have what we need.
Besides, this also seems like the most painless approach in terms of
modifications.

For the record, I don't think it would matter for us whether we do it
through a property or a setter method.

Cheers
Emil

Jean Deruelle wrote:

···

My point is that Jakarta Commons Logging once promised the same thing
then came SLF4J, it is highly probable that another "facade" will come
along in the future. And there is nothing preventing you from writing a
LogWriter implementation to plug SLF4J thus allowing you to plug any
underlying logging implementation which seems more extensible and flexible.
Also instead of using a property, maybe a getter/setter would be better,
this would allow one to be able to initialize the LogWriter impl. as
they wish (such as assing custom appenders and so on for log4j by
example a thing which seems not possible to do from SLF4J from what the
link you provided say) and just pass it along to the sip stack before
starting it.

I would be interested in the opinion of other jain sip stack
users/developpers as well

On Thu, Jan 15, 2009 at 11:37 AM, Sébastien Mazy <smazy@dev.java.net > <mailto:smazy@dev.java.net>> wrote:

    Hi Jean,

    On Thu, Jan 15, 2009 at 10:53:03AM +0100, Jean Deruelle wrote:
    > Regarding logging, I think one should be able to provide its own
    LogWriter
    > implementation (rename the current LogWriter class to
    LogWriterImpl and have
    > a LogWriter interface). the current LogWriterImpl will do the log4j
    > implementation but this way we could either plug java util
    logging, commons
    > logging, SLF4J or whatever new logging system comes in the future. The
    > logwriter classname would be supplied to the jain sip stack
    through yet
    > another property
    > This can be hacked pretty easily and I can do it if there is enough
    > interest. I actually did it for the jain sip port to Android because I
    > thought log4j could not run on android but that was not the case so I
    > discarded my changes.
    > This will allow people to plug any kind of logging system because
    some might
    > not want to use SLF4J neither.

    Well, that's the point of SLF4J. It is not a logging system. From
    http://www.slf4j.org/faq.html#what_is:
    "SLF4J is a simple facade for logging systems allowing the end-user to
    plug-in the desired logging system at deployment time."

    > Not sure what the git thing is about, can someone provide more
    details ?

    Sorry, the beginning of the thread is here:
    https://sip-communicator.dev.java.net/servlets/BrowseList?list=dev&by=thread&from=1510298
    <https://sip-communicator.dev.java.net/servlets/BrowseList?list=dev&by=thread&from=1510298>

    The point was to provide a git mirror of the cvs head so that other
    projects could maintain a git branch with their [non commited yet|non
    commitable] changes against JAIN-SIP.

    --
    Sébastien Mazy

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
    <mailto:dev-unsubscribe@jain-sip.dev.java.net>
    For additional commands, e-mail: dev-help@jain-sip.dev.java.net
    <mailto:dev-help@jain-sip.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jain-sip.dev.java.net
For additional commands, e-mail: dev-help@jain-sip.dev.java.net