Re: @JsonIgnore alternative to Dubbo ?

2022-04-14 Thread Daniel SAWAN
I read that dubbo has its own serialisation protocole. Why not this dubbo
serialization allow to mark field to be ignored.
The problem with transient keyword is that it also affect JPA and makes the
field not requestable from db.

I also looked for hessian2 ignore field and only found the
transient solution which is not good for me.

I found a .net implementation of hessian (https://github.com/k4tan/NHessian)
that supports ignore fields with a @NonSerialized annotation. Why the java
version don't have the same :(

Is there any solution to deal with dubbo & JPA lazyloading exception being
out of transaction without using transient ?

Thanks for your help.


Le mar. 22 mars 2022 à 23:19, Albumen Kevin  a écrit :

> Serialization is a plugin of Dubbo and Dubbo wants to adapt all of the
> serialization tools.
> As a RPC framework itself, we cannot change the behaviour of the serializer
> by default.( e.g. JDK serializer requires all beans to implement
> Serializable interface )
>
> You can try changing the serialization type in Dubbo to "fastjson" or
> "gson". These two serializers may work with JsonIgnore annotation.
>
> On Wed, Mar 23, 2022 at 12:27 AM Daniel SAWAN 
> wrote:
>
> > The only viable solution I found is to transfer to json and reparse the
> > json to java bean.
> > Because of json ignore field annotation i can then transfer my bean using
> > dubbo without having a lazy loading out of transaction error.
> > That would be cool to have a Dubbo ignore field annotation.
> >
> > Le mar. 8 mars 2022 à 11:36, Daniel SAWAN  a
> écrit
> > :
> >
> > > Hi ! Thanks for your reply.
> > > The problem with @transient is that it also affects JPA beans.
> > > I am looking for something that only affects Dubbo.
> > >
> > > Le mar. 8 mars 2022 à 09:41, Albumen Kevin  a
> écrit :
> > >
> > >> @JsonIgnore is only works in json serialization. If you want to ignore
> > >> some
> > >> fields, you can try to use the `transient` modifier.
> > >>
> > >> On Sat, Mar 5, 2022 at 4:29 AM Daniel SAWAN 
> > >> wrote:
> > >>
> > >> > Hello,
> > >> >
> > >> > I am actually learning Dubbo 3 and I was wondering if there is an
> > >> > equivalent to @JsonIgnore annotation to put on a bean field in order
> > to
> > >> > ignore its serialisation ?
> > >> >
> > >> > Thanks for your help !
> > >> >
> > >>
> > >
> >
>


Re: Problem with List param (dubbo version: 2.7.15)

2022-04-14 Thread Daniel SAWAN
I am using fastjson without importing the
maven dubbo-serialization-fastjson pom. Seems like it is included in Dubbo.

My consumer url is
: 
reference.setUrl("dubbo://"+vpsIp+":20880/"+interfaceName+"?token=1234567=fastjson");

So as you can see i put the serialization directly in the URL because i
didn't find a way to configure it in java. (if you can help on this...)

"I think the the exception happened on the provider side when trying to
deserialize raw json data to java bean."
That's exactly what is happening.

"FastjsonObjectInput#readObject(Class cls, Type type)"

This method is never called. The called method is "public  T
readObject(Class cls)"

here is some screenshots to show you what is happening :

https://i.imgur.com/VAdQKlt.png
https://i.imgur.com/5su4FsJ.png

and finally when the error happen : https://i.imgur.com/66zfbUi.png

So yes it seems like when using fastjson it got a Map of JSONObject instead
of a List of OperatingSystemVersion.
If i remove from the consumer url the param serialization=fastjson
everything work fine.






Le jeu. 14 avr. 2022 à 15:11, Jun Liu  a écrit :

> Are you using fastjson as the default serialization protocol there? Say by
> using ‘dubbo-serialization-fastjson’?
>
> I think the the exception happened on the provider side when trying to
> deserialize raw json data to java bean. Would you please set a breakpoint
> at the following place to try to debug and see the exact type of the second
> argument ’type’?
>
>   FastjsonObjectInput#readObject(Class cls, Type type)
>
> I guess it’s because the autoType feature has been disabled in the latest
> several fastjson releases for security reasons.
>
> Jun
>
> > On Apr 8, 2022, at 11:20 PM, Daniel SAWAN  wrote:
> >
> > client side error :
> > Caused by: org.apache.dubbo.remoting.RemotingException:
> > com.alibaba.fastjson.JSONException: autoType is not support.
> > java.lang.ClassCastException
> >
> > Seems like instead of sending a List dubbo client is sending a
> > List to Dubbo server.
>
>


Re: Performance Engineering Track CFP for ApacheCon NA New Orleans

2022-04-14 Thread Jun Liu
Hi,

Thanks for the invitation.

We would like to attend but sadly we are most likely cannot because of the 
distance and Covid restrictions. I wonder if there are any kind of online 
forums this year for us to attend.

Regards
Jun

> On Apr 7, 2022, at 6:27 PM, sharanf  wrote:
> 
> Hi All
> 
> I hope that you have already heard that ApacheCon NA is back as a live event 
> in New Orleans later this year. You can find out more details here: 
> https://apachecon.com/acna2022/
> 
> For the first time ever - we will be running a Performance Engineering track. 
> So what is Performance Engineering? You can find a definition and a track 
> description here: https://s.apache.org/3ykqk
> 
> So why are you getting this message? Well - we took a look at all the ASF 
> projects that may have an interest in Performance Engineering and this 
> project was on the list :-)
> 
> If you are interested in making a submission to this new track then you can 
> find a link to the CFP here: https://apachecon.com/acna2022/cfp.html
> 
> We are looking forward to receiving your submissions and hopefully seeing 
> those of you who can make it to New Orleans in October.
> 
> Thanks
> Sharan



Re: Problem with List param (dubbo version: 2.7.15)

2022-04-14 Thread Jun Liu
Are you using fastjson as the default serialization protocol there? Say by 
using ‘dubbo-serialization-fastjson’?

I think the the exception happened on the provider side when trying to 
deserialize raw json data to java bean. Would you please set a breakpoint at 
the following place to try to debug and see the exact type of the second 
argument ’type’?

  FastjsonObjectInput#readObject(Class cls, Type type) 

I guess it’s because the autoType feature has been disabled in the latest 
several fastjson releases for security reasons. 

Jun

> On Apr 8, 2022, at 11:20 PM, Daniel SAWAN  wrote:
> 
> client side error :
> Caused by: org.apache.dubbo.remoting.RemotingException:
> com.alibaba.fastjson.JSONException: autoType is not support.
> java.lang.ClassCastException
> 
> Seems like instead of sending a List dubbo client is sending a
> List to Dubbo server.



Re: [DISCUSS] Dubbo official website document structure upgrade suggestion

2022-04-14 Thread Jun Liu
> I found that the documentation on Dubbo official website is a bit
> laggy, I think we should upgrade the document structure and content on
> the Dubbo official website. My initial idea is to divide the document
> into two parts, the first part is the facade document, and the second
> part is the advanced document.

I totally agree with this point. I think it’s a good practice to separate the 
documentations into different levels and put them at different places. Those 
explaining the basic concepts, showcasing the basic usages of Dubbo should be 
placed in the most prominent place while the others related to usage of 
advanced features more similar to reference guides can be placed in somewhere 
that needs several clicks to reach.

> Facade document: it is mainly used to introduce Dubbo and serve as a
> guide for new Dubbo users, the directory structure is as follows:
> 
> - What is Dubbo?
> - - Introduction
> - - Core Concepts
> - - Dubbo Ecosystem
> - Why use Dubbo?
> - - Advantage
> - How to use Dubbo?
> - How to Contact the Dubbo Community?

Would you like to work on the the current website to build the new scaffold 
with the basic structure you suggested so others interested in this task can 
work together on it.

Jun

> On Apr 12, 2022, at 12:32 PM, zhongming hua  wrote:
> 
> Hi, all:
> I found that the documentation on Dubbo official website is a bit
> laggy, I think we should upgrade the document structure and content on
> the Dubbo official website. My initial idea is to divide the document
> into two parts, the first part is the facade document, and the second
> part is the advanced document.
> 
> Facade document: it is mainly used to introduce Dubbo and serve as a
> guide for new Dubbo users, the directory structure is as follows:
> 
> - What is Dubbo?
> - - Introduction
> - - Core Concepts
> - - Dubbo Ecosystem
> - Why use Dubbo?
> - - Advantage
> - How to use Dubbo?
> - How to Contact the Dubbo Community?
> 
> Advanced document: It will contain detailed information on various
> projects in the Dubbo ecosystem. It will build different document
> content according to different projects.  The top-level structure
> directory is as follows (The secondary directory will be determined by
> different projects, such as the Quick start of Dubbo Java SDK and
> Dubbo Golang SDK must be different):
> -  Introduction
> - - Users
> -  Quick start
> -  Concepts & Architecture
> - - FAQs
> -  Advanced Features & Usage
> -  Reference Manual
> - Upgrades & Compatibility
> - Contributing
>  - Overview
>  - Contribution Guideline
>  - Contributor Guideline
>  - Committer Guideline
> 
> If you have different ideas, you can reply to the email for discussion.
> 
> Best Regards!
> Zhongming Hua