You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Dileepa Jayakody <di...@gmail.com> on 2014/11/05 09:04:54 UTC

Embedding Stanbol in an existing Java Application

Hi All,

I have a requirement to embed Stanbol enhancer and entityhub in a Java
application and call an enhancement chain via a Java API without doing
remote calls. Any inputs on how to achieve this?


Thanks,
Dileepa

Re: Embedding Stanbol in an existing Java Application

Posted by Dileepa Jayakody <di...@gmail.com>.
Hi Rupert et al,

Thanks for your advice.

I will take a look at the stanbol-lmf project. I also found  related prev.
email thread on invoking Stanbol as a Java API here [1], My application is
not using OSGi so far and launching an embedded Felix runtime could be
troublesome as you pointed out.

On Wed, Nov 5, 2014 at 7:00 PM, Rupert Westenthaler <
rupert.westenthaler@gmail.com> wrote:

> Hi Dileepa,
>
> If the existing java application does use OSGI it is going to be easy
> - just add the bundles required by Stanbol. If not you need to use an
> embedded OSGI environment [1]. If your application does not use OSGI
> it very complex and might not work at all.
>
> Some time we tried to embed Apache Stanbol within the LMF (Linked
> Media Framework). The code for this integration is still available at
> [2]. So if you want give it a try this might help you.
>
> But I highly recommend to not investing a lot of time into at, that
> our experiences where not so great. Instead I would suggest to extend
> Stanbol with the specific services you need and than calling those
> services.
>

Would you recommend Stanbol invoked through a REST API in distributed
realtime processing environment? In my usecase I'm trying to use Stanbol
for real time semantic processing using Apache Storm.
So I think the bestcase scenario would be to invoke Stanbol enhancer as a
Java API.
Can you give some insight on how to extend Stanbol with specific services
and calling those services in a distributed realtime computing environment?


Thanks,
Dileepa


[1]
http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201111.mbox/%3CCABMc4VYP5e+vtW1As1yP7RRnSg84DjtApZ9J5vpS14ryV6OQ1Q@mail.gmail.com%3E


> best
> Rupert
>
> [1]
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-embedding
> [2] https://bitbucket.org/srfgkmt/stanbol-lmf
>
> On Wed, Nov 5, 2014 at 9:04 AM, Dileepa Jayakody
> <di...@gmail.com> wrote:
> > Hi All,
> >
> > I have a requirement to embed Stanbol enhancer and entityhub in a Java
> > application and call an enhancement chain via a Java API without doing
> > remote calls. Any inputs on how to achieve this?
> >
> >
> > Thanks,
> > Dileepa
>
>
>
> --
> | Rupert Westenthaler             rupert.westenthaler@gmail.com
> | Bodenlehenstraße 11                              ++43-699-11108907
> | A-5500 Bischofshofen
> | REDLINK.CO
> ..........................................................................
> | http://redlink.co/
>

Re: Embedding Stanbol in an existing Java Application

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Dileepa,

If the existing java application does use OSGI it is going to be easy
- just add the bundles required by Stanbol. If not you need to use an
embedded OSGI environment [1]. If your application does not use OSGI
it very complex and might not work at all.

Some time we tried to embed Apache Stanbol within the LMF (Linked
Media Framework). The code for this integration is still available at
[2]. So if you want give it a try this might help you.

But I highly recommend to not investing a lot of time into at, that
our experiences where not so great. Instead I would suggest to extend
Stanbol with the specific services you need and than calling those
services.

best
Rupert

[1] http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-embedding
[2] https://bitbucket.org/srfgkmt/stanbol-lmf

On Wed, Nov 5, 2014 at 9:04 AM, Dileepa Jayakody
<di...@gmail.com> wrote:
> Hi All,
>
> I have a requirement to embed Stanbol enhancer and entityhub in a Java
> application and call an enhancement chain via a Java API without doing
> remote calls. Any inputs on how to achieve this?
>
>
> Thanks,
> Dileepa



-- 
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                              ++43-699-11108907
| A-5500 Bischofshofen
| REDLINK.CO ..........................................................................
| http://redlink.co/