Irc-Unix.net

Главная | Actual Topics | Обратная связь | В избранное | Сделать домашней | Антиспам ;)
Категории
 System & Utilities
 Unix News
 OS Emulator
 Developing
 Learning/Education
 Games
 Humour
Каталог статей
Все статьи

Antispam
Статьи
Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом
Календарь

May, 2019
ПнВтСрЧтПтСбВс
12345
6789101112
13141516171819
20212223242526
2728293031
Опросы
Какой из этих ОС Вы отдаете большее предпочтение?

QNX
FreeBSD
Linux(any)
Solaris
Mac OS
Windows XP
Windows 2003
Что такое ОС? :)


Результаты
Другие опросы

Всего голосов: 328
Комментарии: 0
Ссылки

Архив Новостей
 May 2019 (6)
 April 2019 (10)
 March 2019 (8)
 February 2019 (11)
 January 2019 (9)
 December 2018 (13)
 November 2018 (7)
 October 2018 (13)
 September 2018 (8)
 August 2018 (8)
 July 2018 (11)
 June 2018 (13)
 May 2018 (10)
 April 2018 (14)
 March 2018 (11)
 February 2018 (13)
 January 2018 (13)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (404)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (249)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

Cutelyst 2.7.0 released, async is back!

System & Utilities

Cutelyst a Qt/C++ Web Framework just got a new version. This time bringing back proper async support.

Perl Catalyst Framework was conceived as a sync/blocking framework, due that the Mojolicious framework was created, NodeJS and a few other web frameworks have pushed the async programming to the web. Performance wise being async doesn’t mean you get faster response times, rather the opposite, the need to unroll stack and make extra calls makes a CPU bound application slower.

But depending on the problem to solve it allows you to serve more users at the same time, using the same CPU cores. A typical modern application might receive a request from a Phone App then do a REST API call to an external API which might take 2ms or 200ms for the reply. While waiting for the response, typical sync/blocking applications can’t process more requests, or have to spawn more threads increasing RAM consumption and leveraging concurrency to the OS scheduler. On an Async web application, you can process another request while you wait for the previous request, thus possibly making the first request reply to be sent back to the user at a later time than is there was a dedicated process just waiting for his reply.

So, both ways have pros and cons and IMHO I’d like to support them both. When I started Cutelyst I thought that if I ever need async I could have a local QEventLoop to wait for the reply and would be able to deal with async requests, not recently I found out that supporting QEventLoop was causing stack overflow due it being used in pipelined scenarios, after that I removed it’s usage and performance improved in PlainText tests of TechEmpower, so I advised against using it and marked Cutelyst as not async.

Recently I got the need to call a few APIs from a REST API I did with Cutelyst, QNeworkAccessManager is an async only API, so either I create a thread for it to mimic sync behavior or allow Cutelyst to be used in async mode, of course I did the latter. The Context class has now detachAsync() and attachAsync() methods.

When you c->detachAsync(), you tell the engine to not send the headers and body immediately to the client, this will also break the action chain, meaning an end() method won’t be called, then when you get your async reply you call c->attachAsync().

Once c->attachAsync() is called the action chain is resumed so the end() method that possibly would render the HTML can perform it’s job.

It’s important to always be child ( QObject->setParent(…) ) of the Context pointer as if the client closes the connection it might be deleted.

This release was not only made of async:

  • A helper UserAgent singleton was added so that you have a thread_local QNetworkAccessManager with static methods to do more common REST tasks like sending a QJsonObject (yes, eventually I find time to write a patch for QNAM)
  • A new Sql::Transaction class gives you a scoped SQL transaction, preventing the mistake of not rolling back when you leave the scope in case of an error.
  • A few Headers helpers like ETag and If-Match comparison
  • Sebastian Held added support for dealing with Front-End Proxy Headers
  • Improved Stats precision using QElapsedTimer::nsecsElapsed()

And finally Cutelyst is not “half modern” CMake anymore, if that can even exist. The include directories of the exported Targets are now properly exported, so that you can remove:

include_directories(
${Cutelyst2Qt5_INCLUDE_DIR}
)

Have fun https://github.com/cutelyst/cutelyst/archive/v2.7.0.tar.gz





  


Разместил: Planet KDE | Дата: 18.02.2019 | Прочитано: 77 | Раздел: System & Utilities   
16 | System & Utilities | https://dantti.wordpress.com/2019/02/18/cutelyst-2-7-0-released-async-is-back/ | Planet KDE |

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Отлично
Хорошо Нормально Пойдёт Плохо


Смотрите также связанные темы

04.08.2008 World Wine News Issue 350
WWN Issue 350 was released today. News: Wine 1.1.2 CUDA Followup: it works! MSI Extensions Blitting speedups Digital Signature Checking in WINE AcceptEX Implementation More Issues...
30.09.2008 VM streaming and VMware Workstation 6.5 -- now released
I saw this demoed a while back and didn't realize it was in the newest Workstation, as I have become a Mactard who uses my VMware Fusion to run Windows on the Mac. But here it is in all its...
28.08.2008 World Wine News Issue 351
WWN Issue 351 was released today. News: Wine 1.1.3, gOS bundling 1.0, Wine Popularity The PatchWatcher DiB Engine Status Kernel bug inhibiting force feedback Wine Development Guide Spore and Wine Summer of code wrap up Google's Lively Unreliable Conformance Tests Weekly AppDB/BugZilla Status Changes More Issues...
23.09.2008 World Wine News Issue 352
WWN Issue 352 was released today. News: Progress towards 1.2 WineConf 2008 Coming Up Codeweavers Chromium Coverity Run Running Linux Apps from within a Wine App Weekly AppDB/BugZilla Status Changes More Issues...
07.10.2008 World Wine News Issue 353
WWN Issue 353 was released today. News: WineConf 2008 WineConf 2008 Keynote Focusing on the Users Wine's Image: WineHQ.org Wine on other platforms (Solaris, BSD, OS X) Wine 1.2 Timeline Updates on The Big Tickets: Quartz, WineD3D, iPod Support, DIB Engine Weekly AppDB/BugZilla Status Changes More Issues...
25.02.2011 Top 5 Planet V12N blog posts for week 8
Top 5 Planet V12N blog posts for week 8 Big announcements over the past 24 hours, VMware View 4.6 is released along with VMware Thinapp 4.6.1.  Congrats to both teams for all the hard work that went into getting these major updates out the door to our customers.  The long awaited PCoIP security server is now available for View, and we now get much more support for Microsoft Office 2010 with Thinapp 4.6.1. Here are the top picks for week 8, happy surfing. Eric Horschman - Hypervisor Memory Management Done Right - Sophisticated and effective memory management has always been a key s...
11.03.2011 Top 5 Planet V12N blog posts for week 10
Top 5 Planet V12N blog posts for week 10 I have added more feeds to the V12N blog aggregator, so there is even more great content coming in now.  If you feel there is a blog site that should be part of the Planet V12N please let me know.  We want to make sure we are getting as much quality content as possible showing up for everyone. This week we had some major announcements with vCenter Operations being launched, an acquisition announced of Wavemaker (Spring), and who could possibly have missed the VMware View iPad client?  Don’t forget, VMworld 2011 call for papers was anno...
07.05.2011 Top 5 Planet V12N blog posts for week 18
Top 5 Planet V12N blog posts for week 18 The VMware community is a unique social community with lots of collaboration, and people consistently trying to help each other out.  I think this makes this social circle more unique than some other social media circles out there.  For example check out the first blog post by Jason Boche, he has offered up his own lab infrastructure and bandwidth for anyone to test the VMware View iPad client.  Very cool! A couple of people have asked me how do I select the 5 blog posts for the week.  Giving back to the community is one of the qu...
12.05.2010 Surveying Virtualization Performance Trends with VMmark
Surveying Virtualization Performance Trends with VMmark The trends in published VMmark scores are an ideal illustration of the historical long-term performance gains for virtualized platforms. We began work on what would become VMmark 1.0 almost five years ago. At the time, ESX 2.5 was the state-of-the-art hypervisor. Today’s standard features such as DRS, DPM, and Storage VMotion were in various prototype and development stages. Processors like the Intel Pentium4 5xx series (Prescott) or the single-core AMD 2yy-series Opterons were the high-end CPUs of choice. Second-generation hardware-...
22.09.2010 VMworld 2010 Online Sessions & Labs
VMworld 2010 Online Sessions & Labs The VMworld 2010 (San Francisco) collection of session & lab videos, PDFs and MP3s has been released on VMworld.com for viewing in the Virtual Theater.  General/Super Sessions are free for public viewing, but all other sessions and labs require that you either were a paid attendee from the VMworld 2010 San Francisco conference or purchased a VMworld 2010 Subscription. Note: VMworld Europe 2010 paid attendees will be granted access immediately after VMworld in Copenhagen. Visit the VMworld Sessions & Labs Theater Whether for fun or education...
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search
Google

Web irc-unix.net

Топ Новостей
1: Fedora and KDE/spin\'s treatment - Discussion
Hot NEWS!
Просмотров - 3387


2: KDE\'s Kirigami 2.0 Framework for Convergent UIs Enters Beta with New Features
Просмотров - 1251

3: Offline Vaults for an extra layer of protection
Просмотров - 857

4: Come dine with the KDE e.V. board in Berlin in October
Просмотров - 754

5: Debugging issues booting a PC in 2018
Просмотров - 748

6: plib3.gui 0.9.9
Просмотров - 718

7: Konstruct
Просмотров - 702

8: KDE Connect – State of the union
Просмотров - 688

9: Best Desktop Environment
Просмотров - 685

10: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 684

11: KDE Connect Sprint
Просмотров - 678

12: Bluestar Gives Arch Linux a Celestial Glow
Просмотров - 657

13: Qt SCXML and State Chart Support in Qt Creator
Просмотров - 645

14: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 644

15: Volume Control in KDE Connect
Просмотров - 640

Google 120X240
Ссылки

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.053 сек. и 13 запросов к базе данных за 0.978 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.