background preloader

Url

Facebook Twitter

My daily Java: Dismantling invokedynamic. Many Java developers regarded the JDK's version seven release as somewhat a disappointment.

My daily Java: Dismantling invokedynamic

On the surface, merely a few language and library extensions made it into the release, namely Project Coin and NIO2. But under the covers, the seventh version of the platform shipped the single biggest extension to the JVM's type system ever introduced after its initial release. Adding the invokedynamic instruction did not only lay the foundation for implementing lambda expressions in Java 8, it also was a game changer for translating dynamic languages into the Java byte code format. While the invokedynamic instruction is an implementation detail for executing a language on the Java virtual machine, understanding the functioning of this instruction gives true insights into the inner workings of executing a Java program.

This article gives a beginner's view on what problem the invokedynamic instruction solves and how it solves it. Method handles Method handles cannot be instantiated. Java - Dynamically choose method at runtime; alternatives to Visitor Pattern or Reflection. Netflix OSS, Spring Cloud, or Kubernetes? How About All of Them! – Software Blog. Some of this I cover in my book “Microservices for Java Developers” O’Reilly June 2016 (launching soon!)

Netflix OSS, Spring Cloud, or Kubernetes? How About All of Them! – Software Blog

, but I want to give a more specific treatment of it here. I get questions from folks about NetflixOSS (it’s awesome) and how it might run in Kubernetes (it’s awesome too!) And where the overlap is for some of the components. Let me try to explain some of it. Anyway, a lot of Netflix OSS was written at a time where things ran on an AWS cloud and there were no alternatives. So that brings us to point #1. Microservices can be implemented in a variety of frameworks/languages but things like service discovery, load balancing, fault-tolerance, etc are still quite important.

So can the infrastructure help out with service discovery, load balancing and fault tolerance also? If you use Kubernetes (or some variant), the answer is: yes. Service discovery the Kubernetes way. Creating JSON Web Token in JavaScript - Jonathan Petitcolas. I challenged myself during last weeks to implement an authentication on a freshly created API.

Creating JSON Web Token in JavaScript - Jonathan Petitcolas

After digging around, I found that one of the best solution would be JSON Web Tokens. As understanding a concept passes by experimenting it, here is a post describing how to forge such a token in JavaScript. What is JSON Web Token (JWT)? JSON Web Token (JWT) is an easy way to secure an API. Mobile Sync Design Pattern. Architectural pattern. An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context.[1] Architectural patterns are similar to software design pattern but have a broader scope.

Architectural pattern

The architectural patterns address various issues in software engineering, such as computer hardware performance limitations, high availability and minimization of a business risk. Some architectural patterns have been implemented within software frameworks. Definition[edit] 4.4. Capacity Planning - Tomcat: The Definitive Guide [Book] Capacity planning is another important part of tuning the performance of your Tomcat server in production.

4.4. Capacity Planning - Tomcat: The Definitive Guide [Book]

Regardless of how much configuration file tuning and testing you do, it won't really help if you don't have the hardware and bandwidth your site needs to serve the volume of traffic that you are expecting. Here's a loose definition as it fits into the context of this section: capacity planning is the activity of estimating the computer hardware, operating system, and bandwidth necessary for a web site by studying and/or estimating the total network traffic a site will have to handle; deciding on acceptable service characteristics; and finding the appropriate hardware and operating system that meet or exceed the server software's requirements in order to meet the service requirements.

In this case, the server software includes Tomcat, as well as any third-party web servers you are using in front of Tomcat. Capacity planning is usually done at upgrade points as well. Network bandwidth. Triggering Jenkins builds by URL - NCZOnline. Posted at October 6, 2015 by Nicholas C.

Triggering Jenkins builds by URL - NCZOnline

Zakas Tags: Jenkins Automation Builds As you might have read not too long ago, I recently moved my site from Wordpress to Jekyll[1]. In so doing, I ended up using Jenkins[2] to periodically build and upload my site to S3. Having a Jenkins instance running turns out to be quite useful for all sorts of tasks and so I've been trying to take advantage of it to automate more of my routine tasks. The goals Recently, I received some useful feedback from readers of my newsletter: The default URL for archived newsletters looks suspicious. Java Concurrency / Multithreading Tutorial. Back in the old days a computer had a single CPU, and was only capable of executing a single program at a time.

Java Concurrency / Multithreading Tutorial

Later came multitasking which meant that computers could execute multiple programs (AKA tasks or processes) at the same time. It wasn't really "at the same time" though. The single CPU was shared between the programs. The operating system would switch between the programs running, executing each of them for a little while before switching. Along with multitasking came new challenges for software developers.

Later yet came multithreading which mean that you could have multiple threads of execution inside the same program. Performance - Faster alternatives to Java's reflection. CQRS / ES Presentation. Command and Query Responsibility Segregation Event Sourcing Kudos Thanks Viridity ;-) Thanks Brian Clapper.

CQRS / ES Presentation

Thanks whoever bought the food. Thanks to ByWord! Disclaimer I am not an expert @ CQRS. Overview Domain Driven Design: Tackling Complexity in the Heart of Software by Eric Evans. Continuous Integration with Jenkins. Continuous Integration with Jenkins.