FinTech in US – The first impression

After one month and half living in US, I had some observations about the fintech system in US.

  • Less “Neobank”: unlike in EU (UK and France) there are many so called “NeoBank”, in USA, there are less.Personally, I think in USA, the big banks, they don’t have so many fees and their applications, web site are already well designed, user friendly, fast and secure. When you open new accounts, you can have some bonus and many banks provide “cash back” system for their customers. So there is no need for “Neobank”, the large and transitional bank already do their work. In this case, when you look back at EU FinTech system, I think in the long run, the big banks will transform and work with so called “Neobanks”. The Neobank concept will disappear later, in my option.
  • Everything is about “Credit”. In US, the credit score is the key for personal finance. People spend lots of money in credit. But in EU, people used to save money. For the credit card, only big banks can provide. The Neobank can only provide Debit card, I think that is also one of the reason why people don’t need Neobank in US.
  • “Plaid” is a big success. The biggest success in FinTech world so far, is the company “Plaid“. I’ve been watching for it for several years. They build beautiful bank connection APIs and they only work for API no other bullshits. And today, so many popular APPs are based on Plaid in US, like Robinhood, Venmo, Coinbase etc. Started in 2013, in 7 Years, Plaid is acquired by Visa with $5.3 billion. What a story ! So many French FinTech should learn from it! In France, “Budget Insight” seems to do the same thing like Plaid, and famous App Lydia work under its API. That is why Tencent recently led the  $45 million Series B round on Lydia. I think in France, there are some good FinTech startups who do the right thing. Like Luko, Alan, Payfit, Qonto and Lydia, personally I see a good future for them.
  • Stock Market is very active. In US, the stock market is very active and people can really make money and become rich on it. Thanks to the FinTech like Robinhood now everyone can buy and sell the stocks easily. In EU especially in France, that is not the case..

Generally I think, US is the paradise for FinTech. But in EU, FinTech is very hard. I guess the best way is to find a win-win way with large traditional banks in the future..

Green Lake Park – Seattle

Couple weeks ago, when the sun rarely came out, I decided to go to a park for jogging and I searched on google map and the park Green Lake seemed like a good idea because its location is very convenient for access. By car, it is about 15 mins from SLU to it and 30 mins by bus.

When I got there, there was already many people and they were cycling around the lake for walking or running.

Logging in Java

  • SLF4J: SLF4J stands for Simple Facade For Java. It is nothing but only a facade for logging system. It doesn’t do the logging implementation work. It is logging design pattern.

If you only include SLF4J.jar in your project, what messages will you get? Here is very simple and easy understanding example from SLF4J. You will get those warning messages:

<!-- wp:shortcode -->
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
<!-- /wp:shortcode -->

Simply because there is no logger implementation component.

  • Log4J / Logback:

Logger4J or Logback are Java logging Framework who implementation SLF4J.

Here is every good picture from SLF4J manual: to help you understand the layers between log4j/logback/ other framework and SLF4J.

  • Use Cases:

When you design a Java Library which will be included and used by other project, you should only include SLF4J in this library and you give the chances to the using projects who choice the Java Logging Framework.

If you written a Service and Application, you should use SLF4J + Log4j or SLF4J + Logback etc.

In short, libraries and other embedded components should consider SLF4J for their logging needs because libraries cannot afford to impose their choice of logging framework on the end-user. On the other hand, it does not necessarily make sense for stand-alone applications to use SLF4J. Stand-alone applications can invoke the logging framework of their choice directly. In the case of logback, the question is moot because logback exposes its logger API via SLF4J.

From slf4j FAQ

Percentile – Monitoring

When we want to monitor the distributed system, we usually use “percentile”. For example, P99 – that means percentile 99, we mesure the performance until 99% and we exclude the last 1% performance.

Concret example, we say a Service’s latency P99 = 100ms, that means 99% of service response time is less than 100ms.

Normally, the calculate of percentile is expensive. Because we have to take for example 100 samples and order them , find the 99th one.

For monitoring, we usually take P50, P99 and P99.9.

Here is a good example by Elastic which can help to understand the concept. And anther one for going deeper.

The links:

https://www.elastic.co/blog/averages-can-dangerous-use-percentile

https://blog.bramp.net/post/2018/01/16/measuring-percentile-latency/

Single point of failure (SPOF)

In distributed system world, Single point of failure is a key word that you should always be aware.

It means if a part of system fails, the whole system will be down. For example, if Service A sends messages to Service B via a single instance of message queue, then if the queue fails, the communication between Service A and B will be completely loses. Then this message queue is SPOF of the system.

The key to remove SPOF is using “Redundancy“, here is very well document by Oracle that explains the point.

The system “Reliability” explained by Amazon.

The links:

https://docs.oracle.com/cd/E19424-01/820-4806/fjdch/index.html

https://wa.aws.amazon.com/wat.pillar.reliability.en.html

First month at Amazon – “Culture Shock”

It has been nearly a month since I started to work at Amazon in Seattle. To be honest, as a software developer, I kind of realize my years “dream” to work in a the top notch world class tech company.

But when in this big war ship, you find yourself quickly be educated or shocked by Amazon strong company culture and I would like to share some of them.

  1. “Day 1” culture, each day should be considered as your first day at Amazon, that means you should be always passioned, motived and curious.
  2. “Customer Obsession”: “We Start With the Customer and We Work Backward”. “Focus on customers over competitors”…
  3. “Empty chair”: It is said early Jeff used to put an empty chair in each meeting. That empty chair represent our customer and what will he/she say or expected..
  4. “Two pizza” team rule: In the early days of Amazon, Jeff Bezos put a rule: every internal team should be small enough that it can be fed with two pizzas..
  5. Word Doc over PPT: Amazon love word document over PPT and each document should not be over 6 pages..
  6. Amazon loves writing: we have our internal wiki tools, you could find anything in that wiki site. We put design documents, any thoughts and everything useful into written wiki pages..
  7. “You own your proper career”: in amazon everyone could be leader, at least you are the leader of your self. You are given enough space and freedom to be driven by your own idea and actions. You don’t need to wait the orders by someone else.

Solving Github “Invalid username or password” Problem.

We could encounter an “Invalid username or password” problem when we enable 2FA two-factor auth and try “git push“.

The solution is to instead of using your GitHub account password, you need to generate a secret token.

Here is the instruction from Github: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

Finally, you should do is:

$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token

Technology secrets behind Alibaba 11.11

This blog is inspired and based on the Alicloud WeChat article https://mp.weixin.qq.com/s/X1MtLk71LLZnsYZBVv-hHA

This year 2019-11.11, Alibaba Tmall double 11 sales event accomplished Turnover of 268.4 billion Chinese Yuan! The peak value of orders reached 544,000 units/second, and the data processing capacity per day reached 970PB! And all the system is based on Alibaba Cloud.

According to CTO Alibaba said in this blog, there were four technology secrets behind this.

  • 3rd Generation of X-Dragon Architecture. An AWS nitro similar technology.
  • OceanBase and PolarDB. Those are Alibaba’s self-made Databases.
  • Calculation and storage are separated. The storage is on remote and could be easily for expansion
  • RDMA(RemoteDirect Memory Access) in order to access the remote storage data quickly.

We could see in order to support and boost such large data requesting case, we should improve on the physical machine side and also database sides. Reading retrieving data quickly is the key.

AWS Cognito + MP JWT RBAC + Quarkus

In this blog, we will try to build a Role-Based-Access-Control (RBAC) with Quarkus, MicroProile JWT RBAC and AWS Cognito.

AWS Cognito will create JWT token and RSA Public Key Distribution. Quarkus is responsible for Java Server-side API endpoints.

Useful links:

Eclipse MicroProfile – JWT RBAC Security (MP-JWT)

QUARKUS – USING JWT RBAC

  • Create AWS Cognito User Pool and then in this User Pool create a User and Group. Here we use “Cognito Groups” as “User Roles”.
  • Create an AWS Cognito Identity Pool and get an identity pool Id , eg "eu-central-1_xxxxx". This Cognito Identity Pool will be the JWT Issuer and we could find the RSA Publicy Key under "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_xxxxx/.well-known/jwks.json"
  • Create the endpoint by using Quarkus, for example:
@Path("/orders")
@RequestScoped
public class OrderResource {

    @GET
    @RolesAllowed({"USER", "ADMIN"})
    @Produces(MediaType.APPLICATION_JSON)
    public Response list(){
        return Response.ok(Arrays.asList("Order1", "Order2")).build();
    }
}

Most important since the default group claim in MP-JWT is “groups” but the Cognito group claim is “cognito:groups” so we need config a mapping.

smallrye.jwt.path.groups=cognito:groups

Other necessary configs:

mp.jwt.verify.publickey.location=https://cognito-idp.eu-central-1.amazonaws.com/eu-central-xxxxx.well-known/jwks.json

mp.jwt.verify.issuer=https://cognito-idp.eu-central-1.amazonaws.com/eu-central-xxxxx

quarkus.smallrye-jwt.enabled=true
quarkus.smallrye-jwt.auth-mechanism=MP-JWT
quarkus.smallrye-jwt.realm-name=Quarkus-JWT

For testing and getting a cognito jwt token you could try aws cli:

aws cognito-idp admin-initiate-auth --region eu-central-1 --cli-input-json file://auth.json

Then you put that token in the HTTP header “Authorization” and begins with “Bearer ” for example:

curl -X GET \
https://example/orders \
-H 'Authorization: Bearer YOUR_JWT_TOKEN' \

There you are the integration Quarkus + MP JWT and AWS Cognito. Enjoy!

Tips : H1b Visa Stamping in Paris France (Conseils pour préparer votre H1B visa à Paris France)

  • Fill the famous DS-160 form online.
  • Take the appointment online as early as possible.
  • Arrive early on the visa stamping day because there will be a very long queue outside the US embassy.
  • Don’t bring the laptop and Ipads with you because they are not allowed and you should search the nearby hotel to store them temporarily.
  • Bring everything about the documents even they are not asked on the list. For example, your CV, offer letter, etc.
  • Speak clearly and in detail about your experiences when they are asking.
  • In the end, you should ask if your visa is approved or checked!
  • If your visa unfortunately checked, be patient and send emails to USA Paris embassy for the update regularly.