Hi all,
having more API to access and retrieve more information about tenants and
users is necessary, but it isn't enough.

For example, suppose you have to develop a simple servlet, you need to
retrieve tenant information from HttpServletContext or from HTTP header, I
don't know,
after that I have to access to stratos services in order to retrieve
information about tenants.



Matteo Cusmai


On Sat, Jun 14, 2014 at 7:47 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Sanjiva,
>
> Thank you very much for pointing this out. Yes I think I was not clear
> enough in my first response.
>
> What I meant was there are no restrictions in Stratos for writing
> Multi-Tenant applications using Stratos APIs or libraries (or more
> specifically Carbon). Developers could use any of the available
> technologies to implement Multi-Tenancy features in applications and create
> cartridges including the required libraries. However I forgot to mention
> that those applications could retrieve tenant information from the
> connected userstore or Stratos Manager since Stratos does manage tenants
> for all the services.
>
> Thanks Sameera for the details, but I think we might not be able to use
> some of the above APIs like Carbon Context and Carbon Caching if the
> application is not written using Carbon.
>
> I think from Stratos perspective if the application is not using Carbon
> still we could retrieve tenant information from four different channels:
>
>
>
> 1. Applications can directly communicate with the connected Userstore.
> 2. Applications can talk to the REST API and get tenant information.
> However I believe we have not exposed much methods to do this in 4.0.0
> release [1].
> 3. Applications can talk to Admin Services in Stratos Manager and retrieve
> tenant information. Since Stratos Manager is implemented using Carbon and
> uses Carbon user management features for managing tenants, these services
> could provide all the information required.
> 4. Applications can retrieve tenant information from the tenant topic in
> message broker, however we have limited information here at the moment [2].
>
> If the application is written using Carbon, except for above four channels
> it could retrieve more information from the Carbon runtime. WDYT?
>
> [1]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Tenant+Operations
> [2]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Stratos+Pub-Sub+Communication
>
> Thanks
> Imesh
>
>
> On Sat, Jun 14, 2014 at 8:21 AM, Sameera Jayasoma <
> sameera.madus...@gmail.com> wrote:
>
>> Noted Sanjiva. I will include slides on Stratos APIs, specially user
>> management, registry/repository, CarbonContext API, Caching, Clustering API
>> etc.
>>
>>
>> Matteo, you can leverage a bunch Stratos level APIs to build your
>> multi-tenant SaaS app. Here are some the available APIs. Let us know your
>> requirements.
>>
>> Identity and Security API  -  Manage users, roles, permission,
>> authentication and authorization functionalities
>> Registry/Repository API -  crud api for repository.
>> Caching API - Java caching API
>> CarbonContext API  - CarbonContext is the entity which provides the
>> runtime related contextual information of the current executing thread. Any
>> code running in Stratos can retrieve following information from the
>> CarbonContext API.
>>
>> 1) Tenant information who is executing the code.
>> 2) Logged in user information, if any.
>> 3) Application information, if any.
>>
>> Thanks,
>> Sameera.
>>
>>
>> On Sat, Jun 14, 2014 at 7:38 AM, Sanjiva Weerawarana <sanj...@wso2.com>
>> wrote:
>>
>>> Imesh IMO your answer is not correct :-). Stratos has a set of APIs that
>>> allows a super tenant app to be an multi-tenant SaaS app - for example the
>>> admin app is written like that. What Matteo is asking is how to use Stratos
>>> as the foundation of a SaaS application!
>>>
>>> Sameera you're giving a talk on this at WSO2Con next week in Barcelona
>>> :-). Maybe you can answer and then share the slides after.
>>>
>>> Cheers,
>>>
>>> Sanjiva.
>>>
>>>
>>> On Thu, Jun 12, 2014 at 8:13 PM, Matteo Cusmai <cusmaimat...@gmail.com>
>>> wrote:
>>>
>>>> Hi Imesh,
>>>> thanks a lot for the answer and for the useful links.
>>>>
>>>> However, I know a bit WSO2 and I know it provides useful capabilities
>>>> to develop a multi tenant application.
>>>> But suppose that I cannot use it, how can I retrieve tenant information
>>>> from my java code?
>>>>
>>>>
>>>> Matteo Cusmai
>>>>
>>>>
>>>> On Thu, Jun 12, 2014 at 4:38 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Matteo,
>>>>>
>>>>> According to Stratos architecture there are no requirements for using
>>>>> certain APIs/libraries for developing applications. It's completely 
>>>>> loosely
>>>>> coupled. Applications can be developed according to the requirements of 
>>>>> the
>>>>> cartridge they run on.
>>>>>
>>>>> If you are looking at developing a Multi-Tenant application, AFAIK
>>>>> Tomcat does not provide Multi-Tenancy features out of the box. However you
>>>>> could use Carbon framework [1] for that. Yes I could see JBoss/Hibernate
>>>>> also provide Multi-Tenancy features [2].
>>>>>
>>>>> [1]
>>>>> http://wso2.com/library/blog-post/2013/09/creating-a-saas-app-with-the-multi-tenant-carbon-framework-step-1/
>>>>> [2] https://community.jboss.org/wiki/Multi-tenancyDesign
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> On Thu, Jun 12, 2014 at 11:33 AM, Matteo Cusmai <
>>>>> cusmaimat...@gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>> I am going to develop a java saas application, and I would like to
>>>>>> use stratos with tomcat, or jboss after have developed a jboss cartdrige.
>>>>>>
>>>>>> Which are the java api/lib that I have to use in order to develop a
>>>>>> multi tenant application?
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Matteo.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PPMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Sanjiva Weerawarana, Ph.D.
>>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>>> email: sanj...@wso2.com; office: (+1 650 745 4499 | +94  11 214 5345)
>>> x5700; cell: +94 77 787 6880 | +1 408 466 5099; voip: +1 650 265 8311
>>> blog: http://sanjiva.weerawarana.org/; twitter: @sanjiva
>>> Lean . Enterprise . Middleware
>>>
>>
>>
>>
>> --
>> Sameera Jayasoma
>>
>> blog: https://blog.sameera.org
>> twitter: https://twitter.com/sameerajayasoma
>> flickr: http://www.flickr.com/photos/sameera-jayasoma/
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos
>

Reply via email to