Restful objects performance (Clause#getValueOf)

2017-02-21 Thread Willie Loyd Tandingan
Hello!

We currently have a performance problem with RO in production environment
with one of our actions.

This action (SalesOrderRestMenu#filter) returns a list of view models
(SalesOrderView) and the client-side, an SPA, invokes this action accepting
simplified representation (Accept header set to
"application/json;profile=urn:org.apache.isis/v1;suppress=true"). When this
action returns around 601 items, it takes ~16 seconds on my development
machine to process. Profiling shows that Clause#getValueOf consumes 12
seconds of this CPU time needed to complete the request [1].

Any help on how to improve this is highly appreciated!

This is how the view model looks like:

@DomainObject(nature = Nature.INMEMORY_ENTITY)
public class SalesOrderView {

//region > constructors
public SalesOrderView() {
}

public SalesOrderView(final SalesOrder salesOrder) {
setSalesOrder(salesOrder);
}

public SalesOrderView(
final SalesOrder salesOrder,
final String wholesaler,
final String retailer,
final String courier,
final BigDecimal total) {
setSalesOrder(salesOrder);
setWholesaler(wholesaler);
setRetailer(retailer);
setCourier(courier);
setTotal(total);
}
//endregion

//region > salesOrder (property)
@Property(hidden = Where.EVERYWHERE)
@Getter @Setter
private SalesOrder salesOrder;
//endregion

//region > wholesaler (property)
@Getter @Setter
private String wholesaler;
//endregion

//region > retailer (property)
@Getter @Setter
private String retailer;
//endregion

//region > courier (property)
@Getter @Setter
private String courier;
//endregion

//region > total (property)
@Getter @Setter
private BigDecimal total;
//endregion

//region > derived properties
public String getId() {
return getSalesOrder().getId();
}

public String getSalesOrderNumber() {
return getSalesOrder().getSalesOrderNumber();
}

public LocalDate getOrderDate() {
return getSalesOrder().getOrderDate();
}

public LocalDate getShipmentDate() {
return getSalesOrder().getShipmentDate();
}

public LocalDate getDeliveryDate() {
return getSalesOrder().getDeliveryDate();
}

public Status getStatus() {
return getSalesOrder().getStatus();
}

public String getRemarks() {
return getSalesOrder().getRemarks();
}
//endregion

}


Best regards,
Willie


[1] http://imgur.com/a/NlDel


Re: Wizard-style user interface for when entering data for a new domain object

2017-02-21 Thread L Eder
Hi members:

Could anyone help me with this issue?
I am getting this error in Git Bash console, after ran the command
"mvn antrun:run -P self-host" and then clicked Start in the java
westart UI.
The build step was all ok.

Thanks in advance, eder

Error message:
“
[exec] Exception in thread "Thread-4"
java.util.ServiceConfigurationError:
javax.servlet.ServletContainerInitializer: Provider
org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
could not be instantiated
Then
Caused by: java.lang.NoClassDefFoundError: javax/websocket/DeploymentException
Then
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException
”


application's pom.xml:
"


http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;>
4.0.0

org.isisaddons.module.wizard
isis-module-wizard
0.0.1-SNAPSHOT

Isis Addons Wizard Module

pom


3.0.4



1.13.0-SNAPSHOT

1.13.0-SNAPSHOT
2.0.0

UTF-8

UTF-8




snapshots-repo
http://repository-estatio.forge.cloudbees.com/snapshot/

false


true








org.apache.maven.plugins
maven-enforcer-plugin
1.3.1



[3.0.5,)


[1.8.0,)


All plugin versions must be
defined!
true
true







validate-enforce
validate

enforce





org.apache.maven.plugins
maven-compiler-plugin
3.1

1.8
1.8
-parameters



source
compile


test
test-compile





org.apache.maven.plugins
maven-surefire-plugin
2.16


**/*Test.java
**/*Test$*.java
**/*Test_*.java
**/*Spec*.java


**/Test*.java
**/*ForTesting.java
**/*Abstract*.java

true
true

${project.build.directory}/surefire-reports




org.apache.maven.plugins
maven-surefire-report-plugin
2.16

false



test





maven-clean-plugin
2.5


maven-resources-plugin
2.6


maven-jar-plugin
2.4


maven-install-plugin
2.5.1


maven-deploy-plugin
2.8.1


maven-site-plugin
3.3


maven-war-plugin
2.4



org.mortbay.jetty
maven-jetty-plugin
6.1.26



org.apache.maven.plugins
maven-shade-plugin
2.2



  

Re: How can isis be made web scale

2017-02-21 Thread Dan Haywood
Hi Martin,
Do you know, does web.de use stateful or only stateless pages to hit those
volumes?

If only the latter then we can't infer too much from that because Isis
primarily uses stateful pages.

If the former, then do you know what size of web farm they run to get that
scale, and how do they manage http sessions?

Thx
Dan

On Tue, 21 Feb 2017, 17:33 james agada,  wrote:

> Hmm. The device infront of the keyboard is me ?
> So is the issue with scaling Isis the framework or is it Isis usage of
> Wicket?
>
> On Tue, Feb 21, 2017 at 6:16 PM, Martin Grigorov <
> martin.grigo...@gmail.com>
> wrote:
>
> > On Feb 21, 2017 7:09 PM, "james agada"  wrote:
> >
> > Thanks. My summary is
> >
> > 1. Major constraint is Wicket.
> >
> >
> > BULLSHIT!!!
> > Pardon my French!
> > The major constraint is the device in front of the keyboard!
> > web.de is built on Wicket and serves 18M+ users. 200-500K
> simultaneously!
> >
> >
> > 2. If you build your own view and interface to Isis, then you can scale
> DB
> > and app server as best.
> >
> > CQNZ claims to have an architecture that scales but it is not documented
> > anywhere.
> > It will be nice to have a mobile UI that can be as sophisticated as the
> > Wickets version and also available out of the box.
> > Many things to chew.
> >
> >
> > +1
> >
> >
> > On Mon, Feb 20, 2017 at 9:53 PM, Dan Haywood <
> d...@haywood-associates.co.uk
> > >
> > wrote:
> >
> > > Wicket is stateful (at least Apache Isis' use of it is), so I wouldn't
> > > classify this as web-scale; as Bilgin says you will need to develop a
> > > custom UI and use the REST API (Restful Objects viewer *is* stateless).
> > I
> > > believe that Cesar's application [1] takes this approach.
> > >
> > > Also as Bilgin says, the DB is therefore likely to be the biggest
> > > contention point.  RDBMS can of course scale a long way, so you don't
> > > necessarily need to go the NoSQL route, but if that did turn out to be
> > > necessary then DataNucleus does support other datastores such as Mongo.
> > My
> > > advice would be to build a performance test rig and do the stress
> testing
> > > up front so you can learn more about the relative performance
> > > characteristics.
> > >
> > > HTH
> > > Dan
> > >
> > > [1] http://isis.apache.org/powered-by.html#_powered-by_cqnz
> > >
> > >
> > >
> > > On Mon, 20 Feb 2017 at 12:58 Bilgin Ibryam  wrote:
> > >
> > > > Isis relies heavily on a DB which is accessed through JDO.
> > > > So if there is JDO storage that can scale as per your requirements
> the
> > > > rest of Isis could become web scale.
> > > >
> > > > If you find that Wicket is not web scale, you could create your own
> UI
> > > > and interact with Isis through its REST API.
> > > >
> > > > There is also a multi-tenancy plugin which is required quite often
> for
> > > > web-scale/SaaS use cases that might be useful too.
> > > >
> > > > HTH,
> > > >
> > > >
> > > >
> > > > On 20 February 2017 at 11:06, james agada 
> > wrote:
> > > > > Can Isis be scaled to handle web scale traffic - hundreds of
> > > thousands.l
> > > > of
> > > > > simultaneous users? What are the bottlenecks? What architectural
> > > patterns
> > > > > work? What data store should be considered?
> > > > > Rgds
> > > >
> > > >
> > > >
> > > > --
> > > > Bilgin Ibryam
> > > > Camel Committer at ASF & Integration Architect at Red Hat
> > > > Blog: http://ofbizian.com | Twitter: @bibryam
> > > >
> > > > Camel Design Patterns https://leanpub.com/camel-design-patterns
> > > > Instant Apache Camel Message Routing http://www.amazon.com/dp/
> > 1783283475
> > > >
> > >
> >
>


Re: How can isis be made web scale

2017-02-21 Thread james agada
Hmm. The device infront of the keyboard is me ?
So is the issue with scaling Isis the framework or is it Isis usage of
Wicket?

On Tue, Feb 21, 2017 at 6:16 PM, Martin Grigorov 
wrote:

> On Feb 21, 2017 7:09 PM, "james agada"  wrote:
>
> Thanks. My summary is
>
> 1. Major constraint is Wicket.
>
>
> BULLSHIT!!!
> Pardon my French!
> The major constraint is the device in front of the keyboard!
> web.de is built on Wicket and serves 18M+ users. 200-500K simultaneously!
>
>
> 2. If you build your own view and interface to Isis, then you can scale DB
> and app server as best.
>
> CQNZ claims to have an architecture that scales but it is not documented
> anywhere.
> It will be nice to have a mobile UI that can be as sophisticated as the
> Wickets version and also available out of the box.
> Many things to chew.
>
>
> +1
>
>
> On Mon, Feb 20, 2017 at 9:53 PM, Dan Haywood  >
> wrote:
>
> > Wicket is stateful (at least Apache Isis' use of it is), so I wouldn't
> > classify this as web-scale; as Bilgin says you will need to develop a
> > custom UI and use the REST API (Restful Objects viewer *is* stateless).
> I
> > believe that Cesar's application [1] takes this approach.
> >
> > Also as Bilgin says, the DB is therefore likely to be the biggest
> > contention point.  RDBMS can of course scale a long way, so you don't
> > necessarily need to go the NoSQL route, but if that did turn out to be
> > necessary then DataNucleus does support other datastores such as Mongo.
> My
> > advice would be to build a performance test rig and do the stress testing
> > up front so you can learn more about the relative performance
> > characteristics.
> >
> > HTH
> > Dan
> >
> > [1] http://isis.apache.org/powered-by.html#_powered-by_cqnz
> >
> >
> >
> > On Mon, 20 Feb 2017 at 12:58 Bilgin Ibryam  wrote:
> >
> > > Isis relies heavily on a DB which is accessed through JDO.
> > > So if there is JDO storage that can scale as per your requirements the
> > > rest of Isis could become web scale.
> > >
> > > If you find that Wicket is not web scale, you could create your own UI
> > > and interact with Isis through its REST API.
> > >
> > > There is also a multi-tenancy plugin which is required quite often for
> > > web-scale/SaaS use cases that might be useful too.
> > >
> > > HTH,
> > >
> > >
> > >
> > > On 20 February 2017 at 11:06, james agada 
> wrote:
> > > > Can Isis be scaled to handle web scale traffic - hundreds of
> > thousands.l
> > > of
> > > > simultaneous users? What are the bottlenecks? What architectural
> > patterns
> > > > work? What data store should be considered?
> > > > Rgds
> > >
> > >
> > >
> > > --
> > > Bilgin Ibryam
> > > Camel Committer at ASF & Integration Architect at Red Hat
> > > Blog: http://ofbizian.com | Twitter: @bibryam
> > >
> > > Camel Design Patterns https://leanpub.com/camel-design-patterns
> > > Instant Apache Camel Message Routing http://www.amazon.com/dp/
> 1783283475
> > >
> >
>


Re: How can isis be made web scale

2017-02-21 Thread Martin Grigorov
On Feb 21, 2017 7:09 PM, "james agada"  wrote:

Thanks. My summary is

1. Major constraint is Wicket.


BULLSHIT!!!
Pardon my French!
The major constraint is the device in front of the keyboard!
web.de is built on Wicket and serves 18M+ users. 200-500K simultaneously!


2. If you build your own view and interface to Isis, then you can scale DB
and app server as best.

CQNZ claims to have an architecture that scales but it is not documented
anywhere.
It will be nice to have a mobile UI that can be as sophisticated as the
Wickets version and also available out of the box.
Many things to chew.


+1


On Mon, Feb 20, 2017 at 9:53 PM, Dan Haywood 
wrote:

> Wicket is stateful (at least Apache Isis' use of it is), so I wouldn't
> classify this as web-scale; as Bilgin says you will need to develop a
> custom UI and use the REST API (Restful Objects viewer *is* stateless).  I
> believe that Cesar's application [1] takes this approach.
>
> Also as Bilgin says, the DB is therefore likely to be the biggest
> contention point.  RDBMS can of course scale a long way, so you don't
> necessarily need to go the NoSQL route, but if that did turn out to be
> necessary then DataNucleus does support other datastores such as Mongo.
My
> advice would be to build a performance test rig and do the stress testing
> up front so you can learn more about the relative performance
> characteristics.
>
> HTH
> Dan
>
> [1] http://isis.apache.org/powered-by.html#_powered-by_cqnz
>
>
>
> On Mon, 20 Feb 2017 at 12:58 Bilgin Ibryam  wrote:
>
> > Isis relies heavily on a DB which is accessed through JDO.
> > So if there is JDO storage that can scale as per your requirements the
> > rest of Isis could become web scale.
> >
> > If you find that Wicket is not web scale, you could create your own UI
> > and interact with Isis through its REST API.
> >
> > There is also a multi-tenancy plugin which is required quite often for
> > web-scale/SaaS use cases that might be useful too.
> >
> > HTH,
> >
> >
> >
> > On 20 February 2017 at 11:06, james agada  wrote:
> > > Can Isis be scaled to handle web scale traffic - hundreds of
> thousands.l
> > of
> > > simultaneous users? What are the bottlenecks? What architectural
> patterns
> > > work? What data store should be considered?
> > > Rgds
> >
> >
> >
> > --
> > Bilgin Ibryam
> > Camel Committer at ASF & Integration Architect at Red Hat
> > Blog: http://ofbizian.com | Twitter: @bibryam
> >
> > Camel Design Patterns https://leanpub.com/camel-design-patterns
> > Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475
> >
>


Re: How can isis be made web scale

2017-02-21 Thread james agada
Thanks. My summary is

1. Major constraint is Wicket.
2. If you build your own view and interface to Isis, then you can scale DB
and app server as best.

CQNZ claims to have an architecture that scales but it is not documented
anywhere.
It will be nice to have a mobile UI that can be as sophisticated as the
Wickets version and also available out of the box.
Many things to chew.

On Mon, Feb 20, 2017 at 9:53 PM, Dan Haywood 
wrote:

> Wicket is stateful (at least Apache Isis' use of it is), so I wouldn't
> classify this as web-scale; as Bilgin says you will need to develop a
> custom UI and use the REST API (Restful Objects viewer *is* stateless).  I
> believe that Cesar's application [1] takes this approach.
>
> Also as Bilgin says, the DB is therefore likely to be the biggest
> contention point.  RDBMS can of course scale a long way, so you don't
> necessarily need to go the NoSQL route, but if that did turn out to be
> necessary then DataNucleus does support other datastores such as Mongo.  My
> advice would be to build a performance test rig and do the stress testing
> up front so you can learn more about the relative performance
> characteristics.
>
> HTH
> Dan
>
> [1] http://isis.apache.org/powered-by.html#_powered-by_cqnz
>
>
>
> On Mon, 20 Feb 2017 at 12:58 Bilgin Ibryam  wrote:
>
> > Isis relies heavily on a DB which is accessed through JDO.
> > So if there is JDO storage that can scale as per your requirements the
> > rest of Isis could become web scale.
> >
> > If you find that Wicket is not web scale, you could create your own UI
> > and interact with Isis through its REST API.
> >
> > There is also a multi-tenancy plugin which is required quite often for
> > web-scale/SaaS use cases that might be useful too.
> >
> > HTH,
> >
> >
> >
> > On 20 February 2017 at 11:06, james agada  wrote:
> > > Can Isis be scaled to handle web scale traffic - hundreds of
> thousands.l
> > of
> > > simultaneous users? What are the bottlenecks? What architectural
> patterns
> > > work? What data store should be considered?
> > > Rgds
> >
> >
> >
> > --
> > Bilgin Ibryam
> > Camel Committer at ASF & Integration Architect at Red Hat
> > Blog: http://ofbizian.com | Twitter: @bibryam
> >
> > Camel Design Patterns https://leanpub.com/camel-design-patterns
> > Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475
> >
>


Re: Wizard-style user interface for when entering data for a new domain object

2017-02-21 Thread L Eder
Hi Erik:

i tried to build and run your demo app, however i am unable to launch
because of this runtime error:

“
[exec] Exception in thread "Thread-4"
java.util.ServiceConfigurationError:
javax.servlet.ServletContainerInitializer: Provider
org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
could not be instantiated
Then
Caused by: java.lang.NoClassDefFoundError: javax/websocket/DeploymentException
Then
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException
”

I even tried a tip - deleting of all javax.websocket*.jar files from
inside the simple.WAR file, but without success.

Do you have any other suggestion to fix this issue? Thanks,
Eder

Tip found here:
http://stackoverflow.com/questions/32202344/javax-servlet-servletexception-not-running-on-jetty-jsr-356-support-unavailabl/32207436


2017-02-20 20:00 GMT-04:00, Stephen Cameron :
> Previously the idea of an object builder object has been suggested, it
> would seem a simple approach that could work in each tab is a step.
>
> On Tuesday, February 21, 2017, L Eder  wrote:
>
>> Cool Erik, thanks for your time. I browsed your code and perceived your
>> alternate approach, not using the memento service. Just going to run both
>> approaches. Regards, Eder
>> On Feb 20, 2017 5:10 PM, "Erik de Hair" > >
>> wrote:
>>
>> > Hi Eder,
>> >
>> > I've created a demo app [1] to show my approach. It could probably be
>> more
>> > generic and I probably broke some Apache Isis module naming conventions
>> but
>> > i believe it's a good starting point.
>> >
>> > As I said in my previous post, this solution is based on the wicket
>> wizard
>> > module. I asked for some wizard functionality long ago. Dan created the
>> > module but I couldn't give him proper feedback at that moment :-/
>> >
>> > Right now I wasn't able to create my demo in the wicket-module because
>> > this module was built using Apache Isis 1.6 or so and I had to fix a
>> > lot
>> to
>> > get it working. In the mean time a lot has changed (like view models
>> > without memento's and XML lay outs) and I believe it would be much
>> > easier
>> > to make it more generic than before. If anyone is interested I could
>> > try
>> to
>> > 'merge' the 2 modules and make the wizard reusable.
>> >
>> > I didn't change the README but you should be able to run the app the
>> > same
>> > way as the other modules.
>> >
>> >
>> > Erik
>> >
>> > [1] https://github.com/erikdehair/isis-module-wizard
>> >
>> >
>> > On 02/20/2017 04:42 PM, Erik de Hair wrote:
>> >
>> >> Hi Eder,
>> >>
>> >> I've been using some concepts form the Apache Isis wizard add on [1]
>> >> and
>> >> added some things like a bread crumb. Also use layout-xml files for
>> >> the
>> >> pages and buttons instead of using the fixed buttons. Didn't have the
>> time
>> >> yet to share this. I will try to do that this week, so you can check
>> that
>> >> out.
>> >>
>> >> Erik
>> >>
>> >> [1] https://github.com/isisaddons/isis-wicket-wizard
>> >>
>> >> On 02/20/2017 03:59 PM, L Eder wrote:
>> >>
>> >>> Hi members:
>> >>> Anyone having a tip to share on how to build such a type of form?
>> >>>
>> >>> Idea is to have one form with Back and Next buttons, navigating
>> >>> through
>> >>> screens related to layout groups, say General, Details, Misc, etc.
>> >>>
>> >>> Regards, Eder
>> >>>
>> >>>
>> >>
>> >
>>
>