[Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-16 Thread Shameera Rathnayaka
 Im implementing a feature to map a custom context to Stratos applications,
 which is when a user hosts a service in private cloud, we provide a better
user-friendly url to that service, based on the username and the service
name, without exposing the actual long url. At anytime user should be able
to call that service using that user-friendly url.

So far i have written a carbontomcatvalve to forward http servlet request
and response to the real service mapping user-friendly url with actual
url(which is known as service EndPoint) stored in a static HashTable,

I'm implementing this feature for WSAS and then it will be extended to all
other Stratos applications.

Now i want to store the real endpoints with the user-friendly url which is
needed to be mapped with the context in future and i want some help for
this. Where is the best place to do that ? Currently im going through
service-mgt component source code


*Best Regards
~Shameera~*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-21 Thread Shameera Rathnayaka
*Best Regards
~Shameera~*



On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana wrote:

> On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka wrote:
>
>> yes exactly but it should be .as.stratosapps.com  then we can
>> identify this is for the appserver
>>
>
> There's no need to identify as appserver .. apps are only hosted on the
> appserver :). Its fine to make the assumption that *.stratosapps.com is
> for stuff on the appserver.
>
> The most scalable place to store the data persistently is in Cassandra. For
>>> the runtime representation its better to use the distributed cache so that
>>> all nodes have the data handy when you need it on any node.
>>>
>>>
>> Yes, as i only need to add name value pair and map a name with a value,
>> Cassandra is one of the best solutions. Data storing things happens
>>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
>> implement), when user hosting a service.
>>
>
> Please change this classname (or package name) - convention is wrong!
>

changed BE to org.wso2.carbon.url.mapper and FE to
org.wso2.carbon.url.mapper.ui

>
>
>> Updating an existing table and all mapping things happen inside this
>> component
>>
>
> OK.
>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
> 650 265 8311
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-09-06 Thread Muhammed Shariq
Hi Shameera,

Do we have the ability map custom contexts for apps deployed on Stratos? If
possible please point me out to how it could be done.

Thanks,
Shariq.

On Wed, Jun 22, 2011 at 10:31 AM, Shameera Rathnayaka wrote:

>
> *Best Regards
> ~Shameera~*
>
>
>
> On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana wrote:
>
>> On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka 
>> wrote:
>>
>>> yes exactly but it should be .as.stratosapps.com  then we can
>>> identify this is for the appserver
>>>
>>
>> There's no need to identify as appserver .. apps are only hosted on the
>> appserver :). Its fine to make the assumption that *.stratosapps.com is
>> for stuff on the appserver.
>>
>> The most scalable place to store the data persistently is in Cassandra.
 For the runtime representation its better to use the distributed cache so
 that all nodes have the data handy when you need it on any node.


>>> Yes, as i only need to add name value pair and map a name with a value,
>>> Cassandra is one of the best solutions. Data storing things happens
>>>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
>>> implement), when user hosting a service.
>>>
>>
>> Please change this classname (or package name) - convention is wrong!
>>
>
> changed BE to org.wso2.carbon.url.mapper and FE to
> org.wso2.carbon.url.mapper.ui
>
>>
>>
>>> Updating an existing table and all mapping things happen inside this
>>> component
>>>
>>
>> OK.
>>
>> Sanjiva.
>> --
>> Sanjiva Weerawarana, Ph.D.
>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
>> 650 265 8311
>> blog: http://sanjiva.weerawarana.org/
>>
>> Lean . Enterprise . Middleware
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-09-06 Thread Shameera Rathnayaka
Hi Shariq ,

On Tue, Sep 6, 2011 at 2:52 PM, Muhammed Shariq  wrote:

> Hi Shameera,
>
> Do we have the ability map custom contexts for apps deployed on Stratos? If
> possible please point me out to how it could be done
>

i tested on localhost , in that case it works( with some assumptions ) . For
this i added a CarbonTomcatValve to carbonTomcatContainer which check every
request going through tomcat, in there i checked the host part name if it is
ends with ".stratosapps.com" then it get the actual endpoint reference from
a db where i have stored data and forward to that endpoint.




> Thanks,
> Shariq.
>
>
> On Wed, Jun 22, 2011 at 10:31 AM, Shameera Rathnayaka 
> wrote:
>
>>
>> *Best Regards
>> ~Shameera~*
>>
>>
>>
>> On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana 
>> wrote:
>>
>>> On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka 
>>> wrote:
>>>
 yes exactly but it should be .as.stratosapps.com  then we can
 identify this is for the appserver

>>>
>>> There's no need to identify as appserver .. apps are only hosted on the
>>> appserver :). Its fine to make the assumption that *.stratosapps.com is
>>> for stuff on the appserver.
>>>
>>> The most scalable place to store the data persistently is in Cassandra.
> For the runtime representation its better to use the distributed cache so
> that all nodes have the data handy when you need it on any node.
>
>
 Yes, as i only need to add name value pair and map a name with a value,
 Cassandra is one of the best solutions. Data storing things happens
  in org.wso2.carbon.urlMapper BE (which is  a new component that to
 implement), when user hosting a service.

>>>
>>> Please change this classname (or package name) - convention is wrong!
>>>
>>
>> changed BE to org.wso2.carbon.url.mapper and FE to
>> org.wso2.carbon.url.mapper.ui
>>
>>>
>>>
 Updating an existing table and all mapping things happen inside this
 component

>>>
>>> OK.
>>>
>>> Sanjiva.
>>> --
>>> Sanjiva Weerawarana, Ph.D.
>>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>>> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 |
>>> +1 650 265 8311
>>> blog: http://sanjiva.weerawarana.org/
>>>
>>> Lean . Enterprise . Middleware
>>>
>>> ___
>>> Carbon-dev mailing list
>>> Carbon-dev@wso2.org
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-09-06 Thread Muhammed Shariq
On Tue, Sep 6, 2011 at 3:04 PM, Shameera Rathnayaka wrote:

> Hi Shariq ,
>
> On Tue, Sep 6, 2011 at 2:52 PM, Muhammed Shariq  wrote:
>
>> Hi Shameera,
>>
>> Do we have the ability map custom contexts for apps deployed on Stratos?
>> If possible please point me out to how it could be done
>>
>
> i tested on localhost , in that case it works( with some assumptions ) .
> For this i added a CarbonTomcatValve to carbonTomcatContainer which check
> every request going through tomcat, in there i checked the host part name if
> it is ends with ".stratosapps.com" then it get the actual endpoint
> reference from a db where i have stored data and forward to that endpoint.
>

OK thanks, so is these stuff committed and available with 3.2.0? And where
is db, its configurable?

Thanks!

>
>
>
>
>> Thanks,
>> Shariq.
>>
>>
>> On Wed, Jun 22, 2011 at 10:31 AM, Shameera Rathnayaka 
>> wrote:
>>
>>>
>>> *Best Regards
>>> ~Shameera~*
>>>
>>>
>>>
>>> On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana 
>>> wrote:
>>>
 On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka >>> > wrote:

> yes exactly but it should be .as.stratosapps.com  then we can
> identify this is for the appserver
>

 There's no need to identify as appserver .. apps are only hosted on the
 appserver :). Its fine to make the assumption that *.stratosapps.com is
 for stuff on the appserver.

 The most scalable place to store the data persistently is in Cassandra.
>> For the runtime representation its better to use the distributed cache so
>> that all nodes have the data handy when you need it on any node.
>>
>>
> Yes, as i only need to add name value pair and map a name with a value,
> Cassandra is one of the best solutions. Data storing things happens
>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
> implement), when user hosting a service.
>

 Please change this classname (or package name) - convention is wrong!

>>>
>>> changed BE to org.wso2.carbon.url.mapper and FE to
>>> org.wso2.carbon.url.mapper.ui
>>>


> Updating an existing table and all mapping things happen inside this
> component
>

 OK.

 Sanjiva.
 --
 Sanjiva Weerawarana, Ph.D.
 Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
 email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880| +1
 650 265 8311
 blog: http://sanjiva.weerawarana.org/

 Lean . Enterprise . Middleware

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


>>>
>>> ___
>>> Carbon-dev mailing list
>>> Carbon-dev@wso2.org
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-09-06 Thread Shameera Rathnayaka
On Tue, Sep 6, 2011 at 3:09 PM, Muhammed Shariq  wrote:

> On Tue, Sep 6, 2011 at 3:04 PM, Shameera Rathnayaka wrote:
>
>> Hi Shariq ,
>>
>> On Tue, Sep 6, 2011 at 2:52 PM, Muhammed Shariq  wrote:
>>
>>> Hi Shameera,
>>>
>>> Do we have the ability map custom contexts for apps deployed on Stratos?
>>> If possible please point me out to how it could be done
>>>
>>
>> i tested on localhost , in that case it works( with some assumptions ) .
>> For this i added a CarbonTomcatValve to carbonTomcatContainer which check
>> every request going through tomcat, in there i checked the host part name if
>> it is ends with ".stratosapps.com" then it get the actual endpoint
>> reference from a db where i have stored data and forward to that endpoint.
>>
>
> OK thanks, so is these stuff committed and available with 3.2.0? And where
> is db, its configurable?
>

not yet committed, i uses Cassandra as the DB, yes it can configurable

Best Regards
shameera

>
> Thanks!
>
>>
>>
>>
>>
>>> Thanks,
>>> Shariq.
>>>
>>>
>>> On Wed, Jun 22, 2011 at 10:31 AM, Shameera Rathnayaka >> > wrote:
>>>

 *Best Regards
 ~Shameera~*



 On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana >>> > wrote:

> On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka <
> shame...@wso2.com> wrote:
>
>> yes exactly but it should be .as.stratosapps.com  then we can
>> identify this is for the appserver
>>
>
> There's no need to identify as appserver .. apps are only hosted on the
> appserver :). Its fine to make the assumption that *.stratosapps.comis 
> for stuff on the appserver.
>
> The most scalable place to store the data persistently is in Cassandra.
>>> For the runtime representation its better to use the distributed cache 
>>> so
>>> that all nodes have the data handy when you need it on any node.
>>>
>>>
>> Yes, as i only need to add name value pair and map a name with a
>> value, Cassandra is one of the best solutions. Data storing things 
>> happens
>>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
>> implement), when user hosting a service.
>>
>
> Please change this classname (or package name) - convention is wrong!
>

 changed BE to org.wso2.carbon.url.mapper and FE to
 org.wso2.carbon.url.mapper.ui

>
>
>> Updating an existing table and all mapping things happen inside this
>> component
>>
>
> OK.
>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880| +1
> 650 265 8311
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


>>>
>>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-09-06 Thread Muhammed Shariq
On Tue, Sep 6, 2011 at 3:44 PM, Shameera Rathnayaka wrote:

>
>
> On Tue, Sep 6, 2011 at 3:09 PM, Muhammed Shariq  wrote:
>
>> On Tue, Sep 6, 2011 at 3:04 PM, Shameera Rathnayaka wrote:
>>
>>> Hi Shariq ,
>>>
>>> On Tue, Sep 6, 2011 at 2:52 PM, Muhammed Shariq  wrote:
>>>
 Hi Shameera,

 Do we have the ability map custom contexts for apps deployed on Stratos?
 If possible please point me out to how it could be done

>>>
>>> i tested on localhost , in that case it works( with some assumptions ) .
>>> For this i added a CarbonTomcatValve to carbonTomcatContainer which check
>>> every request going through tomcat, in there i checked the host part name if
>>> it is ends with ".stratosapps.com" then it get the actual endpoint
>>> reference from a db where i have stored data and forward to that endpoint.
>>>
>>
>> OK thanks, so is these stuff committed and available with 3.2.0? And where
>> is db, its configurable?
>>
>
> not yet committed, i uses Cassandra as the DB, yes it can configurable
>
Ok .. thanks!

>
> Best Regards
> shameera
>
>>
>> Thanks!
>>
>>>
>>>
>>>
>>>
 Thanks,
 Shariq.


 On Wed, Jun 22, 2011 at 10:31 AM, Shameera Rathnayaka <
 shame...@wso2.com> wrote:

>
> *Best Regards
> ~Shameera~*
>
>
>
> On Mon, Jun 20, 2011 at 10:28 PM, Sanjiva Weerawarana <
> sanj...@wso2.com> wrote:
>
>> On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka <
>> shame...@wso2.com> wrote:
>>
>>> yes exactly but it should be .as.stratosapps.com  then we can
>>> identify this is for the appserver
>>>
>>
>> There's no need to identify as appserver .. apps are only hosted on
>> the appserver :). Its fine to make the assumption that *.
>> stratosapps.com is for stuff on the appserver.
>>
>> The most scalable place to store the data persistently is in
 Cassandra. For the runtime representation its better to use the 
 distributed
 cache so that all nodes have the data handy when you need it on any 
 node.


>>> Yes, as i only need to add name value pair and map a name with a
>>> value, Cassandra is one of the best solutions. Data storing things 
>>> happens
>>>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
>>> implement), when user hosting a service.
>>>
>>
>> Please change this classname (or package name) - convention is wrong!
>>
>
> changed BE to org.wso2.carbon.url.mapper and FE to
> org.wso2.carbon.url.mapper.ui
>
>>
>>
>>> Updating an existing table and all mapping things happen inside this
>>> component
>>>
>>
>> OK.
>>
>> Sanjiva.
>> --
>> Sanjiva Weerawarana, Ph.D.
>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787
>> 6880 | +1 650 265 8311
>> blog: http://sanjiva.weerawarana.org/
>>
>> Lean . Enterprise . Middleware
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>

>>>
>>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-17 Thread Denis Weerasiri
On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka wrote:

>  Im implementing a feature to map a custom context to Stratos
> applications,  which is when a user hosts a service in private cloud, we
> provide a better user-friendly url to that service, based on the username
> and the service name, without exposing the actual long url. At anytime user
> should be able to call that service using that user-friendly url.
>
Useful feature btw.

>
> So far i have written a carbontomcatvalve to forward http servlet request
> and response to the real service mapping user-friendly url with actual
> url(which is known as service EndPoint) stored in a static HashTable,
>
Will it be scalable to use a read-write static hash table?

>
> I'm implementing this feature for WSAS and then it will be extended to all
> other Stratos applications.
>
> Now i want to store the real endpoints with the user-friendly url which is
> needed to be mapped with the context in future and i want some help for
> this. Where is the best place to do that ? Currently im going through
> service-mgt component source code
>
>
> *Best Regards
> ~Shameera~*
>
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Thanks,
Denis
--
*Denis Weerasiri*
Software Engineer; WSO2 Inc.; http://wso2.com,
*email: denis ** [AT] wso2.com* *
blog: **http://ddweerasiri.blogspot.com* *
twitter: **http://twitter.com/ddweerasiri* *
linked-in: 
**http://lk.linkedin.com/in/ddweerasiri*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-17 Thread Denis Weerasiri
On Sat, Jun 18, 2011 at 7:56 AM, Denis Weerasiri  wrote:

>
>
> On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka 
> wrote:
>
>>  Im implementing a feature to map a custom context to Stratos
>> applications,  which is when a user hosts a service in private cloud, we
>> provide a better user-friendly url to that service, based on the username
>> and the service name, without exposing the actual long url. At anytime user
>> should be able to call that service using that user-friendly url.
>>
> Useful feature btw.
>
>>
>> So far i have written a carbontomcatvalve to forward http servlet request
>> and response to the real service mapping user-friendly
>>
> Also won't this restrict your feature only to servlet transport? (I also
don't know about this.)

>  url with actual url(which is known as service EndPoint) stored in a static
>> HashTable,
>>
> Will it be scalable to use a read-write static hash table?
>
>>
>> I'm implementing this feature for WSAS and then it will be extended to all
>> other Stratos applications.
>>
>> Now i want to store the real endpoints with the user-friendly url which is
>> needed to be mapped with the context in future and i want some help for
>> this. Where is the best place to do that ? Currently im going through
>> service-mgt component source code
>>
>>
>> *Best Regards
>> ~Shameera~*
>>
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Thanks,
> Denis
> --
> *Denis Weerasiri*
> Software Engineer; WSO2 Inc.; http://wso2.com,
> *email: denis ** [AT] wso2.com* 
> *
> blog: **http://ddweerasiri.blogspot.com*
> *
> twitter: **http://twitter.com/ddweerasiri*
> *
> linked-in: 
> **http://lk.linkedin.com/in/ddweerasiri*
>
>


-- 
Thanks,
Denis
--
*Denis Weerasiri*
Software Engineer; WSO2 Inc.; http://wso2.com,
*email: denis ** [AT] wso2.com* *
blog: **http://ddweerasiri.blogspot.com* *
twitter: **http://twitter.com/ddweerasiri* *
linked-in: 
**http://lk.linkedin.com/in/ddweerasiri*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-17 Thread Sanjiva Weerawarana
Hi Shameera,

I assume you are talking about .stratosapps.com map to
appserver.stratoslive.wso2.com/t/tenant.com/app13 right? We also need to
allow users to define their own name and not just have it at .
stratosapps.com. Can you expand more on how this works and what exactly you
are storing where?

The most scalable place to store the data persistently is in Cassandra. For
the runtime representation its better to use the distributed cache so that
all nodes have the data handy when you need it on any node.

Thanks,

Sanjiva.

On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka wrote:

> Im implementing a feature to map a custom context to Stratos applications,
>  which is when a user hosts a service in private cloud, we provide a better
> user-friendly url to that service, based on the username and the service
> name, without exposing the actual long url. At anytime user should be able
> to call that service using that user-friendly url.
>
> So far i have written a carbontomcatvalve to forward http servlet request
> and response to the real service mapping user-friendly url with actual
> url(which is known as service EndPoint) stored in a static HashTable,
>
> I'm implementing this feature for WSAS and then it will be extended to all
> other Stratos applications.
>
> Now i want to store the real endpoints with the user-friendly url which is
> needed to be mapped with the context in future and i want some help for
> this. Where is the best place to do that ? Currently im going through
> service-mgt component source code
>
>
> *Best Regards
> ~Shameera~*
>
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
650 265 8311
blog: http://sanjiva.weerawarana.org/

Lean . Enterprise . Middleware
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-19 Thread Sameera Jayasoma
On Fri, Jun 17, 2011 at 7:58 PM, Sanjiva Weerawarana wrote:

> Hi Shameera,
>
> I assume you are talking about .stratosapps.com map to
> appserver.stratoslive.wso2.com/t/tenant.com/app13 right? We also need to
> allow users to define their own name and not just have it at .
> stratosapps.com. Can you expand more on how this works and what exactly
> you are storing where?
>
> The most scalable place to store the data persistently is in Cassandra. For
> the runtime representation its better to use the distributed cache so that
> all nodes have the data handy when you need it on any node.
>

+1,

Btw, IMO this routing functionality should be handled at the Load balancer
level. LB can fetch  data from the Cassendra storage and perform the proper
URL rewriting.

Thanks,
Sameera

>
> Thanks,
>
> Sanjiva.
>
> On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka 
> wrote:
>
>> Im implementing a feature to map a custom context to Stratos applications,
>>  which is when a user hosts a service in private cloud, we provide a better
>> user-friendly url to that service, based on the username and the service
>> name, without exposing the actual long url. At anytime user should be able
>> to call that service using that user-friendly url.
>>
>> So far i have written a carbontomcatvalve to forward http servlet request
>> and response to the real service mapping user-friendly url with actual
>> url(which is known as service EndPoint) stored in a static HashTable,
>>
>> I'm implementing this feature for WSAS and then it will be extended to all
>> other Stratos applications.
>>
>> Now i want to store the real endpoints with the user-friendly url which is
>> needed to be mapped with the context in future and i want some help for
>> this. Where is the best place to do that ? Currently im going through
>> service-mgt component source code
>>
>>
>> *Best Regards
>> ~Shameera~*
>>
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
> 650 265 8311
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Sameera Jayasoma
Technical Lead and Product Manager, WSO2 Carbon

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://tech.jayasoma.org

Lean . Enterprise . Middleware
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-19 Thread Shameera Rathnayaka
On Sat, Jun 18, 2011 at 7:56 AM, Denis Weerasiri  wrote:

>
>
> On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka 
> wrote:
>
>>  Im implementing a feature to map a custom context to Stratos
>> applications,  which is when a user hosts a service in private cloud, we
>> provide a better user-friendly url to that service, based on the username
>> and the service name, without exposing the actual long url. At anytime user
>> should be able to call that service using that user-friendly url.
>>
> Useful feature btw.
>
>>
>> So far i have written a carbontomcatvalve to forward http servlet request
>> and response to the real service mapping user-friendly url with actual
>> url(which is known as service EndPoint) stored in a static HashTable,
>>
> Will it be scalable to use a read-write static hash table?
>

yes static hash table is not a good solution but it is used only for testing
purpose

>
>> I'm implementing this feature for WSAS and then it will be extended to all
>> other Stratos applications.
>>
>> Now i want to store the real endpoints with the user-friendly url which is
>> needed to be mapped with the context in future and i want some help for
>> this. Where is the best place to do that ? Currently im going through
>> service-mgt component source code
>>
>>
>> *Best Regards
>> ~Shameera~*
>>
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Thanks,
> Denis
> --
> *Denis Weerasiri*
> Software Engineer; WSO2 Inc.; http://wso2.com,
> *email: denis ** [AT] wso2.com* 
> *
> blog: **http://ddweerasiri.blogspot.com*
> *
> twitter: **http://twitter.com/ddweerasiri*
> *
> linked-in: 
> **http://lk.linkedin.com/in/ddweerasiri*
>
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-20 Thread Shameera Rathnayaka
On Sat, Jun 18, 2011 at 8:28 AM, Sanjiva Weerawarana wrote:

> Hi Shameera,
>
> I assume you are talking about .stratosapps.com map to
> appserver.stratoslive.wso2.com/t/tenant.com/app13 right?
>

yes exactly but it should be .as.stratosapps.com  then we can identify
this is for the appserver

We also need to allow users to define their own name and not just have it at
> .stratosapps.com. Can you expand more on how this works and what
> exactly you are storing where?
>

let me do more classification about my task.
  When user  host a service in appserver in stratos we provide a short
handy end point .as.stratosapps.com with actual end points
appserver.stratoslive.wso2.com/t/tenant.com/app13, and foo can be any unique
name for the appserver it may be defined by user or an automaicaly generated
 name associate with the service name by the system

When an user hit .as.stratosapps.com it will redirect to the
appserver.stratoslive.wso2.com
and
then it will be forwarded to the
appserver.stratoslive.wso2.com/t/tenant.com/app13 inside  one of tomcat
valves which is written by me.

The most scalable place to store the data persistently is in Cassandra. For
> the runtime representation its better to use the distributed cache so that
> all nodes have the data handy when you need it on any node.
>
>
Yes, as i only need to add name value pair and map a name with a value,
Cassandra is one of the best solutions. Data storing things happens
 in org.wso2.carbon.urlMapper BE (which is  a new component that to
implement), when user hosting a service. Updating an existing table and all
mapping things happen inside this component


> Thanks,
>
> Sanjiva.
>
> On Fri, Jun 17, 2011 at 10:34 AM, Shameera Rathnayaka 
> wrote:
>
>> Im implementing a feature to map a custom context to Stratos applications,
>>  which is when a user hosts a service in private cloud, we provide a better
>> user-friendly url to that service, based on the username and the service
>> name, without exposing the actual long url. At anytime user should be able
>> to call that service using that user-friendly url.
>>
>> So far i have written a carbontomcatvalve to forward http servlet request
>> and response to the real service mapping user-friendly url with actual
>> url(which is known as service EndPoint) stored in a static HashTable,
>>
>> I'm implementing this feature for WSAS and then it will be extended to all
>> other Stratos applications.
>>
>> Now i want to store the real endpoints with the user-friendly url which is
>> needed to be mapped with the context in future and i want some help for
>> this. Where is the best place to do that ? Currently im going through
>> service-mgt component source code
>>
>>
>> *Best Regards
>> ~Shameera~*
>>
>>
>> ___
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
> 650 265 8311
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> ___
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Ability to map a custom context to Stratos applications.

2011-06-20 Thread Sanjiva Weerawarana
On Mon, Jun 20, 2011 at 1:47 PM, Shameera Rathnayaka wrote:

> yes exactly but it should be .as.stratosapps.com  then we can
> identify this is for the appserver
>

There's no need to identify as appserver .. apps are only hosted on the
appserver :). Its fine to make the assumption that *.stratosapps.com is for
stuff on the appserver.

The most scalable place to store the data persistently is in Cassandra. For
>> the runtime representation its better to use the distributed cache so that
>> all nodes have the data handy when you need it on any node.
>>
>>
> Yes, as i only need to add name value pair and map a name with a value,
> Cassandra is one of the best solutions. Data storing things happens
>  in org.wso2.carbon.urlMapper BE (which is  a new component that to
> implement), when user hosting a service.
>

Please change this classname (or package name) - convention is wrong!


> Updating an existing table and all mapping things happen inside this
> component
>

OK.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
650 265 8311
blog: http://sanjiva.weerawarana.org/

Lean . Enterprise . Middleware
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev