[appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
Hi all,

We are pleased to announce the release of Slim3 RC1.

Slim3 is a full-stack MVC framework optimized for Google App Engine/Java.
Our main concept is "Simple" and "Less Is More". "Less is more" means
simplicity and clarity lead to good design.

The main features of Slim3 are as follows:

* Global Transactions
* Faster than JDO/JPA
* Fast spin-up
* HOT reloading
* Type safe query

You can find more information about Slim3 here:
http://slim3.org

Thanks,

Yasuo Higa

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Ikai L (Google)
Hi Yasuo,

Wow, this look neat! I'll go ahead and add this to open source projects.

One question, though: do you have any unit testing examples? E.g. how
would I mock out the datastore or write a Controller test?

On Tue, Mar 9, 2010 at 12:42 AM, Yasuo Higa  wrote:
> Hi all,
>
> We are pleased to announce the release of Slim3 RC1.
>
> Slim3 is a full-stack MVC framework optimized for Google App Engine/Java.
> Our main concept is "Simple" and "Less Is More". "Less is more" means
> simplicity and clarity lead to good design.
>
> The main features of Slim3 are as follows:
>
> * Global Transactions
> * Faster than JDO/JPA
> * Fast spin-up
> * HOT reloading
> * Type safe query
>
> You can find more information about Slim3 here:
> http://slim3.org
>
> Thanks,
>
> Yasuo Higa
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>



-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
http://googleappengine.blogspot.com | http://twitter.com/app_engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread nicolas melendez
cute framework
NM

On Tue, Mar 9, 2010 at 4:17 PM, Ikai L (Google)  wrote:

> Hi Yasuo,
>
> Wow, this look neat! I'll go ahead and add this to open source projects.
>
> One question, though: do you have any unit testing examples? E.g. how
> would I mock out the datastore or write a Controller test?
>
> On Tue, Mar 9, 2010 at 12:42 AM, Yasuo Higa  wrote:
> > Hi all,
> >
> > We are pleased to announce the release of Slim3 RC1.
> >
> > Slim3 is a full-stack MVC framework optimized for Google App Engine/Java.
> > Our main concept is "Simple" and "Less Is More". "Less is more" means
> > simplicity and clarity lead to good design.
> >
> > The main features of Slim3 are as follows:
> >
> > * Global Transactions
> > * Faster than JDO/JPA
> > * Fast spin-up
> > * HOT reloading
> > * Type safe query
> >
> > You can find more information about Slim3 here:
> > http://slim3.org
> >
> > Thanks,
> >
> > Yasuo Higa
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> > To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
> >
> >
>
>
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> http://googleappengine.blogspot.com | http://twitter.com/app_engine
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Scott Hernandez
There is some interesting stuff in the release, but I've browsed the
Global Transaction stuff and I'm a little scared.
(http://sites.google.com/site/slim3appengine/slim3-datastore/transactions/global-transaction)

It seems that in the code it writes out a task in a queue to close the
commits, possibly. I'm pretty sure transactions should not be
implemented using queues, for any reason. The complexity of storing
temporary lock/tx objects in the datastore, time spent during that
transaction, and then pushing them through with a task (maybe much
later) seems like a dangerous plan.

Supporting multi-entity-group transactions needs to be implemented at
the datastore and not in a wrapper like that, IMO. There is no way to
rollback any committed transactions from any other entity-group, and
there are many other issues as well ... there is too much application
specific behavior that can't be assumed.

I can think of many reason this is a bad idea, and only very few where
this implementation will work well.

What happens if you have 3 transactions (1 transaction over 3 entity
groups) and the first two entity group transactions commit and the
third fails during commit? Is there a way to roll the first two back?

What happens if your user expect transactions to work like a database
where you have transaction isolation with gets/queries and updated the
value of the same entity multiple times from repeated gets? (think of
multiple "get, incr. object property, put" where the object only gets
incremented by the last amount, not the sum of the increments)

Where does the user get an error if the transaction fails later when
the task runs from the queue? (sure, that is application specific, but
dangerous all the same as the current models don't allow for implicit
non-synchronous operations).

These seem to be issues with any kind of custom transaction framework
on top of appengine, not just specific to the slim3 framework.

-Scott

On Tue, Mar 9, 2010 at 1:22 PM, nicolas melendez  wrote:
> cute framework
> NM
>
> On Tue, Mar 9, 2010 at 4:17 PM, Ikai L (Google)  wrote:
>>
>> Hi Yasuo,
>>
>> Wow, this look neat! I'll go ahead and add this to open source projects.
>>
>> One question, though: do you have any unit testing examples? E.g. how
>> would I mock out the datastore or write a Controller test?
>>
>> On Tue, Mar 9, 2010 at 12:42 AM, Yasuo Higa  wrote:
>> > Hi all,
>> >
>> > We are pleased to announce the release of Slim3 RC1.
>> >
>> > Slim3 is a full-stack MVC framework optimized for Google App
>> > Engine/Java.
>> > Our main concept is "Simple" and "Less Is More". "Less is more" means
>> > simplicity and clarity lead to good design.
>> >
>> > The main features of Slim3 are as follows:
>> >
>> > * Global Transactions
>> > * Faster than JDO/JPA
>> > * Fast spin-up
>> > * HOT reloading
>> > * Type safe query
>> >
>> > You can find more information about Slim3 here:
>> > http://slim3.org
>> >
>> > Thanks,
>> >
>> > Yasuo Higa
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Google App Engine for Java" group.
>> > To post to this group, send email to
>> > google-appengine-j...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine-java+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-appengine-java?hl=en.
>> >
>> >
>>
>>
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> http://googleappengine.blogspot.com | http://twitter.com/app_engine
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
Hi Ikai,
>
> One question, though: do you have any unit testing examples? E.g. how
> would I mock out the datastore or write a Controller test?
>
Slim3 supports Test-Driven Development.
You can find more information here:
http://sites.google.com/site/slim3appengine/getting-started/creating-controller-and-test

It's a part of Getting Started.
http://sites.google.com/site/slim3appengine/getting-started

Tests of slim3demo are here:
http://code.google.com/p/slim3/source/browse#svn/trunk/slim3demo/test/slim3/demo

Slim3 provides the following testing framework:
http://code.google.com/p/slim3/source/browse#svn/trunk/slim3/src/main/java/org/slim3/tester

Thanks,

Yasuo Higa

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
Hi Scott,
>
> It seems that in the code it writes out a task in a queue to close the
> commits, possibly. I'm pretty sure transactions should not be
> implemented using queues, for any reason. The complexity of storing
> temporary lock/tx objects in the datastore, time spent during that
> transaction, and then pushing them through with a task (maybe much
> later) seems like a dangerous plan.
>
As you know, "Eventually Consistent" is a very important concept
for scaling applications. To enable "Eventually Consistent",
Transactional Task Queue is a key item.

See "BASE: An Acid Alternative":
http://queue.acm.org/detail.cfm?id=1394128

> Supporting multi-entity-group transactions needs to be implemented at
> the datastore and not in a wrapper like that, IMO. There is no way to
> rollback any committed transactions from any other entity-group, and
> there are many other issues as well ... there is too much application
> specific behavior that can't be assumed.
>
If you start committing a global transaction, you cannot cancel it
as well as com.google.appengine.api.datastore.Transaction.

If you do not commit a global transaction, you can cancel it freely.
>
> What happens if you have 3 transactions (1 transaction over 3 entity
> groups) and the first two entity group transactions commit and the
> third fails during commit? Is there a way to roll the first two back?
>
Slim3 locks an entity group when getting, putting and deleting entities
so that nobody updates the entity group. So it never happens
that the first two entity group transactions commit and the third fails.

> What happens if your user expect transactions to work like a database
> where you have transaction isolation with gets/queries and updated the
> value of the same entity multiple times from repeated gets? (think of
> multiple "get, incr. object property, put" where the object only gets
> incremented by the last amount, not the sum of the increments)
>
Unlike with most databases, queries and gets inside a datastore
transaction do not see the results of previous writes inside that
transaction. Specifically, if an entity is modified or deleted within
a transaction, a query or get will return the original version of the
entity as of the beginning of the transaction, or nothing if the
entity did not exist then.

http://code.google.com/appengine/docs/java/datastore/transactions.html#Isolation_and_Consistency

> Where does the user get an error if the transaction fails later when
> the task runs from the queue? (sure, that is application specific, but
> dangerous all the same as the current models don't allow for implicit
> non-synchronous operations).
>
As described the above, if the task runs, the global transaction never fails.

Thanks,

Yasuo Higa

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Jeff Schnitzer
On Tue, Mar 9, 2010 at 7:07 PM, Yasuo Higa  wrote:
> Slim3 locks an entity group when getting, putting and deleting entities
> so that nobody updates the entity group. So it never happens
> that the first two entity group transactions commit and the third fails.

What do you do when there is a lock conflict?

ThreadA locks Resource1
ThreadB locks Resource2
ThreadA tries to lock Resource2... what happens?  Immediate rollback
with all locks released?  What happens when a datastore error prevents
the lock from being deleted?

Neat stuff, btw.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
Hi Jeff,

>> Slim3 locks an entity group when getting, putting and deleting entities
>> so that nobody updates the entity group. So it never happens
>> that the first two entity group transactions commit and the third fails.
>
> What do you do when there is a lock conflict?
>
> ThreadA locks Resource1
> ThreadB locks Resource2
> ThreadA tries to lock Resource2... what happens?

When ThreadA tries to lock Resource2, ThreadA will encounter
a ConcurrentModificationException, and the other locks that ThreadA has
(the lock for Resource1) will be released automatically.

> What happens when a datastore error prevents
> the lock from being deleted?
>
If the transaction is not committed for same reasons,
the locks will be released 30 seconds later.

Yasuo Higa

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.