成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

actor ceo ex3ndr 介紹的actor,java,gwt,j2obj的框架體系

wind5o / 1050人閱讀

摘要:原文來自介紹的的框架體系這是架構(gòu)中最具備吸引力,也是最強(qiáng)大的部分。國內(nèi)訪問不到,因此轉(zhuǎn)過來。暫時(shí)原文原樣轉(zhuǎn),未作翻譯。

原文來自: https://medium.com/@ex3ndr/ho...

actor ceo ex3ndr 介紹的actor,java,gwt,j2obj的框架體系, 這是actor架構(gòu)中最具備吸引力,也是最強(qiáng)大的部分。 國內(nèi)訪問不到,因此轉(zhuǎn)過來。

暫時(shí)原文原樣轉(zhuǎn),未作翻譯。

Stepan Korshakov
CEO of Actor.im
Jun 9, 2015
How Actor uses Java, GWT and J2ObjC for reuse 80% of code

We are a small startup, and we try to make big thing: implement messaging platform from scratch on modern technologies and one day we realized that implementing clients for three platforms is very hard. It is hard to implement correctly our custom networking protocol, implement all complex sync logic (right messaging app is not straightforward!) and adding new features fast. When we decided to find a way to unify our development we figured out that our Android application internally is very optimized and have the best internal architecture for iOS and Web too. This happens because of our experience in the development of mobile messaging: 5 messengers for Android and WinPhone, Telegram S for Android and our CEO won 3 contests of a rapid development of mobile messaging applications. In this way, this architecture is already 3-rd generation and time-proven.

At the core of the application, we have Actor Model implementation (that’s why we have this name of our project), and we also use Actors in our server: Scala Akka. In one week, we implemented a small subset of Akka Actors. Actors are excellent for web because we have divided work to very small pieces and it doesn’t affect UI. We are extremely lucky. We only removed support for Typed Actors because we can’t use reflection in Web, and we can stripe all reflection information in generated code to reduce a size and improve execution speed.

Good Actor Model implementation doesn’t allow direct working with UI. We created very simple MVVM implementation, and it works very well, reduced listener/subscriber amount to zero and we can easily sync any object in UI with a single line of code. MVVM works well in Web too thanks to Angular/ReactJS. Luck doesn’t leave us in this too.

Also, we have a custom implementation of Protobuf serialization?—?BSer. It is compatible with Protobuf, but much more easy to use. Maybe our implementation bit slower, but we don’t find any problems in speed. Wire use reflection, and it is implemented by someone who doesn’t know Java (Sorry guys, I like you, Square). Original Protobuf is harder to use and generate a lot of code. Also, we have some additional features on top of original protobuf like inheritance.

To build smooth lists experience in Android, we created a complex logic of loading and sync of UI and DataBase. When we started to optimize iOS we found that iOS have same problems with lists that Android have (and one more) and this lists engine works well for iOS too.

Our storage of data was separated to key-value storages and special list storages that store ordered lists of objects. This idea reduce a lot of logic that need to implement for each platform: we need to implement ~10–15 sql queries and library is ready to use.

Java has best tools for profiling and debugging in the market and if you optimize apps. The developer can easily solve most of the problems with reach toolkits like Memory Analyzer Tool, IntelliJ IDEA, and others.

And in a month we separated all our code from Android and built libraries with GWT and J2ObjC.

We performed some speed checks. One interesting was testing crypto in Web. We compare a subset of BouncyCastle for Java that was converted to JS by GWT and various plain-js libraries like CryptoJS. Surprisingly, GWT crypto work faster up to two times when using RSA with 1024 and 2048 keys. Unfortunately GWT crypto can’t generate keys and just freeze, and we use CryptoJS for key generation and we decided not to fix this bugs in random number generation. The main reason is that BouncyCastle originally was developed for slowest JavaME phones and contains best algorithms and execution optimizations. At iOS, we haven’t spotted any noticeable difference. Using plain java implementations, we can make any crypto that is a huge advantage for us.

We also checked the size of libraries. For the web all messaging logic with custom proto, serialization and storage interfaces after all optimizations are only 90kb. iOS Application extended by 1MB, much less than Swift runtime.

After this, we dramatically reduce our codebase size and usually when we find bug?—?it is a bug in the library, and we fix it at all platforms by one single fix. Java/Android developers are much easier to hire than iOS devs and also easier than finding good frontend-developer. Now we and our customers can build custom native applications with much smaller development costs.

We are currently in private beta, and if someone want to try our product, in there’s company they may ask me by writing me email [email protected]. We usually suggest our product for businesses with 500+ employees. Also we are interested in partners that can help us to make Actor global.

Go to the profile of Stepan Korshakov
Stepan Korshakov

CEO of Actor.im

Go to the profile of Stepan Korshakov
Never miss a story from Stepan Korshakov, when you sign up for Medium. Learn more

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/66806.html

相關(guān)文章

  • 關(guān)于分布式計(jì)算一些概念

    摘要:關(guān)于三者的一些概括總結(jié)離線分析框架,適合離線的復(fù)雜的大數(shù)據(jù)處理內(nèi)存計(jì)算框架,適合在線離線快速的大數(shù)據(jù)處理流式計(jì)算框架,適合在線的實(shí)時(shí)的大數(shù)據(jù)處理我是一個(gè)以架構(gòu)師為年之內(nèi)目標(biāo)的小小白。 整理自《架構(gòu)解密從分布式到微服務(wù)》第七章——聊聊分布式計(jì)算.做了相應(yīng)補(bǔ)充和修改。 [TOC] 前言 不管是網(wǎng)絡(luò)、內(nèi)存、還是存儲(chǔ)的分布式,它們最終目的都是為了實(shí)現(xiàn)計(jì)算的分布式:數(shù)據(jù)在各個(gè)計(jì)算機(jī)節(jié)點(diǎn)上流動(dòng),同...

    Ververica 評(píng)論0 收藏0
  • JVM并發(fā)編程模型覽

    摘要:本文介紹和點(diǎn)評(píng)上的等并發(fā)編程模型。異步更適合并發(fā)編程。同步使線程阻塞,導(dǎo)致等待?;灸P瓦@是最簡單的模型,創(chuàng)建線程來執(zhí)行一個(gè)任務(wù),完畢后銷毀線程。響應(yīng)式編程是一種面向數(shù)據(jù)流和變化傳播的編程模式。起源于電信領(lǐng)域的的編程模型。 本文介紹和點(diǎn)評(píng)JVM上的Thread, Thread Pool, Future, Rx, async-await, Fiber, Actor等并發(fā)編程模型。本人經(jīng)驗(yàn)...

    cppowboy 評(píng)論0 收藏0
  • JVM并發(fā)編程模型覽

    摘要:本文介紹和點(diǎn)評(píng)上的等并發(fā)編程模型。異步更適合并發(fā)編程。同步使線程阻塞,導(dǎo)致等待?;灸P瓦@是最簡單的模型,創(chuàng)建線程來執(zhí)行一個(gè)任務(wù),完畢后銷毀線程。響應(yīng)式編程是一種面向數(shù)據(jù)流和變化傳播的編程模式。起源于電信領(lǐng)域的的編程模型。 本文介紹和點(diǎn)評(píng)JVM上的Thread, Thread Pool, Future, Rx, async-await, Fiber, Actor等并發(fā)編程模型。本人經(jīng)驗(yàn)...

    wudengzan 評(píng)論0 收藏0
  • #yyds干貨盤點(diǎn)# 常用軟件框架,總有一個(gè)用

    摘要:一界面框架是微軟在其最新桌面操作系統(tǒng)中使用的圖形用戶界面。干貨盤點(diǎn)二服務(wù)在寫后臺(tái)代碼的過程中,經(jīng)常會(huì)遇到要寫一些多帶帶的服務(wù)。這個(gè)傳統(tǒng)的控件開發(fā)起來很不方面,使用也不友好。發(fā)現(xiàn)有用的,這個(gè)第三方的框架,集成的很好,用起來也方便。一、Fluent Ribbon界面框架Fluent/Ribbon是微軟在其最新桌面操作系統(tǒng)Windows 7中使用的圖形用戶界面。 Windows平臺(tái)的進(jìn)化,伴隨著系...

    番茄西紅柿 評(píng)論0 收藏2637
  • Akka系列(四):Akka中共享內(nèi)存模型

    摘要:共享內(nèi)存相信對(duì)并發(fā)有所了解的同學(xué)都應(yīng)該知道在推出后,對(duì)內(nèi)存管理有了更高標(biāo)準(zhǔn)的規(guī)范了,這使我們開發(fā)并發(fā)程序也有更好的標(biāo)準(zhǔn)了,不會(huì)有一些模糊的定義導(dǎo)致的無法確定的錯(cuò)誤。 通過前幾篇的學(xué)習(xí),相信大家對(duì)Akka應(yīng)該有所了解了,都說解決并發(fā)哪家強(qiáng),JVM上面找Akka,那么Akka到底在解決并發(fā)問題上幫我們做了什么呢? 共享內(nèi)存 眾所周知,在處理并發(fā)問題上面,最核心的一部分就是如何處理共享內(nèi)存,...

    baukh789 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<