Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 01 15:40

    jsu216 on 1.6.26_with_more_log_in_consul_discovery

    Set version to 1.6.26-log (compare)

  • May 29 17:44
    stevehu commented #960
  • May 29 17:43

    stevehu on issue960

    (compare)

  • May 29 17:43
    stevehu closed #960
  • May 29 17:43

    stevehu on master

    fixes #960 support both environ… (compare)

  • May 29 17:43
    stevehu closed #961
  • May 29 17:43
    stevehu opened #961
  • May 29 17:43

    stevehu on issue960

    fixes #960 support both environ… (compare)

  • May 29 17:42
    stevehu opened #960
  • May 29 17:26
    stevehu commented #958
  • May 29 17:25

    stevehu on issue958

    (compare)

  • May 29 17:25
    stevehu closed #958
  • May 29 17:25

    stevehu on master

    fixes #958 add a new error code… (compare)

  • May 29 17:25
    stevehu closed #959
  • May 29 17:25
    stevehu opened #959
  • May 29 17:25

    stevehu on issue958

    fixes #958 add a new error code… (compare)

  • May 29 17:24
    stevehu opened #958
  • May 27 21:13
    stevehu commented #956
  • May 27 21:13
    stevehu commented #954
  • May 27 21:12

    stevehu on issue956

    (compare)

PeterKieu
@PeterKieu
because the key topic is Kafka transaction, and we have a brand name TransactionalProducer, Some guys may be confused about mechanism of TransactionalProducer
Steve Hu
@stevehu
I use TransactionalProduce myself. It has all the features I need. But a lot of people want something simpler. So I create a handler trying to make the Kafka producer with the light-proxy. That means you can access the Kafka just like an API without worrying about the details.
PeterKieu
@PeterKieu
ok, I see, thanks.
Steve Hu
@stevehu
There are several kafka examples in the light-example-4j/kafka folder that might help.
PeterKieu
@PeterKieu
Thanks. I read that many times in a week, but you do not use transactional API, thus I should contribute another example, beside gradle codegen-tool branch.
Steve Hu
@stevehu
It is using the transactional API on the producer-consumer and stream-query.
PeterKieu
@PeterKieu
yes, I see you wrapper on Kafka streams having UserEventProcessor!
Steve Hu
@stevehu
the maproot is using Avro but and the events are defined in the light-portal which is not open sourced. However, the concept is easy to understand. To make it simple to understand, the light-example-4j/kafka is using JSON for the event. For real application, I would recommend Avro or Protobuf for the event.
Steve Hu
@stevehu
We have released 2.0.23 for jdk11 and 1.6.31 for jdk8. It is backward compatible with some defects addressed, and some enhancements added.
For more all the PRs included in each release, please visit https://trello.com/b/189msq9S/release-schedule or individual release note.
Steve Hu
@stevehu
@PeterKieu I remember you have asked how to merge multiple OpenAPI specification together and deployed it to the light-router or light-proxy but have issues with merging handler.yml automatically. Please take a look at this document at the end to use wildcard paths for the handler.yml file. One of our customers is using it this way. https://doc.networknt.com/style/light-aws-lambda/lambda-proxy/
PeterKieu
@PeterKieu
perfect, thanks!
PeterKieu
@PeterKieu
@stevehu For the light-kafka features, can we add a callback listener for receiving new stream key-value store by events, instead of polling to call stream key-value store.get()
PeterKieu
@PeterKieu
I sent an email to you of an example for a new light-kafka CQRS model based on transactional API. Pls verify that it can help our Light-4j community.
@stevehu can you give me your email?
PeterKieu
@PeterKieu
I am thinking to use GuavaCache which supports event hanlder and notification Or implement the java.util.Observer for this.
Steve Hu
@stevehu
my email is stevehu@gmail.com
I don't like Guava because it is too heavy. Also, if we use Kafka streams, there is a local rocksDB which is as fast as in memory database.
PeterKieu
@PeterKieu
I just want to control the response topic data in the same context of Producer.send(), e.g: future =producer.send(record ); ReadOnlyKeyValueStore<String, String> receiverStore = StartupHook.streams.getUserIdStore(); String data = receiverStore.get(idempotencyKey);
PeterKieu
@PeterKieu
May be using ObservableHashMap is light and enough for this
Steve Hu
@stevehu
I tried to understand your code in UserService. It looks like it is a producer, why do you use streams in the same class? In CQRS, the producer is the Command and the Streams are usually in the query side. Am I missing something?
Steve Hu
@stevehu
I did a performance test several days ago to use light-proxy as a sidecar. Hope it helps. https://doc.networknt.com/service/proxy/benchmark/
PeterKieu
@PeterKieu
Thanks Steve. I just finish solving the issue for CQRS example. I will push the code then you can see the interesting way there. One missing thing there, is to support Kafka partition. In UserService, it uses a stream to query the response topic then return to mobile app (edge REST client) in the same context, not as query side. Thus, traditional REST request/response can move to Kafka transaction in a same logic and high performance way.
Steve Hu
@stevehu
In Kafka streams, the partitions are allocated automatically and usually you should start the same number of instances as your partitions.
PeterKieu
@PeterKieu
Yes. I re-use your kafka-query example which includes concept of querying through partitions to get data.
PeterKieu
@PeterKieu
@stevehu Pls take a look at my update. I think that it may be better than the traditional CQRS model because Kafka supports data to edge modules for instance Queries anytime, and Transactional producer for exactly-once Commands, specially response result in the same command context.
We can standardize this Light Kafka-CQRS model, then apply for the codegen to simplify the CQRS model.
PeterKieu
@PeterKieu
For fire-and-forget Commands such as email/sms/task-scheduling, this model easily customizes
Steve Hu
@stevehu
We have released 2.0.24 for jdk11 and 1.6.32 for jdk8. It is backward compatible with some defects addressed, and some enhancements added.
For more all the PRs included in each release, please visit https://trello.com/b/189msq9S/release-schedule or individual release note.
PeterKieu
@PeterKieu
Many update for this release, Thanks much Steve
Steve Hu
@stevehu
Most updates are contributed or driven by our enterprise customers. We learned a lot from our users :)
Relivian
@Relivian
@stevehu What's the plan or intent for light-mobile-4j?
Steve Hu
@stevehu
@Relivian While starting with a mobile project recently, we realized that the API access between mobile and SPA are almost the same, so the light-spa-4j is suitable for the mobile security as well with OAuth 2.0 Authorization code flow.
The use cases for our own project is very limited. If you have some special requirement that light-spa-4j cannot meet, let's discuss it and make enhancement on it.
Relivian
@Relivian
@stevehu I wondered whether you want to port some of the middleware handlers you already have for the JDK to mobile platforms. In that case I wanted to ask you which ones you'd like to have ported.
Otherwise and as you already hinted, with React you're already pretty close to mobile platforms. Maybe I am wrong but I think I saw also services worker implementations on the light-4j platform that are needed for PWA's..
Relivian
@Relivian
I also don't really see the need for native mobile versions.
Steve Hu
@stevehu
The light-spa-4j is just one middleware handler with authentication and authorization for SPA and Mobile. It has to combined with other middleare handlers in the light-router to work. You can package/enable as many middleware handlers in the light-router based on your requirement.
PeterKieu
@PeterKieu
hi @stevehu. I got SSL handshake error on docker network driver: overlay
using driver: bridge or host SSL call running well. Do you know how to fix this? thanks much indeed
Steve Hu
@stevehu
Most likely it is missing certificate in the client.truststore if you are using the light-4j Http2Client. It can be easily debugged by following this article. https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/ReadDebug.html
PeterKieu
@PeterKieu
Thanks much. I testes both Http2Client and OkHttpClient. The problem is due to Docker networking mode (host/bridge/overlay), overlay makes this error.
Steve Hu
@stevehu
I have done a benchmark and it might help if you want a comparison. https://github.com/networknt/http2client-benchmark
PeterKieu
@PeterKieu
Light http2client is still impressive in performance. However, in fact, we must call many http-servers (inc: HTTP/1.1 & 2.0, basic authen/OAuth2/xcesskey...) => OkHttpClient is somewhat more flexible. I used Http2Client for Light-4j API-API calls and OkHttpClient for 3rd-party calls
Vincent Lee
@kvneight:matrix.org
[m]
Hi ,friends. Where could I found an example of java8 ? I noticed the examples are all based on java11,but my evnironment only java8 available.
Steve Hu
@stevehu
light-example-4j 1.6.x branch contains all the examples for light-4j 1.6.x which is Java 8.
1 reply
Steve Hu
@stevehu
We have released 2.0.26 for jdk11 and 1.6.34 for jdk8. It is backward compatible with some defects addressed, and some enhancements added.
For more all the PRs included in each release, please visit https://trello.com/b/189msq9S/release-schedule or individual release note.
Steve Hu
@stevehu
We have a contract position opened for a financial company in Toronto, Canada. If anyone interested, please PM me. Thanks.
shuchigupta
@shuchigupta
Hi @stevehu I wish to integrate light 4j middleware in my existing spring webflux application. Is there some documentation around this available or sample code?
Steve Hu
@stevehu
@shuchigupta I have made a comment on the issue you opened at networknt/light-spring-boot#7