Rafał Wrzeszcz - Wrzasq.pl

Deploying Lambda@Edge with pl.chilldev.lambda

Thursday, 22 November 2018, 17:40

When working with cloud, one of the most efficient approaches you can leverage is serverless architecture. This concept allows you to define your entire application as set of interacting resources, without worrying about underlying infrastructure. Serverless applications can scale virtually to infinity, are cost-effective, lower maintenance costs (forget about patching kernels, installing system packages, defining upgrade paths etc.). Per-se, serverless it is a general pattern, but I will focus on AWS as this is my area of expertise - here, the main computing unit in serverless world is Lambda. It is a FaaS component that allows you to run your piece of code "in the cloud", which means decoupled form any computing hardware. Such code pieces can be triggered by you to perform some computation, but can also act as a handlers for various events across the platform (like SNS message processors, API Gateway authorization handlers and many many more). One of such integration ways is Lambda@Edge, which allows for handling CloudFront request events.

Tags: CloudFormation, Lambda, Web, AWS, Cloud, ChillDev

» Komentarze

FrontPageFilter - SPA with server side pages in Java

Wednesday, 05 October 2016, 20:38

Time flies, browsers become more and more modern, they are more and more up-to-date. As the common web standards and new frontend technologies are being adopted you can shift more stuff to the client-side. Particularily it means nowadays you can leave most of the frontend part on your JavaScript application shoulders. Thanks to that SPA approach is getting more and more popular. Especially that most search engines and webmaster tools are now able to understand and execute JavaScript code to build full site representation for analysis. With all of these in mind it's an attractive idea to develop your backend application as a pure JSON API (it doesn't have to be pure REST) and handle everything related to presentation layer on a frontend (browser) side. But you still need an application to serve it all from your server(s). Which means your backend application still needs to be a web application.

Tags: Web, Spring, Code, AJAX, ChillDev, Server, Java

» Komentarze

JSON-RPC services with pl.chilldev.commons

Saturday, 16 May 2015, 23:03

Yesterday a new version of pl.chilldev.commons (0.0.3) introduced a completely new component - pl.chilldev.commons:commons-jsonrpc. It is designed to ease building JSON-RPC services. It glues Apache MINA networking library with JSON-RPC 2.0 Base library. Thanks for using MINA, unlike most of the other JSON-RPC libraries, services are using plain TCP layer, without any envelope like HTTP. This gives possibility for making them more robust and efficient - client can use one connection session to interact asynchronously with the server with multiple parallel requests.

Tags: JSON-RPC, Code, Tutorial, ChillDev, Java

» Komentarze

ChillDev-Facelets - various Spring-based Facelets handlers

Wednesday, 12 November 2014, 22:27

Digging more and more into Java and building more and more apps with Spring I began to discover more and more technologies. One of my, probably key, decisions was to use Facelets as a view technology. Seems to be quite simple, but it isn't so - first of all Spring has a very limited integration possibilities for Facelets views; secondly Facelets are based on a different concepts than classic view templating engines like JSP, Velocity etc.; and finally Facelets are strictly designed for JSF framework so some of core features depend on it. But it's not impossible! Basic integration with Facelets is provided by Spring itself by variable resolver class that resolves Facelets variables by using Spring beans. Even better integration is possible by using Spring Web Flow which provides view resolver. What is missing is the integration of many core components, which are available in JSP tags. I began to create taglibs to fill missing gaps.

Tags: XHTML, Web, Forms, Spring, Tutorial, ChillDev, Java, Facelets

» Komentarze

ChillDev-Web - web page model library for Java

Thursday, 12 June 2014, 20:49

Last time I'm trying to migrate more and more towards technologies different than PHP, which I always found primitive and messed-up, but was skilled enought to do some fancy stuff with it. Even though I often play with different technologies and languages, I always liked Java and I'm moving more and more into it with my projects. For me, especially after years of PHP development, the biggest disadvantage is lack of many presentation-related features in JSP layer and MVC frameworks. I've decided to spend sime time trying my skills and reminding myself a bit of Java with creating library for JSP presentation technology that would help managing page meta-data. Basically is an attempt to port ChillDevViewHelpersBundle, my Symfony2 bundle, for Java/Spring.

Tags: XHTML, Web, Spring, SEO, JSP, Tutorial, ChillDev, Java

» Komentarze

ChillDev-Commons Java library

Saturday, 05 April 2014, 15:43

Last time I'm playing more and more with Java. And like always some parts of project I'm working on were absolutely generic. As an enthusiast of technologry and open-source I decided to publish them as ChillDev-Commons - losely coupled general-purpose routines library for Java. There is no particular idea about them, just released those classes that are completely generic and can be used by anyone - maybe they will be helpful. Hopefuly project will grow a little in future.

Tags: Code, Tutorial, ChillDev, Java

» Komentarze

ChillDevSpintax library - objective PHP library for spintax texts

Friday, 24 January 2014, 21:03

I'm working right now on a SEO tool and a must-have feature for such tools is support for spintax texts. It's a really common requirement so I though that there are planty of libraries for PHP to work with it. To my surprise I've hardly found any code snippet, not even a "complete" libraries and what's more most of them was… let's say it straight - crappy. Especially that project I'm working on requires a little more then just generating random texts, I need to remember and exclude already generated combinations etc. I had no other way than developing own library to deal with it, but since it's a completely stand-alone solution I decided to publish it as open source project - ChillDevSpintax library.

Tags: Web, SEO, Code, Tutorial, Spintax, ChillDev, PHP

» Komentarze

Symfony2 - global templating variables in PHP renderer with ChillDevViewHelpersBundle

Wednesday, 15 January 2014, 18:45

Short time ago, while working on one of my projects i faced a problem with PHP templating engine in Symfony2 (again the same) - passing pre-defined variables to view renderer. For some reason it's not possible to define global variables for PHP templating engine. It is possible for Twig (with TwigBundle), but there is no equivalent of that for PHP. After googling for a moment and browsing some of Stack Overflow questions I ensured myself that it's not possible and that I'm not the only one who is looking for such a feature.

Tags: Symfony, Code, ChillDev, Bundle, PHP

» Komentarze

Symfony2 - simple, yet useful tips

Monday, 17 June 2013, 16:24

It's been a while since my last article and activity, as I was mainly concentrated on my private life and commercials projects, but even though my top commitment was updating projects dependencies on GitHub I also experimented with some different approaches for organising Symfony2 projects. I want to share some of my thoughts, so you may also benefit from using it or tell me why these ideas are stupid. I don't want to write here some obvious stuff like "write unit tests", "use Composer" etc. - you can read that in every single tutorial for Symfony2. Some of my tricks are plain simple but not obvious, some, on the other hand look strange, but saved my ass, so you can give them a try. Please excuse my a bit chaotic form (and content), but I'm writing this in my free time while commuting by train :P.

Tags: Symfony, Optimization, ChillDev, Production, PHP

» Komentarze

ChillDevProxyTemplatingBundle - make your vendor bundle independent on templating engine

Saturday, 30 March 2013, 15:19

When working on ChillDevFileManagerBunde I faced a problem of implementing template engine switch to allow using it in systems that maybe use different templating engine then bundle was created for. Some common vendor bundles (like FOSUserBundle) try to provide such feature by manually creating template references in actions depending on their bundle configuration parameters. I know most Symfony 2 projects use Twig, but (as you maybe know already) I don't like it and use plain PHP templates. And that's not all - Symfony-based projects can use other templating engines, like Smarty for example. Vendor bundles should be possible to use in your system regardless of templating engine you use.

Tags: Symfony, Tutorial, ChillDev, Bundle, PHP

» Komentarze