[infinispan-dev] Comments on tutorials etc.

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Comments on tutorials etc.

Pete Muir
As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts

1) http://www.jboss.org/infinispan/downloads.html

One thing that is always annoying is having to configure the jboss repo. I suggest adding this snippet to the above page for people to copy, which can be pasted into either the pom, or into settings.xml, and is self contained.

   <profiles>
      <profile>
         <id>jboss-public-repository</id>
         <activation>
            <property>
               <name>jboss-public-repository</name>
               <value>!false</value>
            </property>
         </activation>
         <repositories>
            <repository>
               <id>jboss-public-repository-group</id>
               <name>JBoss Public Maven Repository Group</name>
               <url>http://repository.jboss.org/nexus/content/groups/public</url>
               <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </repository>
         </repositories>
         <pluginRepositories>
            <pluginRepository>
               <id>jboss-public-repository-group</id>
               <name>JBoss Public Maven Repository Group</name>
               <url>http://repository.jboss.org/nexus/content/groups/public</url>
               <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </releases>
               <snapshots>
                  <enabled>false</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>
      </profile>

   </profiles>

2) http://www.jboss.org/infinispan/downloads.html

Suggest adding two code snippet for the dependency too:

a)
    <properties>
      <infinispan.version>X.Y.Z.Q</infinispan.version>
   </properties>

b)
   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-core</artifactId>
         <version>${infinispan.version}</version>
      </dependency>
   </dependencies>

3) http://community.jboss.org/wiki/5minutetutorialonInfinispan

Cache cache = manager.getCache();

I get a warning with this line in Eclipse, as Cache should be a parameterized type. Doesn't break stuff, but doesn't look good that we advise people to write incorrect code.

4) http://community.jboss.org/wiki/5minutetutorialonInfinispan

To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)

5) http://community.jboss.org/wiki/5minutetutorialonInfinispan

For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.

6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral

7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:

$> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/

etc.

8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating

9) http://community.jboss.org/wiki/Infinispaninteractivetutorial

When doing the below line, I get an error:

And now, create a cache manager indicating the file with the cache definitions.
groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
)
===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
null

oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
ERROR java.io.IOException:
null
        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
        at groovysh_evaluate.run (groovysh_evaluate:4)

and I don't know how to get past it, so I stopped this tutorial here.

10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

Could do with some comments explaining what each line is doing, some of the code isn't self describing

e.g.

what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?

11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

It might be neat to split up input and output e.g. into different snippets - make it easier to read

12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs

13) http://community.jboss.org/wiki/SettingupanInfinispanCluster

When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.

14) http://community.jboss.org/wiki/SettingupanInfinispanCluster

The CacheManager is deprecated, I guess these needs updating to 4.2 API?

15) http://community.jboss.org/wiki/SettingupanInfinispanCluster

I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Manik Surtani
Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?

Galder, could you pls help with the Scala-related points?

Cheers
Manik


On 18 Jan 2011, at 16:17, Pete Muir wrote:

As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts

1) http://www.jboss.org/infinispan/downloads.html

+1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.

2) http://www.jboss.org/infinispan/downloads.html

Suggest adding two code snippet for the dependency too:

+1 again.  This info is already up there, but +1 for easy to copy snippets.


Cache cache = manager.getCache();

There were issues with angle brackets on the wiki system, this may have been fixed now.  

4) http://community.jboss.org/wiki/5minutetutorialonInfinispan

To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)

5) http://community.jboss.org/wiki/5minutetutorialonInfinispan

For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.

6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral

7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:

$> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/

etc.

8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment

The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating

9) http://community.jboss.org/wiki/Infinispaninteractivetutorial

When doing the below line, I get an error:

And now, create a cache manager indicating the file with the cache definitions.
groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
)
===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
null

oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
ERROR java.io.IOException:
null
       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
       at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
       at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
       at groovysh_evaluate.run (groovysh_evaluate:4)

and I don't know how to get past it, so I stopped this tutorial here.

Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?

10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

Could do with some comments explaining what each line is doing, some of the code isn't self describing

e.g.

what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?


Galder, care to look into this one?

11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

It might be neat to split up input and output e.g. into different snippets - make it easier to read

12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs

Galder, this as well?

13) http://community.jboss.org/wiki/SettingupanInfinispanCluster

When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.

It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.


14) http://community.jboss.org/wiki/SettingupanInfinispanCluster

The CacheManager is deprecated, I guess these needs updating to 4.2 API?

Yes.


15) http://community.jboss.org/wiki/SettingupanInfinispanCluster

I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete

Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?

Cheers
Manik


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Pete Muir
Yep, will apply all this if you are happy. Most of it is just stuff that could be a little better, not real problems ;-)

Do you guys track errors in docs in JIRA? If so, I will file an issue for the Groovy one.


On 18 Jan 2011, at 17:51, Manik Surtani wrote:

> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>
> Galder, could you pls help with the Scala-related points?
>
> Cheers
> Manik
>
>
> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>
>> As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
>>
>> 1) http://www.jboss.org/infinispan/downloads.html
>
> +1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.
>
>> 2) http://www.jboss.org/infinispan/downloads.html
>>
>> Suggest adding two code snippet for the dependency too:
>
> +1 again.  This info is already up there, but +1 for easy to copy snippets.
>
>> 3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> Cache cache = manager.getCache();
>
> There were issues with angle brackets on the wiki system, this may have been fixed now.  
>>
>> 4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
>
>> 5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
>>
>> 6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
>>
>> 7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
>>
>> $> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
>>
>> etc.
>>
>> 8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
>>
>> 9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
>>
>> When doing the below line, I get an error:
>>
>> And now, create a cache manager indicating the file with the cache definitions.
>> groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
>> )
>> ===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
>> null
>>
>> oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
>> ERROR java.io.IOException:
>> null
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
>>        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
>>        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
>>        at groovysh_evaluate.run (groovysh_evaluate:4)
>>
>> and I don't know how to get past it, so I stopped this tutorial here.
>
> Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?
>
>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>
>> e.g.
>>
>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>
>
> Galder, care to look into this one?
>
>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>>
>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>
> Galder, this as well?
>
>> 13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
>
> It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.
>
>
>> 14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> The CacheManager is deprecated, I guess these needs updating to 4.2 API?
>
> Yes.
>
>>
>> 15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
>
> Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?
>
> Cheers
> Manik
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Galder Zamarreno
In reply to this post by Manik Surtani

On Jan 18, 2011, at 6:51 PM, Manik Surtani wrote:

> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>
> Galder, could you pls help with the Scala-related points?

Sure :) - see below for comments:

>
> Cheers
> Manik
>
>
> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>
>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>
>> e.g.
>>
>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>
>
> Galder, care to look into this one?

In fairness, to do that tutorial you should know a bit of Scala. In fact, to be perfectly honest, I don't see much point of doing that tutorial if you cannot understand that line! FYI, that's the same as the following java code:

Cache<String, String> defaultCache = manager.getCache();

I'll still add the comments though.

>
>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> It might be neat to split up input and output e.g. into different snippets - make it easier to read

+1, with separate comments for each.

>>
>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>
> Galder, this as well?

I'll check it out.

>
> Cheers
> Manik
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Manik Surtani
In reply to this post by Pete Muir
On 18 Jan 2011, at 20:56, Pete Muir wrote:

> Do you guys track errors in docs in JIRA? If so, I will file an issue for the Groovy one.

Yes, create it as a Task under the Demos and Tutorials component.

Thx
Manik

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Pete Muir
In reply to this post by Galder Zamarreno

On 19 Jan 2011, at 09:31, Galder Zamarreño wrote:

>
> On Jan 18, 2011, at 6:51 PM, Manik Surtani wrote:
>
>> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>>
>> Galder, could you pls help with the Scala-related points?
>
> Sure :) - see below for comments:
>
>>
>> Cheers
>> Manik
>>
>>
>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>
>>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>>
>>> e.g.
>>>
>>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>>
>>
>> Galder, care to look into this one?
>
> In fairness, to do that tutorial you should know a bit of Scala. In fact, to be perfectly honest, I don't see much point of doing that tutorial if you cannot understand that line! FYI, that's the same as the following java code:
>
> Cache<String, String> defaultCache = manager.getCache();
>
> I'll still add the comments though.

Really, I meant more relating to Infinispan than Scala. The only explanation for that section is "Basic cache configuration" when it could be

"In this example we first get the default cache from Infinispan, put a "aKey" into it, and then check it has been stored. Finally, we remove it, and check that the cache is now empty."

I know this seems trivial, but it can make it much easier for someone getting started - repeating the same info in different ways is very useful ;-)

>
>>
>>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>
> +1, with separate comments for each.
>
>>>
>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>>
>> Galder, this as well?
>
> I'll check it out.
>
>>
>> Cheers
>> Manik
>> --
>> Manik Surtani
>> [hidden email]
>> twitter.com/maniksurtani
>>
>> Lead, Infinispan
>> http://www.infinispan.org
>>
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Galder Zamarreno
In reply to this post by Galder Zamarreno

On Jan 19, 2011, at 10:31 AM, Galder Zamarreño wrote:

> On Jan 18, 2011, at 6:51 PM, Manik Surtani wrote:
>
>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>>
>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>>
>> Galder, this as well?
>
> I'll check it out.

I created https://issues.jboss.org/browse/ISPN-882 - This behaviour is like this since since we accepted (Mircea?) the following community bug report: https://issues.jboss.org/browse/ISPN-679

Can we get an agreement on this? I think it should work as it did originally.

Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Mircea Markus

On 19 Jan 2011, at 15:11, Galder Zamarreño wrote:


On Jan 19, 2011, at 10:31 AM, Galder Zamarreño wrote:

On Jan 18, 2011, at 6:51 PM, Manik Surtani wrote:

On 18 Jan 2011, at 16:17, Pete Muir wrote:

12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala

For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
which cache operation?
I imagine the size only increments within the transaction context? i.e. if you suspend the uncommitted transaction and run the same operation again, you don't see transaction's modifications.  

Galder, this as well?

I'll check it out.

I created https://issues.jboss.org/browse/ISPN-882 - This behaviour is like this since since we accepted (Mircea?) the following community bug report: https://issues.jboss.org/browse/ISPN-679

Can we get an agreement on this? I think it should work as it did originally.
You mean cache.values()? should not be tx aware? I think it should be consistent with all the other ops, like put, get etc. (which are tx aware).



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Galder Zamarreno

On Jan 19, 2011, at 4:23 PM, Mircea Markus wrote:

>
> On 19 Jan 2011, at 15:11, Galder Zamarreño wrote:
>
>>
>> On Jan 19, 2011, at 10:31 AM, Galder Zamarreño wrote:
>>
>>> On Jan 18, 2011, at 6:51 PM, Manik Surtani wrote:
>>>
>>>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>>>>
>>>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>>
>>>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
> which cache operation?
> I imagine the size only increments within the transaction context? i.e. if you suspend the uncommitted transaction and run the same operation again, you don't see transaction's modifications.  

Right, so you're saying that a transaction should see its own changes even if they're uncommitted, correct? If so yeah, it should work as is and wiki needs modifying.

>>>>
>>>> Galder, this as well?
>>>
>>> I'll check it out.
>>
>> I created https://issues.jboss.org/browse/ISPN-882 - This behaviour is like this since since we accepted (Mircea?) the following community bug report: https://issues.jboss.org/browse/ISPN-679
>>
>> Can we get an agreement on this? I think it should work as it did originally.
> You mean cache.values()? should not be tx aware? I think it should be consistent with all the other ops, like put, get etc. (which are tx aware).
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Mircea Markus
>> which cache operation?
>> I imagine the size only increments within the transaction context? i.e. if you suspend the uncommitted transaction and run the same operation again, you don't see transaction's modifications.  
>
> Right, so you're saying that a transaction should see its own changes even if they're uncommitted, correct? If so yeah, it should work as is and wiki needs modifying.
yes, exactly.
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Pete Muir
In reply to this post by Manik Surtani
Galder and I have applied all these changes. I added http://community.jboss.org/wiki/SettingupanInfinispanCluster#43_A_complete_example to handle (15). Would appreciate review by a more experienced person to make sure I have got it right!

Pete

On 18 Jan 2011, at 17:51, Manik Surtani wrote:

> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>
> Galder, could you pls help with the Scala-related points?
>
> Cheers
> Manik
>
>
> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>
>> As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
>>
>> 1) http://www.jboss.org/infinispan/downloads.html
>
> +1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.
>
>> 2) http://www.jboss.org/infinispan/downloads.html
>>
>> Suggest adding two code snippet for the dependency too:
>
> +1 again.  This info is already up there, but +1 for easy to copy snippets.
>
>> 3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> Cache cache = manager.getCache();
>
> There were issues with angle brackets on the wiki system, this may have been fixed now.  
>>
>> 4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
>
>> 5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>
>> For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
>>
>> 6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
>>
>> 7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
>>
>> $> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
>>
>> etc.
>>
>> 8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>
>> The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
>>
>> 9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
>>
>> When doing the below line, I get an error:
>>
>> And now, create a cache manager indicating the file with the cache definitions.
>> groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
>> )
>> ===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
>> null
>>
>> oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
>> ERROR java.io.IOException:
>> null
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
>>        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
>>        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
>>        at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
>>        at groovysh_evaluate.run (groovysh_evaluate:4)
>>
>> and I don't know how to get past it, so I stopped this tutorial here.
>
> Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?
>
>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>
>> e.g.
>>
>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>
>
> Galder, care to look into this one?
>
>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>>
>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>
>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>
> Galder, this as well?
>
>> 13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
>
> It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.
>
>
>> 14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> The CacheManager is deprecated, I guess these needs updating to 4.2 API?
>
> Yes.
>
>>
>> 15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>
>> I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
>
> Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?
>
> Cheers
> Manik
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Galder Zamarreno
Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.

Btw, interesting concept the one of using dependency:copy-dependencies, I hadn't realised of its potential. What do you use -DstripVersion for? To remove version from dependencies being copied?

On Jan 24, 2011, at 8:29 PM, Pete Muir wrote:

> Galder and I have applied all these changes. I added http://community.jboss.org/wiki/SettingupanInfinispanCluster#43_A_complete_example to handle (15). Would appreciate review by a more experienced person to make sure I have got it right!
>
> Pete
>
> On 18 Jan 2011, at 17:51, Manik Surtani wrote:
>
>> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>>
>> Galder, could you pls help with the Scala-related points?
>>
>> Cheers
>> Manik
>>
>>
>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>
>>> As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
>>>
>>> 1) http://www.jboss.org/infinispan/downloads.html
>>
>> +1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.
>>
>>> 2) http://www.jboss.org/infinispan/downloads.html
>>>
>>> Suggest adding two code snippet for the dependency too:
>>
>> +1 again.  This info is already up there, but +1 for easy to copy snippets.
>>
>>> 3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>
>>> Cache cache = manager.getCache();
>>
>> There were issues with angle brackets on the wiki system, this may have been fixed now.  
>>>
>>> 4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>
>>> To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
>>
>>> 5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>
>>> For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
>>>
>>> 6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>
>>> This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
>>>
>>> 7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>
>>> Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
>>>
>>> $> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
>>>
>>> etc.
>>>
>>> 8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>
>>> The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
>>>
>>> 9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
>>>
>>> When doing the below line, I get an error:
>>>
>>> And now, create a cache manager indicating the file with the cache definitions.
>>> groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
>>> )
>>> ===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
>>> null
>>>
>>> oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
>>> ERROR java.io.IOException:
>>> null
>>>       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
>>>       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
>>>       at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
>>>       at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
>>>       at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
>>>       at groovysh_evaluate.run (groovysh_evaluate:4)
>>>
>>> and I don't know how to get past it, so I stopped this tutorial here.
>>
>> Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?
>>
>>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>>
>>> e.g.
>>>
>>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>>
>>
>> Galder, care to look into this one?
>>
>>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>>>
>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>
>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>>
>> Galder, this as well?
>>
>>> 13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>
>>> When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
>>
>> It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.
>>
>>
>>> 14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>
>>> The CacheManager is deprecated, I guess these needs updating to 4.2 API?
>>
>> Yes.
>>
>>>
>>> 15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>
>>> I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
>>
>> Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?
>>
>> Cheers
>> Manik
>> --
>> Manik Surtani
>> [hidden email]
>> twitter.com/maniksurtani
>>
>> Lead, Infinispan
>> http://www.infinispan.org
>>
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Pete Muir

On 25 Jan 2011, at 11:09, Galder Zamarreño wrote:

> Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.

Ok, I will look at that.

> Btw, interesting concept the one of using dependency:copy-dependencies, I hadn't realised of its potential. What do you use -DstripVersion for? To remove version from dependencies being copied?

Yes, it means you just end up with e.g. target/dependency/infinispan-core.jar -- actually probably not really needed in this case, originally I was building the classpath from jar files, and not with a wildcard.

>
> On Jan 24, 2011, at 8:29 PM, Pete Muir wrote:
>
>> Galder and I have applied all these changes. I added http://community.jboss.org/wiki/SettingupanInfinispanCluster#43_A_complete_example to handle (15). Would appreciate review by a more experienced person to make sure I have got it right!
>>
>> Pete
>>
>> On 18 Jan 2011, at 17:51, Manik Surtani wrote:
>>
>>> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>>>
>>> Galder, could you pls help with the Scala-related points?
>>>
>>> Cheers
>>> Manik
>>>
>>>
>>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>>
>>>> As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
>>>>
>>>> 1) http://www.jboss.org/infinispan/downloads.html
>>>
>>> +1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.
>>>
>>>> 2) http://www.jboss.org/infinispan/downloads.html
>>>>
>>>> Suggest adding two code snippet for the dependency too:
>>>
>>> +1 again.  This info is already up there, but +1 for easy to copy snippets.
>>>
>>>> 3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>
>>>> Cache cache = manager.getCache();
>>>
>>> There were issues with angle brackets on the wiki system, this may have been fixed now.  
>>>>
>>>> 4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>
>>>> To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
>>>
>>>> 5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>
>>>> For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
>>>>
>>>> 6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>
>>>> This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
>>>>
>>>> 7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>
>>>> Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
>>>>
>>>> $> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
>>>>
>>>> etc.
>>>>
>>>> 8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>
>>>> The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
>>>>
>>>> 9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
>>>>
>>>> When doing the below line, I get an error:
>>>>
>>>> And now, create a cache manager indicating the file with the cache definitions.
>>>> groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
>>>> )
>>>> ===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
>>>> null
>>>>
>>>> oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
>>>> ERROR java.io.IOException:
>>>> null
>>>>      at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
>>>>      at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
>>>>      at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
>>>>      at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
>>>>      at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
>>>>      at groovysh_evaluate.run (groovysh_evaluate:4)
>>>>
>>>> and I don't know how to get past it, so I stopped this tutorial here.
>>>
>>> Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?
>>>
>>>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>
>>>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>>>
>>>> e.g.
>>>>
>>>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>>>
>>>
>>> Galder, care to look into this one?
>>>
>>>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>
>>>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>>>>
>>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>
>>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>>>
>>> Galder, this as well?
>>>
>>>> 13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>
>>>> When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
>>>
>>> It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.
>>>
>>>
>>>> 14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>
>>>> The CacheManager is deprecated, I guess these needs updating to 4.2 API?
>>>
>>> Yes.
>>>
>>>>
>>>> 15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>
>>>> I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
>>>
>>> Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?
>>>
>>> Cheers
>>> Manik
>>> --
>>> Manik Surtani
>>> [hidden email]
>>> twitter.com/maniksurtani
>>>
>>> Lead, Infinispan
>>> http://www.infinispan.org
>>>
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Mircea Markus

On 25 Jan 2011, at 11:33, Pete Muir wrote:


On 25 Jan 2011, at 11:09, Galder Zamarreño wrote:

Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.
Here is the code:
https://github.com/radargun/radargun/blob/master/framework/src/main/java/org/radargun/stages/ClusterValidationStage.java


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Galder Zamarreno
In reply to this post by Pete Muir

On Jan 25, 2011, at 12:33 PM, Pete Muir wrote:

>
> On 25 Jan 2011, at 11:09, Galder Zamarreño wrote:
>
>> Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.
>
> Ok, I will look at that.
>
>> Btw, interesting concept the one of using dependency:copy-dependencies, I hadn't realised of its potential. What do you use -DstripVersion for? To remove version from dependencies being copied?
>
> Yes, it means you just end up with e.g. target/dependency/infinispan-core.jar -- actually probably not really needed in this case, originally I was building the classpath from jar files, and not with a wildcard.

That's what I thought :) - with the wildcard you don't care whether version numbers are there.

>
>>
>> On Jan 24, 2011, at 8:29 PM, Pete Muir wrote:
>>
>>> Galder and I have applied all these changes. I added http://community.jboss.org/wiki/SettingupanInfinispanCluster#43_A_complete_example to handle (15). Would appreciate review by a more experienced person to make sure I have got it right!
>>>
>>> Pete
>>>
>>> On 18 Jan 2011, at 17:51, Manik Surtani wrote:
>>>
>>>> Great feedback, Pete.  +1 to all suggestions here, I've added a few more notes inline with some of the points below.  Feel like making the changes you've suggested?
>>>>
>>>> Galder, could you pls help with the Scala-related points?
>>>>
>>>> Cheers
>>>> Manik
>>>>
>>>>
>>>> On 18 Jan 2011, at 16:17, Pete Muir wrote:
>>>>
>>>>> As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
>>>>>
>>>>> 1) http://www.jboss.org/infinispan/downloads.html
>>>>
>>>> +1, along with links to the Infinispan Maven wiki pages for more detailed info.  But definitely +1 for a quick-access copy-and-paste snippet.
>>>>
>>>>> 2) http://www.jboss.org/infinispan/downloads.html
>>>>>
>>>>> Suggest adding two code snippet for the dependency too:
>>>>
>>>> +1 again.  This info is already up there, but +1 for easy to copy snippets.
>>>>
>>>>> 3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>>
>>>>> Cache cache = manager.getCache();
>>>>
>>>> There were issues with angle brackets on the wiki system, this may have been fixed now.  
>>>>>
>>>>> 4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>>
>>>>> To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
>>>>
>>>>> 5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
>>>>>
>>>>> For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
>>>>>
>>>>> 6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>>
>>>>> This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
>>>>>
>>>>> 7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>>
>>>>> Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
>>>>>
>>>>> $> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
>>>>>
>>>>> etc.
>>>>>
>>>>> 8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
>>>>>
>>>>> The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
>>>>>
>>>>> 9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
>>>>>
>>>>> When doing the below line, I get an error:
>>>>>
>>>>> And now, create a cache manager indicating the file with the cache definitions.
>>>>> groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
>>>>> )
>>>>> ===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
>>>>> null
>>>>>
>>>>> oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
>>>>> ERROR java.io.IOException:
>>>>> null
>>>>>     at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
>>>>>     at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
>>>>>     at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
>>>>>     at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
>>>>>     at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
>>>>>     at groovysh_evaluate.run (groovysh_evaluate:4)
>>>>>
>>>>> and I don't know how to get past it, so I stopped this tutorial here.
>>>>
>>>> Hmm, could be a missing schema?  Did you enable log4j TRACE level logging to see what was going on?
>>>>
>>>>> 10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>>
>>>>> Could do with some comments explaining what each line is doing, some of the code isn't self describing
>>>>>
>>>>> e.g.
>>>>>
>>>>> what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
>>>>>
>>>>
>>>> Galder, care to look into this one?
>>>>
>>>>> 11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>>
>>>>> It might be neat to split up input and output e.g. into different snippets - make it easier to read
>>>>>
>>>>> 12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
>>>>>
>>>>> For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
>>>>
>>>> Galder, this as well?
>>>>
>>>>> 13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>>
>>>>> When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
>>>>
>>>> It should be the Infinispan one - the fully qualified classname can be seen in the next XML snippet.  Maybe the Java snippet should use the fqcn as well.
>>>>
>>>>
>>>>> 14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>>
>>>>> The CacheManager is deprecated, I guess these needs updating to 4.2 API?
>>>>
>>>> Yes.
>>>>
>>>>>
>>>>> 15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
>>>>>
>>>>> I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
>>>>
>>>> Perhaps starting 2 nodes using main() methods, in different terminals, and reverting back to the 5-min tutorial trying stuff on alternate instances?
>>>>
>>>> Cheers
>>>> Manik
>>>> --
>>>> Manik Surtani
>>>> [hidden email]
>>>> twitter.com/maniksurtani
>>>>
>>>> Lead, Infinispan
>>>> http://www.infinispan.org
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Comments on tutorials etc.

Pete Muir
In reply to this post by Mircea Markus

On 25 Jan 2011, at 11:47, Mircea Markus wrote:

>
> On 25 Jan 2011, at 11:33, Pete Muir wrote:
>
>>
>> On 25 Jan 2011, at 11:09, Galder Zamarreño wrote:
>>
>>> Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.
> Here is the code:
> https://github.com/radargun/radargun/blob/master/framework/src/main/java/org/radargun/stages/ClusterValidationStage.java

FYI I have added this code, and updated the tutorial - http://community.jboss.org/wiki/SettingupanInfinispanCluster#43_A_complete_example
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev