You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Franck Wolff <fr...@graniteds.org> on 2013/08/21 12:36:57 UTC
GraniteDS 3.0.0.M3 is out
Hi,
The new version of the Granite Data Services platform is out.
It is a very important milestone on our way to the final 3.0.0.GA release:
beside the usual bugfixes and improvements for Flex developers, it brings
new or matured support for Android and JavaFX.
Be sure to read the full announcement here:
http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
*
*
The next version will be a release candidate (3.0.0.RC1), which will add a
new UDP-based real-time messaging support, even more lighter and faster
than our asynchronous HTTP-based protocol (usefull in trading and gaming
applications for example). This RC1 should then be shortly followed by the
final 3.0.0.GA.
Regards,
Franck.
Re: GraniteDS 3.0.0.M3 is out
Posted by Franck Wolff <fr...@graniteds.org>.
Gary,
I have implemented a bidirectional serialization of Vectors in GraniteDS
trunk (so it's going to be available in the upcoming 3.0.0.RC1 release).
I have put together a sample project here:
https://github.com/fwolff/flex-vectors-example (read instructions on the
landing page).
Basically, you can now serialize any Java array or Collection as an AS3
Vector with the help of the following annotations (pseudo Java code with
default values):
@AMFVectorInt(boolean fixed = false) // fixed means fixed size. Apply to
any array or Collection of java.lang.Number (or primitives).
@AMFVectorUint(boolean fixed = false) // idem.
@AMFVectorNumber(boolean fixed = false) // idem.
@AMFVectorObject(String type = "", boolean fixed = false) // type = "" -->
GraniteDS will try to guess the type of the Vector components (eg. "String"
for "java.lang.String").
Have a look at the source code of the sample to understand how to use it
(I'm to lazy to explain everything in this post).
Speaking of laziness, here are the current limitations of this
implementation:
1. You can't serialize Vector of Vectors (or a Vector in a collection, etc.)
2. This feature won't work with the "externalizer" feature of GraniteDS: it
would require to modify the code generator (the easy part) and to have
another implementation of persistent collections so transparent
lazy-loading with Tide would work with vectors (the hard part).
Anyway, I'd like to have your feedback about it and comments about how to
improve it.
Regards,
Franck.
2013/8/21 Gary Young <fl...@gmail.com>
> They don't, I have to convert Array to Vector.
>
> Actionscript's Vector is not perfect, element type has no inheritance,
> Vector.<Sprite> is Vector.<DisplayObject> will return false. and if a
> function accept parameter type Vector.<Sprite> won't accept
> Vector.<DisplayObject>.
>
> So I think your @Vector should assign a type for each element, so that
> client can use directly.
>
> thanks.
>
> -Gary
>
>
>
> On Wed, Aug 21, 2013 at 10:08 AM, Franck Wolff
> <fr...@graniteds.org>wrote:
>
> > Gary,
> >
> > GraniteDS has standard support for AS Vector ---> Java array (or any
> other
> > collection type) serialization. Java array (collections) ---> Vector
> needs
> > additional care: there is no mean to know what's the client application
> is
> > expecting, hence Java collections and arrays are serialized respectively
> > as ArrayCollection and Array...
> >
> > As a (bad, I admit) workaround, you can plug into GraniteDS a specific
> AMF3
> > serializer that will override standard array/collection serialization to
> > get a vector on the Flex side.
> >
> > What we could certainly do is to add support for a specific Java
> annotation
> > (say @Vector) that will tell the serializer to send Vectors instead of
> > ArrayCollections / Arrays when it finds it on a bean property. I'm
> thinking
> > about something like:
> >
> > @Vector
> > private String[] stringArray;
> >
> > @Vector
> > private List<String> stringList;
> >
> > or even
> >
> > @Vector
> > public List<String> getStringList() { ... }
> >
> > I think it would be pretty easy to implement such feature and I can
> > certainly plan it for the next release (3.0.0.RC1).
> >
> > Since you seem to be using another server-side solution (BlazeDS / LCDS /
> > ?), how do they achieve AS Vector <---> Java array / collection
> > serialization?
> >
> > Franck.
> >
> >
> > 2013/8/21 Gary Young <fl...@gmail.com>
> >
> > > Quick question: Does GraniteDS 3 support Actionscript Vector <----->
> > Java
> > > Array?
> > >
> > >
> > > On Wed, Aug 21, 2013 at 8:00 AM, Franck Wolff <
> > franck.wolff@graniteds.org
> > > >wrote:
> > >
> > > > Thanks Paul.
> > > >
> > > > The correct link is of course:
> > > >
> > > >
> > >
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without
> > > > "*.*").
> > > >
> > > > BTW: sorry for the double posts, I'm a bit confused with "
> > > > users@flex-apache.org" and the old "flex-users@incubator.apache.org
> > "...
> > > >
> > > > Franck.
> > > >
> > > > 2013/8/21 Paul Hastings <pa...@gmail.com>
> > > >
> > > > > On 8/21/2013 5:36 PM, Franck Wolff wrote:
> > > > >
> > > > >> http://granitedataservices.**com/blog/2013/08/20/graniteds-**
> > > > >> 3-0-0-m3-is-out/*.*<
> > > >
> > >
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
> > > > >
> > > > >>
> > > > >
> > > > > your link is messed up a bit ("*.*").
> > > > >
> > > > >
> > > >
> > >
> >
>
Re: GraniteDS 3.0.0.M3 is out
Posted by Gary Young <fl...@gmail.com>.
They don't, I have to convert Array to Vector.
Actionscript's Vector is not perfect, element type has no inheritance,
Vector.<Sprite> is Vector.<DisplayObject> will return false. and if a
function accept parameter type Vector.<Sprite> won't accept
Vector.<DisplayObject>.
So I think your @Vector should assign a type for each element, so that
client can use directly.
thanks.
-Gary
On Wed, Aug 21, 2013 at 10:08 AM, Franck Wolff
<fr...@graniteds.org>wrote:
> Gary,
>
> GraniteDS has standard support for AS Vector ---> Java array (or any other
> collection type) serialization. Java array (collections) ---> Vector needs
> additional care: there is no mean to know what's the client application is
> expecting, hence Java collections and arrays are serialized respectively
> as ArrayCollection and Array...
>
> As a (bad, I admit) workaround, you can plug into GraniteDS a specific AMF3
> serializer that will override standard array/collection serialization to
> get a vector on the Flex side.
>
> What we could certainly do is to add support for a specific Java annotation
> (say @Vector) that will tell the serializer to send Vectors instead of
> ArrayCollections / Arrays when it finds it on a bean property. I'm thinking
> about something like:
>
> @Vector
> private String[] stringArray;
>
> @Vector
> private List<String> stringList;
>
> or even
>
> @Vector
> public List<String> getStringList() { ... }
>
> I think it would be pretty easy to implement such feature and I can
> certainly plan it for the next release (3.0.0.RC1).
>
> Since you seem to be using another server-side solution (BlazeDS / LCDS /
> ?), how do they achieve AS Vector <---> Java array / collection
> serialization?
>
> Franck.
>
>
> 2013/8/21 Gary Young <fl...@gmail.com>
>
> > Quick question: Does GraniteDS 3 support Actionscript Vector <----->
> Java
> > Array?
> >
> >
> > On Wed, Aug 21, 2013 at 8:00 AM, Franck Wolff <
> franck.wolff@graniteds.org
> > >wrote:
> >
> > > Thanks Paul.
> > >
> > > The correct link is of course:
> > >
> > >
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without
> > > "*.*").
> > >
> > > BTW: sorry for the double posts, I'm a bit confused with "
> > > users@flex-apache.org" and the old "flex-users@incubator.apache.org
> "...
> > >
> > > Franck.
> > >
> > > 2013/8/21 Paul Hastings <pa...@gmail.com>
> > >
> > > > On 8/21/2013 5:36 PM, Franck Wolff wrote:
> > > >
> > > >> http://granitedataservices.**com/blog/2013/08/20/graniteds-**
> > > >> 3-0-0-m3-is-out/*.*<
> > >
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
> > > >
> > > >>
> > > >
> > > > your link is messed up a bit ("*.*").
> > > >
> > > >
> > >
> >
>
Re: GraniteDS 3.0.0.M3 is out
Posted by Franck Wolff <fr...@graniteds.org>.
Gary,
GraniteDS has standard support for AS Vector ---> Java array (or any other
collection type) serialization. Java array (collections) ---> Vector needs
additional care: there is no mean to know what's the client application is
expecting, hence Java collections and arrays are serialized respectively
as ArrayCollection and Array...
As a (bad, I admit) workaround, you can plug into GraniteDS a specific AMF3
serializer that will override standard array/collection serialization to
get a vector on the Flex side.
What we could certainly do is to add support for a specific Java annotation
(say @Vector) that will tell the serializer to send Vectors instead of
ArrayCollections / Arrays when it finds it on a bean property. I'm thinking
about something like:
@Vector
private String[] stringArray;
@Vector
private List<String> stringList;
or even
@Vector
public List<String> getStringList() { ... }
I think it would be pretty easy to implement such feature and I can
certainly plan it for the next release (3.0.0.RC1).
Since you seem to be using another server-side solution (BlazeDS / LCDS /
?), how do they achieve AS Vector <---> Java array / collection
serialization?
Franck.
2013/8/21 Gary Young <fl...@gmail.com>
> Quick question: Does GraniteDS 3 support Actionscript Vector <-----> Java
> Array?
>
>
> On Wed, Aug 21, 2013 at 8:00 AM, Franck Wolff <franck.wolff@graniteds.org
> >wrote:
>
> > Thanks Paul.
> >
> > The correct link is of course:
> >
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without
> > "*.*").
> >
> > BTW: sorry for the double posts, I'm a bit confused with "
> > users@flex-apache.org" and the old "flex-users@incubator.apache.org"...
> >
> > Franck.
> >
> > 2013/8/21 Paul Hastings <pa...@gmail.com>
> >
> > > On 8/21/2013 5:36 PM, Franck Wolff wrote:
> > >
> > >> http://granitedataservices.**com/blog/2013/08/20/graniteds-**
> > >> 3-0-0-m3-is-out/*.*<
> >
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
> > >
> > >>
> > >
> > > your link is messed up a bit ("*.*").
> > >
> > >
> >
>
Re: GraniteDS 3.0.0.M3 is out
Posted by Gary Young <fl...@gmail.com>.
Quick question: Does GraniteDS 3 support Actionscript Vector <-----> Java
Array?
On Wed, Aug 21, 2013 at 8:00 AM, Franck Wolff <fr...@graniteds.org>wrote:
> Thanks Paul.
>
> The correct link is of course:
>
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without
> "*.*").
>
> BTW: sorry for the double posts, I'm a bit confused with "
> users@flex-apache.org" and the old "flex-users@incubator.apache.org"...
>
> Franck.
>
> 2013/8/21 Paul Hastings <pa...@gmail.com>
>
> > On 8/21/2013 5:36 PM, Franck Wolff wrote:
> >
> >> http://granitedataservices.**com/blog/2013/08/20/graniteds-**
> >> 3-0-0-m3-is-out/*.*<
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
> >
> >>
> >
> > your link is messed up a bit ("*.*").
> >
> >
>
Re: GraniteDS 3.0.0.M3 is out
Posted by Franck Wolff <fr...@graniteds.org>.
Thanks Paul.
The correct link is of course:
http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without
"*.*").
BTW: sorry for the double posts, I'm a bit confused with "
users@flex-apache.org" and the old "flex-users@incubator.apache.org"...
Franck.
2013/8/21 Paul Hastings <pa...@gmail.com>
> On 8/21/2013 5:36 PM, Franck Wolff wrote:
>
>> http://granitedataservices.**com/blog/2013/08/20/graniteds-**
>> 3-0-0-m3-is-out/*.*<http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*>
>>
>
> your link is messed up a bit ("*.*").
>
>
Re: GraniteDS 3.0.0.M3 is out
Posted by Paul Hastings <pa...@gmail.com>.
On 8/21/2013 5:36 PM, Franck Wolff wrote:
> http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.*
your link is messed up a bit ("*.*").